Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Mahmoud Tornado

#16
Script and Content Requests / Re: Scriptload
Sep 20, 2018, 01:05 PM
So you added something wrong, be sure that everything in his Arrange.
#17
Script and Content Requests / Re: .db
Sep 20, 2018, 01:03 PM
Quote from: Humzasajjad on Sep 20, 2018, 11:49 AMQuerySQL(db, "create table if not exists Database ( Name TEXT, LowerName TEXT, Password VARCHAR(255), Level NUMERIC DEFAULT 1, IP VARCHAR(255) ");
if ( cmd == "setlevel" )
{
if ( !text ) MessagePlayer( "/"+cmd+" <Nick/id> <Level>", player );
   else
   {
      local
         plr = GetPlayer( GetTok( text, " ", 1 ) ),
         lvl = GetTok( text, " ", 2),
      if ( !plr ) MessagePlayer( "Unknown Player..", player );
     else if ( !lvl ) MessagePlayer("You must put a level.", player);
      else if ( !IsNum( lvl ) ) MessagePlayer("Level must be in numbers.", player);
      else
      {
   local q = QuerySQL(Admindb, "SELECT * FROM Admins WHERE Name = '" + escapeSQLString(plr.Name) + "'");
  if (!q)   QuerySQL( DataBase, "INSERT INTO Accounts ( Name, LowerName, Level ) VALUES ( '" + escapeSQLString(plr.Name) + "','" + escapeSQLString(plr.Name) + "','" + 0 + "')" );
  else
 {
         Stats[ plr.ID ].Level = lvl.tointeger();
  QuerySQL( Admindb, "UPDATE Admins SET Level='"+lvl+"' WHERE Name LIKE '" + plr.Name + "'" );
         Message("Administration Command: Admin "+player.Name+" Has Set "+plr.Name+" As an admin level: "+lvl+".");
      }
    }
   }
}
bro when i add this there was on script load error comes
This /setlevel command, for the second system not the first.
For the first will being like that,
else if ( cmd == "setlevel" )
{
   if ( !text ) MessagePlayer( "/"+cmd+" <Nick/id> <Level>", player );
   else
   {
      local
         plr = GetPlayer( GetTok( text, " ", 1 ) ),
         lvl = GetTok( text, " ", 2);
      if ( !plr ) MessagePlayer( "Unknown Player..", player );
     else if ( !lvl ) MessagePlayer("You must put a level.", player);
      else if ( !IsNum( lvl ) ) MessagePlayer("Level must be in numbers.", player);
      else
      {
         Stats[ plr.ID ].Level = lvl.tointeger();
         QuerySQL( db,"UPDATE Database SET Level='"+lvl+"' WHERE lower(Name) LIKE '"+plr.Name+"'");
         Message("Administration Command: Admin "+player.Name+" Has Set level of "+plr.Name+" to: "+lvl+".");
      }
   }
}
#18
Script and Content Requests / Re: .db
Sep 19, 2018, 11:34 PM
Saved in database.db like levels.
QuerySQL(db, "create table if not exists Database ( Name TEXT, LowerName TEXT, Password VARCHAR(255), Level NUMERIC DEFAULT 1, IP VARCHAR(255) ");

Or you can make another one with all things like an new account system.

class PlayerClass - Stats[player.ID].Level
Level = 0;

onScriptLoad() - New database to make admin levels.
Admindb <- ConnectSQL("AdminsDataBase.db");
 QuerySQL(Admindb, "create table if not exists Admins ( Name TEXT, LowerName TEXT, Level NUMERIC DEFAULT 0 ) ");
 Stats <- array(GetMaxPlayers(), null);

onPlayerJoin( player ) - Getting admin stats.
IfAdmin(player);
Stats[ player.ID ] = PlayerClass();

If Admin Function.
function IfAdmin(player)
{
 local q = QuerySQL(Admindb, "SELECT * FROM Admins WHERE Name = '" + escapeSQLString(player.Name) + "'");
 if (q)
 {
  Stats[ player.ID ].Level = GetSQLColumnData(q, 1);
 }
}

Setlevel Command.
if ( cmd == "setlevel" )
{
if ( !text ) MessagePlayer( "/"+cmd+" <Nick/id> <Level>", player );
   else
   {
      local
         plr = GetPlayer( GetTok( text, " ", 1 ) ),
         lvl = GetTok( text, " ", 2),
      if ( !plr ) MessagePlayer( "Unknown Player..", player );
     else if ( !lvl ) MessagePlayer("You must put a level.", player);
      else if ( !IsNum( lvl ) ) MessagePlayer("Level must be in numbers.", player);
      else
      {
  local q = QuerySQL(Admindb, "SELECT * FROM Admins WHERE Name = '" + escapeSQLString(plr.Name) + "'");
if (!q)   QuerySQL( DataBase, "INSERT INTO Accounts ( Name, LowerName, Level ) VALUES ( '" + escapeSQLString(plr.Name) + "','" + escapeSQLString(plr.Name) + "','" + 0 + "')" );
else
{
         Stats[ plr.ID ].Level = lvl.tointeger();
QuerySQL( Admindb, "UPDATE Admins SET Level='"+lvl+"' WHERE Name LIKE '" + plr.Name + "'" );
         Message("Administration Command: Admin "+player.Name+" Has Set "+plr.Name+" As an admin level: "+lvl+".");
      }
    }
   }
}
#19
Skin Showroom / Re: Help!! i need a help
Sep 16, 2018, 06:34 AM
Quote from: =RK=MarineForce on Sep 15, 2018, 10:12 PMHello, Sheep You posted this at Wrong Section

You want Convert it to VC TO VC-MP?
Nuh, San Andreas To Vice City.
#20
Snippet Showroom / Re: player ranks
Sep 16, 2018, 06:28 AM
There's nothing called, player.Kills so, u can make it with Stats[player.ID].Kills, or in other way you can make it by player.Score.
Local ranks are unused so it doesn't  important.
There's a problems in the command that will make u bugged a lot, it been like that. ↓↓
if(! text) MessagePlayer("/rank <NICK> ",player); //It's Important to use "!" if the text unused. "false"
else{
local plr = FindPlayer(text); // Add this after else
if(!plr) MessagePlayer( plr + " not online ",player); //This too and this the problem was in this " .

Yourcodes........
I just say this to be careful in the next time if something bugged may be an something small like this ! or " or +.
Finally, Nice again as you trying to make by yourself.

Off Topic: Player.anything will find here. Squirrel Player Functions
#21
PlayerChat
function onPlayerChat( player, message )
 {
if( IsMuted[ player.ID] )
{
MessagePlayer(">> You are muted.",player);
return 0;
}
 else if ( (player.Skin == 83) ||  ( player.Skin ==84 ) )
 {
  Message("[#CCFF00][Cuban Team] "+player.Name+": "+message);
 }
 else if ( (player.Skin == 85) ||  ( player.Skin ==86 ) )
 {
  Message("[#00cc00][Haitian Team] " + player.Name + ": "+message);
 }
 else if ( (player.Skin == 215) ||  ( player.Skin ==160 ) )
 {
  Message("[#FFFFFF][Spectate] " + player.Name + ": "+message);
 }
local MUTE_DIVIDE = 1000;
       if ( ( time() - antiSpamTime[ player.ID ] ) <= LIMT_REP_TIME ) {
 antiSpamWarnings[ player.ID ]++;
 if ( antiSpamWarnings[ player.ID ] >= LIMIT_REP_SPAM ) {
  if( !IsMuted[ player.ID ] ){
    IsMuted[ player.ID ] = true;
    Message(format(">> Auto-Muted: %s Reason: Spamming the Chat. Duration[ %d seconds ]",player.Name,MUTE_TIME/MUTE_DIVIDE) );
    NewTimer("autounmute",MUTE_TIME.tointeger(),1,player.ID);
  }
 }
} else {
 antiSpamWarnings[ player.ID ] = 0;
}
antiSpamTime[ player.ID ] = time();
}
#22
Quote from: umar4911 on Sep 10, 2018, 04:24 PM
Quote from: Mahmoud Tornado on Sep 10, 2018, 12:40 PM
Quote from: KuRuMi^ on Sep 10, 2018, 11:17 AM
Quote from: Oscar3063 on Sep 09, 2018, 11:26 PM
Quote from: vitogta on Jun 20, 2018, 05:21 PMgood luck, intresting to see what will happen with it

It looks like it will be promising, will it be this year?

Hi, I'm one of the developers of this grand event. We'll hope by completing & starting it by late 2018 unfortunately. Our expectations were to start by summer since mostly everyone was available to do their thing. We had trouble with one of our developers who lacked efforts and did nothing.
In Halloween, or talking about 1\2019. >.<?!
Not much work is left. I think we can start it on the first of November.
Nice, keep going. :D
#23
Quote from: =RK=MarineForce on Sep 10, 2018, 11:05 AMLmfao

i just added this
dofile( "IPtoCountry/IPtoCountry.nut" );
secondarydb <- ConnectSQL( "IPtoCountry/IpToCountry.db" );

it works Xddd
this changed by me .


Quote from: Takanaue on Jan 11, 2015, 12:24 PMIP to Country (VCMP)
function onScriptLoad()
{
   dofile( "IPtoCountry/IPtoCountry.nut" );
    secondarydb <- ConnectSQL( "IpToCountry.db" );
}
Yes, it's really "Lmfao". >.<
#24
Quote from: KuRuMi^ on Sep 10, 2018, 11:17 AM
Quote from: Oscar3063 on Sep 09, 2018, 11:26 PM
Quote from: vitogta on Jun 20, 2018, 05:21 PMgood luck, intresting to see what will happen with it

It looks like it will be promising, will it be this year?

Hi, I'm one of the developers of this grand event. We'll hope by completing & starting it by late 2018 unfortunately. Our expectations were to start by summer since mostly everyone was available to do their thing. We had trouble with one of our developers who lacked efforts and did nothing.
In Halloween, or talking about 1\2019. >.<?!
#26
Quote from: rww on Sep 09, 2018, 06:41 PMelse if ( cmd == "drownall" )
{
if ( stats[player.ID].Level < 4 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

p.Pos = Vector( -761.1595 -340.6097 9.9061 );
Message( "[#FFbb00]** Admin " + player.Name + " Drowned All Players ");
}
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

lol? why /drownall [plr name] [reason] for drown all? why not /drownall [reason]?

I can see that there's no reason in the command also. xD
#27
Quote from: Takanaue on Sep 09, 2018, 12:15 AMBecause you're starting the server from localhost I guess
Sure thing.
#29
Quote from: =RK=MarineForce on Sep 08, 2018, 09:16 PMhttps://ibb.co/fFUPLU

like this bro

and can i ad flags for Haitians and cubans? cubans can stole haitian flag
This is a client side, you must make a loop with main side and client side, i just gave you the idea of the score.
#30
Quote from: =RK=MarineForce on Sep 08, 2018, 09:19 PMBRO There is no bug? i didn't tested it okay let me test xD
This is not a bug, it's just not the information command.