Subnet System

Started by Yankee, May 27, 2017, 07:56 AM

Previous topic - Next topic

Yankee

Hi guys,I added subnet script and Database.db to my server.It works but players can come my server after resetting their internet.What should I do ?I can paste my script to this topic or can anyone give me working ban script ?

SAzEe21

This might help you: http://forum.vc-mp.org/?topic=346.0

But you also can fix your one if you post your codes here.

Yankee

#2
Quote from: Zeeshan.Bhatti on May 27, 2017, 08:06 AMThis might help you: http://forum.vc-mp.org/?topic=346.0

But you also can fix your one if you post your codes here.

I'm using this one mate,i am doing worng something,here my script:
[spoiler]

/*
Vice City Multiplayer 0.4 Blank Server (by Seby) for 64bit Windows.
You can use it to script your own server. Here you can find all events developed.

VC:MP Official: www.vc-mp.org
Forum: forum.vc-mp.org
Wiki: wiki.vc-mp.org
*/

// =========================================== S E R V E R   E V E N T S ==============================================

/*
function onServerStart()
{
}

function onServerStop()
{
}
*/
function onScriptLoad()
{
{
print(">>> System SubBan loaded <<<");
db <- ConnectSQL( "DataBase.db" );
QuerySQL( db, "CREATE TABLE IF NOT EXISTS SubBans ( Name VARCHAR(32), IP VARCHAR(25), Admin TEXT, Reason TEXT )" );
}
    AddClass( 1, RGB( 0, 191, 255 ) ,201, Vector( 372, -478, 13.8172 ), 130.0325, 21, 999 ,17, 200, 4, 255 );
    AddClass( 1, RGB( 30,144,255 ) ,202 Vector( -660, 760, 11.0862 ), 130.0325, 101, 999 ,17, 200, 104, 1000 );
    AddClass( 1, RGB( 0, 139, 0 ) ,203, Vector( -1715.79, -160, 15 ), 140.020, 105, 999 ,100, 200, 12, 255 );
    AddClass( 2, RGB( 204, 90, 17 ) ,204, Vector( -25, 0, 24 ), 140.020, 103, 999 ,102, 25, 15, 50 );
    AddClass( 2, RGB( 255, 255, 255 ) ,205, Vector( -695, -1583, 12 ), 140.020, 19, 999 ,28, 100, 5, 0 );
    AddClass( 1, RGB( 255, 215, 0 ) ,28, Vector( -1009, 196, 11.3937 ), 140.020, 0, 0 ,0, 0, 0, 0 );
}

function onScriptUnload()
{
 DisconnectSQL( db );
}

// =========================================== P L A Y E R   E V E N T S ==============================================

function onPlayerJoin( player )
{
                ClientMessage("-> [#daff00]Sunucumuza hosgeldiniz./giris yazarak girin.",player,255,0,102);
                ClientMessage("-> [#83bab3]Admin Facebook adresi:www.facebook.com/saidbali443",player,255,0,102);
                ClientMessage("-> [#83bab3]Komutlar /can tedavi ve /a animasyondur.",player,255,0,102);
                ClientMessage("-> [#83bab3]Adminler Yankee ve [VU_T]Legend iyi oyunlar diler.",player,255,0,102);
                NewTimer( "CheckBan", 1000, 1, player.ID );   
}

function onPlayerPart( player, reason )
{
   WriteIniBool("Stats.ini","Logged",player.UniqueID, false)
   if (ReadIniBool("Stats.ini","Logged",player.UniqueID))
   {
      SaveAccount(player)
   }
}

function onPlayerRequestClass( player, classID, team, skin )
{
   return 1;
}

function onPlayerRequestSpawn( player )
{
   return 1;
}

function onPlayerSpawn( player )
{
   if(ReadIniBool("Stats.ini","Logged",player.UniqueID))
   {
      LoadAccount(player)
   }
}

function onPlayerDeath( player, reason )
{
    switch (reason)
    {
        case 44:
        {
            Message(player.Name + " duserek oldu.");
            break;
        }
        case 41:
        {
            Message(player.Name + " PATLADI!");
            break;
        }
        case 43:
        {
            Message(player.Name + " boguldu.");
            break;
        }
        case 39:
        {
            Message(player.Name + " arabayla kaza yapti.");
            break;
        }
        case 70:
        {
            Message(player.Name + " intihar etti.");
            break;
        }
    }
}

function onPlayerKill( killer, player, reason, bodypart )
{
      killer.Score += 1;
      killer.Cash += 250;
      SaveAccount(killer)
}

function onPlayerTeamKill( player, killer, reason, bodypart )
{
}

function onPlayerChat( player, text )
{
   print( player.Name + ": " + text );
   return 1;
}

function CheckBan( user )
{
local player = FindPlayer( user );
 if ( player )
 {
local ip = player.IP;
local sub = split( ip, "." );
local q = QuerySQL( db,  "SELECT * FROM SubBans WHERE IP='" + sub[0].tofloat() + "." + sub[1].tofloat() + "'" );
if ( GetSQLColumnData( q, 0 ) )
  {
Message( ">>> " + player + " Banned From Server <<<");
KickPlayer( player );
return 1;
}
}
}

function onPlayerCommand( player, cmd, text )
{
   if(!player.Spawned)
   {
      MessagePlayer("Spawn olmadan komut KULLANAMAZSINIZ.",player)
      return false;
   }
 else if ( cmd == "HAAAAA" )
        {
      if ( !text ) MessagePlayer( "[Syntax] - /" + cmd + " <Nick/ID> <Reason>", player );
else {
  local plr = GetPlayer( GetTok( text, " ", 1 ) );
     if ( !plr ) MessagePlayer( "[Error] - Unknown Player..", player );
     else {
            local reason = GetTok( text, " ", 2 NumTok( text, " " ) );
            local ip = plr.IP;
            local sub = split( ip, "." );
             if ( reason == null ) reason = "None";
             QuerySQL( db, "INSERT INTO SubBans ( Name, IP, Admin, Reason ) VALUES ( '" + plr.Name + "', '" + sub[0].tofloat() + "." + sub[1].tofloat() + "', '" + player.Name + "', '" + reason + "' )" );
            Message( "[#EE82EE]** Admin " + player.Name + " Banned " + plr.Name + " Reason: " + reason );
     KickPlayer( plr );
     }
     }
  }
else if ( cmd == "HAAAAA" )
  {
  local q = QuerySQL( db,  "SELECT * FROM SubBans WHERE Name='" + text + "'" );
      if ( !text ) MessagePlayer( "[Syntax] - /" + cmd + " <Nick Full>", player );
     else if ( GetSQLColumnData( q, 0 ) != text ) MessagePlayer( "[Error] - " + text + " is not Banned.", player );
     else {
     QuerySQL( db, "DELETE FROM SubBans WHERE Name='" + text + "'" );
     Message( "[#EE82EE]** Admin " + player.Name + " UnBanned Player [ [#FFA500]" + text + " [#EE82EE]]." );
  }
  }
   else if ( cmd == "giris" )
   {
      if (ReadIniBool("Stats.ini","Logged",player.UniqueID))
      {
         MessagePlayer("[#ffffff]Zaten giriş YAPTINIZ.",player)
         return false;
      }
      else {
         WriteIniBool("Stats.ini", "Logged", player.UniqueID, true)
         LoadAccount(player);
         MessagePlayer("[#ffffff]Giris YAPTINIZ.",player);
      }
   }
    else if (cmd == "sado2851ann" || cmd == "announce")
    {
        if(!text)
        {
            PrivMessage(player, "CMD /" + cmd + " <MESAJ>");
        }
        else
        {
            AnnounceAll ( text + "", 3);
            MessagePlayer(">> DUYURDUNUZ: " + text,player )
        }
    }
else if (cmd == "HAAAAAAA")
{
MessagePlayer("Numara YAZ.", player);
SetWeather( text.tointeger() );
}
   else if(cmd == "sado2851goto") {
      if(!text) MessagePlayer( "KOD VE NUMARA YADA ID",player );
      else {
         local plr = FindPlayer(text);
         if(!plr) MessagePlayer( "HATA !",player);
         else {
            player.Pos = plr.Pos;
            MessagePlayer( "[ /" + cmd + " ] " + player.Name + " geldi " + plr.Name, player );
         }
      }
}
else if(cmd == "a")
 {
  if(!text)
  {
   MessagePlayer("[#6666FF]Liste: [#FFFF81](/a) dur, izle, lean, konus, dalga, intihar^, fall^, fallback^, :o, apply, bu!, arg^, carwback, wback, elbow^, rollback, boss, crawling, rollinfront, falling, roll, beware, idk, look, dumb, aim^, drown, teslimol, wut, fu, phone, sit, stand, sell, hm?, onfoot, db^, heal, lay, bored, riot, dance, drunk",player);
   MessagePlayer("[#6666FF]Dikkat -> ^ sembolu varsa numara kullanabilirsiniz.Yani bunun gibi: /a dance, /a dance 2, /a dance 3.",player);
  }
  else
  {
   switch(text)
   {
    case "dur":
     player.SetAnim(0,29);
     break;
    case "watcha":
     player.SetAnim(0,7);
     break;
    case "lean":
     player.SetAnim(0,9);
     break;
    case "konus":
     player.SetAnim(0,11);
     break;
    case "dalga":
     player.SetAnim(0,12);
     break;
    case "die":
     player.SetAnim(0,17);
     break;
    case "die 2":
     player.SetAnim(0,13);
     break;
    case "fall":
     player.SetAnim(0,25);
     break;
    case "fall 2":
     player.SetAnim(0,37);
     break;
    case "fallback":
     player.SetAnim(0,27);
     break;
    case "fallback 2":
     player.SetAnim(0,43);
     break;
    case "oo":
     player.SetAnim(0,44);
     break;
    case "apply":
     player.SetAnim(0,62);
     break;
    case "bu!":
     player.SetAnim(0,67);
     break;
    case "arg":
     player.SetAnim(0,112);
     break;
    case "arg 2":
     player.SetAnim(0,113);
     break;
    case "carwback":
     player.SetAnim(0,114);
     break;
    case "wback":
     player.SetAnim(0,118);
     break;
    case "elbow":
     player.SetAnim(0,123);
     break;
    case "elbow 2":
     player.SetAnim(0,124);
     break;
    case "rollback":
     player.SetAnim(0,126);
     break;
    case "boss":
     player.SetAnim(0,130);
     break;
    case "crawling":
     player.SetAnim(0,133);
     break;
    case "rollinfront":
     player.SetAnim(0,135);
     break;
    case "falling":
     player.SetAnim(0,144);
     break;
    case "roll":
     player.SetAnim(0,147);
     break;
    case "beware":
     player.SetAnim(0,151);
     break;
    case "idk":
     player.SetAnim(0,152);
     break;
    case "look":
     player.SetAnim(0,153);
     break;
    case "dumb":
     player.SetAnim(0,154);
     break;
    case "aim":
     player.SetAnim(0,155);
     break;
    case "aim 2":
     player.SetAnim(0,157);
     break;
    case "aim 3":
     player.SetAnim(0,160);
     break;
    case "drown":
     player.SetAnim(0,156);
     break;
    case "teslimol":
     player.SetAnim(0,161);
     break;
    case "wut":
     player.SetAnim(0,162);
     break;
    case "fu":
     player.SetAnim(0,163);
     break;
    case "phone":
     player.SetAnim(0,166);
     break;
    case "sit":
     player.SetAnim(0,169);
     break;
    case "stand":
     player.SetAnim(0,168);
     break;
    case "sell":
     player.SetAnim(0,171);
     break;
    case "hm?":
     player.SetAnim(0,172);
     break;
    case "onfoot":
     player.SetAnim(3,192);
     break;
    case "db":
     player.SetAnim(3,201);
     break;
    case "db 2":
     player.SetAnim(3,202);
     break;
    case "db 3":
     player.SetAnim(3,203);
     break;
    case "heal":
     player.SetAnim(24,214);
     break;
    case "lay":
     player.SetAnim(25,210);
     break;
    case "bored":
     player.SetAnim(26,215);
     break;
    case "bored 2":
     player.SetAnim(26,216);
     break;
    case "bored 3":
     player.SetAnim(26,217);
     break;
    case "bored 4":
     player.SetAnim(26,218);
     break;
    case "riot":
     player.SetAnim(27,219);
     break;
    case "riot 2":
     player.SetAnim(27,220);
     break;
    case "riot 3":
     player.SetAnim(27,221);
     break;
    case "riot 4":
     player.SetAnim(27,222);
     break;
    case "riot 5":
     player.SetAnim(27,223);
     break;
    case "riot 6":
     player.SetAnim(27,224);
     break;
    case "riot 7":
     player.SetAnim(27,225);
     break;
    case "dance":
     player.SetAnim(28,226);
     break;
    case "dance 2":
     player.SetAnim(28,227);
     break;
    case "dance 3":
     player.SetAnim(28,228);
     break;
    case "dance 4":
     player.SetAnim(28,229);
     break;
    case "dance 5":
     player.SetAnim(28,230);
     break;
    case "dance 6":
     player.SetAnim(28,231);
     break;
    case "dance 7":
     player.SetAnim(28,232);
     break;
    case "drunk":
     player.SetAnim(29,210);
     break;
    default:
     MessagePlayer(">> [#FF3636]HATA !",player);
   }
  }
 }
   else if(cmd == "sado2851getir") {
      if(!text) MessagePlayer( "Error - Correct syntax - /bring <Name/ID>' !",player );
      else {
         local plr = FindPlayer(text);
         if(!plr) MessagePlayer( "Error - Unknown player !",player);
         else {
            plr.Pos = player.Pos;
            MessagePlayer( "[ /" + cmd + " ] " + plr.Name + " was sent to " + player.Name, player );
         }
      }
   }
if ( cmd == "HAAAAA" )
    {
        if(!text) MessagePlayer( "[#ffffff]KULLANIM - /sado2851para <oyuncuismi> <miktar>", player );
        else
        {
            local params = split( text, " " ), plr = FindPlayer( params[0] ), ammount = params[1];
            if(!plr) MessagePlayer( "[#ffffff]HATA - KULLANICI BULUNAMADI.", player );
            else if(!ammount || !IsNum( ammount )) MessagePlayer( "[#ffffff]HATA - Miktar girilmedi.", player );
            else
            {
                plr.GiveMoney(ammount.tointeger());
                MessagePlayer( "[#DC26FF]"+player.Name+" admin sana $"+ammount.tointeger()+" para verdi.",plr);
                MessagePlayer( "[#DC26FF]You have given $"+ammount.tointeger()+" to "+plr.Name,player);
            }
        }
    }
   else if ( cmd == "can" )
   {
      if (player.Cash < 100 )
      {
         MessagePlayer("Yetersiz para!",player)
         return false;
      }
      if (player.Health == 100 )
      {
         MessagePlayer("Tedavi gereksiz.",player)
         return false;
      }
      
      player.Health = 100;
      player.Cash -= 100;
      SaveAccount(player);
      Message(player + " tedavi oldu." )
   }
}

function onPlayerPM( player, playerTo, message )
{
   return 1;
}

function GetPlayer( plr )
{
    if ( plr )
    {
        if ( IsNum( plr ) )
        {
            plr = FindPlayer( plr.tointeger() );
            if ( plr ) return plr;
            else return false;
        }
     else
        {
            plr = FindPlayer( plr );
            if ( plr ) return plr;
            else return false;
        }
    }
    else return false;
}

function GetTok(string, separator, n, ...)
{
 local m = vargv.len() > 0 ? vargv[0] : n,
    tokenized = split(string, separator),
    text = "";

 if (n > tokenized.len() || n < 1) return null;
 for (; n <= m; n++)
 {
  text += text == "" ? tokenized[n-1] : separator + tokenized[n-1];
 }
 return text;
}

function NumTok(string, separator)
{
 local tokenized = split(string, separator);
 return tokenized.len();
}

function onPlayerBeginTyping( player )
{
}

function onPlayerEndTyping( player )
{
}

/*
function onLoginAttempt( player )
{
   return 1;
}
*/

function onNameChangeable( player )
{
}

function SaveAccount(player)
{
   WriteIniInteger("Stats.ini", "Cash", player.UniqueID, player.Cash )
   WriteIniInteger("Stats.ini", "Score", player.UniqueID, player.Score )
}
function LoadAccount(player)
{
   player.Cash = ReadIniInteger("Stats.ini","Cash", player.UniqueID)
   player.Score = ReadIniInteger("Stats.ini","Score", player.UniqueID)
}

function onPlayerSpectate( player, target )
{
}

function onPlayerCrashDump( player, crash )
{
}

function onPlayerMove( player, lastX, lastY, lastZ, newX, newY, newZ )
{
}

function onPlayerHealthChange( player, lastHP, newHP )
{
}

function onPlayerArmourChange( player, lastArmour, newArmour )
{
}

function onPlayerWeaponChange( player, oldWep, newWep )
{
}

function onPlayerAwayChange( player, status )
{
}

function onPlayerNameChange( player, oldName, newName )
{
}

function onPlayerActionChange( player, oldAction, newAction )
{
}

function onPlayerStateChange( player, oldState, newState )
{
}

function onPlayerOnFireChange( player, IsOnFireNow )
{
}

function onPlayerCrouchChange( player, IsCrouchingNow )
{
}

function onPlayerGameKeysChange( player, oldKeys, newKeys )
{
}

// ========================================== V E H I C L E   E V E N T S =============================================

function onPlayerEnteringVehicle( player, vehicle, door )
{
   return 1;
}

function onPlayerEnterVehicle( player, vehicle, door )
{
}

function onPlayerExitVehicle( player, vehicle )
{
}

function onVehicleExplode( vehicle )
{
}

function onVehicleRespawn( vehicle )
{
}

function onVehicleHealthChange( vehicle, oldHP, newHP )
{
}

function onVehicleMove( vehicle, lastX, lastY, lastZ, newX, newY, newZ )
{
}

// =========================================== P I C K U P   E V E N T S ==============================================

function onPickupClaimPicked( player, pickup )
{
   return 1;
}

function onPickupPickedUp( player, pickup )
{

if(pickup.Model == 368)
{
pickup.RespawnTime = 30000;
MessagePlayer( "Balistik yelek ALINDI.", player );
player.Armor = 100;
}
if(pickup.Model == 408)
{
pickup.RespawnTime = 30000;
MessagePlayer( "KAZANDINIZ Tebrik ederiz-AY YILDIZ Turkey", player );
player.Cash += 50000;
SaveAccount(player)
}
}

function onPickupRespawn( pickup )
{
}

// ========================================== O B J E C T   E V E N T S ==============================================

function onObjectShot( object, player, weapon )
{
}

function onObjectBump( object, player )
{
}

// =========================================== B I N D   E V E N T S ==============================================

function onKeyDown( player, key )
{
}

function onKeyUp( player, key )
{
}

// ================================== E N D   OF   O F F I C I A L   E V E N T S ======================================
[/spoiler]

EK.IceFlake

Did you seriously post your whole script in a single post without even using code tags?

Yankee

Quote from: EK.IceFlake on May 27, 2017, 08:37 AMDid you seriously post your whole script in a single post without even using code tags?

Flake I'm new man,I'm not proffesional,help me or leave the topic man.

Anik

Quote from: Yankee on May 27, 2017, 08:40 AM
Quote from: EK.IceFlake on May 27, 2017, 08:37 AMDid you seriously post your whole script in a single post without even using code tags?

Flake I'm new man,I'm not proffesional,help me or leave the topic man.
lmao

SAzEe21

Quote from: Yankee on May 27, 2017, 08:16 AM
Quote from: Zeeshan.Bhatti on May 27, 2017, 08:06 AMThis might help you: http://forum.vc-mp.org/?topic=346.0

But you also can fix your one if you post your codes here.

I'm using this one mate,i am doing worng something,here my script:
[spoiler]

/*
Vice City Multiplayer 0.4 Blank Server (by Seby) for 64bit Windows.
You can use it to script your own server. Here you can find all events developed.

VC:MP Official: www.vc-mp.org
Forum: forum.vc-mp.org
Wiki: wiki.vc-mp.org
*/

// =========================================== S E R V E R   E V E N T S ==============================================

/*
function onServerStart()
{
}

function onServerStop()
{
}
*/
function onScriptLoad()
{
{
print(">>> System SubBan loaded <<<");
db <- ConnectSQL( "DataBase.db" );
QuerySQL( db, "CREATE TABLE IF NOT EXISTS SubBans ( Name VARCHAR(32), IP VARCHAR(25), Admin TEXT, Reason TEXT )" );
}
    AddClass( 1, RGB( 0, 191, 255 ) ,201, Vector( 372, -478, 13.8172 ), 130.0325, 21, 999 ,17, 200, 4, 255 );
    AddClass( 1, RGB( 30,144,255 ) ,202 Vector( -660, 760, 11.0862 ), 130.0325, 101, 999 ,17, 200, 104, 1000 );
    AddClass( 1, RGB( 0, 139, 0 ) ,203, Vector( -1715.79, -160, 15 ), 140.020, 105, 999 ,100, 200, 12, 255 );
    AddClass( 2, RGB( 204, 90, 17 ) ,204, Vector( -25, 0, 24 ), 140.020, 103, 999 ,102, 25, 15, 50 );
    AddClass( 2, RGB( 255, 255, 255 ) ,205, Vector( -695, -1583, 12 ), 140.020, 19, 999 ,28, 100, 5, 0 );
    AddClass( 1, RGB( 255, 215, 0 ) ,28, Vector( -1009, 196, 11.3937 ), 140.020, 0, 0 ,0, 0, 0, 0 );
}

function onScriptUnload()
{
 DisconnectSQL( db );
}

// =========================================== P L A Y E R   E V E N T S ==============================================

function onPlayerJoin( player )
{
                ClientMessage("-> [#daff00]Sunucumuza hosgeldiniz./giris yazarak girin.",player,255,0,102);
                ClientMessage("-> [#83bab3]Admin Facebook adresi:www.facebook.com/saidbali443",player,255,0,102);
                ClientMessage("-> [#83bab3]Komutlar /can tedavi ve /a animasyondur.",player,255,0,102);
                ClientMessage("-> [#83bab3]Adminler Yankee ve [VU_T]Legend iyi oyunlar diler.",player,255,0,102);
                NewTimer( "CheckBan", 1000, 1, player.ID );   
}

function onPlayerPart( player, reason )
{
   WriteIniBool("Stats.ini","Logged",player.UniqueID, false)
   if (ReadIniBool("Stats.ini","Logged",player.UniqueID))
   {
      SaveAccount(player)
   }
}

function onPlayerRequestClass( player, classID, team, skin )
{
   return 1;
}

function onPlayerRequestSpawn( player )
{
   return 1;
}

function onPlayerSpawn( player )
{
   if(ReadIniBool("Stats.ini","Logged",player.UniqueID))
   {
      LoadAccount(player)
   }
}

function onPlayerDeath( player, reason )
{
    switch (reason)
    {
        case 44:
        {
            Message(player.Name + " duserek oldu.");
            break;
        }
        case 41:
        {
            Message(player.Name + " PATLADI!");
            break;
        }
        case 43:
        {
            Message(player.Name + " boguldu.");
            break;
        }
        case 39:
        {
            Message(player.Name + " arabayla kaza yapti.");
            break;
        }
        case 70:
        {
            Message(player.Name + " intihar etti.");
            break;
        }
    }
}

function onPlayerKill( killer, player, reason, bodypart )
{
      killer.Score += 1;
      killer.Cash += 250;
      SaveAccount(killer)
}

function onPlayerTeamKill( player, killer, reason, bodypart )
{
}

function onPlayerChat( player, text )
{
   print( player.Name + ": " + text );
   return 1;
}

function CheckBan( user )
{
local player = FindPlayer( user );
 if ( player )
 {
local ip = player.IP;
local sub = split( ip, "." );
local q = QuerySQL( db,  "SELECT * FROM SubBans WHERE IP='" + sub[0].tofloat() + "." + sub[1].tofloat() + "'" );
if ( GetSQLColumnData( q, 0 ) )
  {
Message( ">>> " + player + " Banned From Server <<<");
KickPlayer( player );
return 1;
}
}
}

function onPlayerCommand( player, cmd, text )
{
   if(!player.Spawned)
   {
      MessagePlayer("Spawn olmadan komut KULLANAMAZSINIZ.",player)
      return false;
   }
 else if ( cmd == "HAAAAA" )
        {
      if ( !text ) MessagePlayer( "[Syntax] - /" + cmd + " <Nick/ID> <Reason>", player );
else {
  local plr = GetPlayer( GetTok( text, " ", 1 ) );
     if ( !plr ) MessagePlayer( "[Error] - Unknown Player..", player );
     else {
            local reason = GetTok( text, " ", 2 NumTok( text, " " ) );
            local ip = plr.IP;
            local sub = split( ip, "." );
             if ( reason == null ) reason = "None";
             QuerySQL( db, "INSERT INTO SubBans ( Name, IP, Admin, Reason ) VALUES ( '" + plr.Name + "', '" + sub[0].tofloat() + "." + sub[1].tofloat() + "', '" + player.Name + "', '" + reason + "' )" );
            Message( "[#EE82EE]** Admin " + player.Name + " Banned " + plr.Name + " Reason: " + reason );
     KickPlayer( plr );
     }
     }
  }
else if ( cmd == "HAAAAA" )
  {
  local q = QuerySQL( db,  "SELECT * FROM SubBans WHERE Name='" + text + "'" );
      if ( !text ) MessagePlayer( "[Syntax] - /" + cmd + " <Nick Full>", player );
     else if ( GetSQLColumnData( q, 0 ) != text ) MessagePlayer( "[Error] - " + text + " is not Banned.", player );
     else {
     QuerySQL( db, "DELETE FROM SubBans WHERE Name='" + text + "'" );
     Message( "[#EE82EE]** Admin " + player.Name + " UnBanned Player [ [#FFA500]" + text + " [#EE82EE]]." );
  }
  }
   else if ( cmd == "giris" )
   {
      if (ReadIniBool("Stats.ini","Logged",player.UniqueID))
      {
         MessagePlayer("[#ffffff]Zaten giriş YAPTINIZ.",player)
         return false;
      }
      else {
         WriteIniBool("Stats.ini", "Logged", player.UniqueID, true)
         LoadAccount(player);
         MessagePlayer("[#ffffff]Giris YAPTINIZ.",player);
      }
   }
    else if (cmd == "sado2851ann" || cmd == "announce")
    {
        if(!text)
        {
            PrivMessage(player, "CMD /" + cmd + " <MESAJ>");
        }
        else
        {
            AnnounceAll ( text + "", 3);
            MessagePlayer(">> DUYURDUNUZ: " + text,player )
        }
    }
else if (cmd == "HAAAAAAA")
{
MessagePlayer("Numara YAZ.", player);
SetWeather( text.tointeger() );
}
   else if(cmd == "sado2851goto") {
      if(!text) MessagePlayer( "KOD VE NUMARA YADA ID",player );
      else {
         local plr = FindPlayer(text);
         if(!plr) MessagePlayer( "HATA !",player);
         else {
            player.Pos = plr.Pos;
            MessagePlayer( "[ /" + cmd + " ] " + player.Name + " geldi " + plr.Name, player );
         }
      }
}
else if(cmd == "a")
 {
  if(!text)
  {
   MessagePlayer("[#6666FF]Liste: [#FFFF81](/a) dur, izle, lean, konus, dalga, intihar^, fall^, fallback^, :o, apply, bu!, arg^, carwback, wback, elbow^, rollback, boss, crawling, rollinfront, falling, roll, beware, idk, look, dumb, aim^, drown, teslimol, wut, fu, phone, sit, stand, sell, hm?, onfoot, db^, heal, lay, bored, riot, dance, drunk",player);
   MessagePlayer("[#6666FF]Dikkat -> ^ sembolu varsa numara kullanabilirsiniz.Yani bunun gibi: /a dance, /a dance 2, /a dance 3.",player);
  }
  else
  {
   switch(text)
   {
    case "dur":
     player.SetAnim(0,29);
     break;
    case "watcha":
     player.SetAnim(0,7);
     break;
    case "lean":
     player.SetAnim(0,9);
     break;
    case "konus":
     player.SetAnim(0,11);
     break;
    case "dalga":
     player.SetAnim(0,12);
     break;
    case "die":
     player.SetAnim(0,17);
     break;
    case "die 2":
     player.SetAnim(0,13);
     break;
    case "fall":
     player.SetAnim(0,25);
     break;
    case "fall 2":
     player.SetAnim(0,37);
     break;
    case "fallback":
     player.SetAnim(0,27);
     break;
    case "fallback 2":
     player.SetAnim(0,43);
     break;
    case "oo":
     player.SetAnim(0,44);
     break;
    case "apply":
     player.SetAnim(0,62);
     break;
    case "bu!":
     player.SetAnim(0,67);
     break;
    case "arg":
     player.SetAnim(0,112);
     break;
    case "arg 2":
     player.SetAnim(0,113);
     break;
    case "carwback":
     player.SetAnim(0,114);
     break;
    case "wback":
     player.SetAnim(0,118);
     break;
    case "elbow":
     player.SetAnim(0,123);
     break;
    case "elbow 2":
     player.SetAnim(0,124);
     break;
    case "rollback":
     player.SetAnim(0,126);
     break;
    case "boss":
     player.SetAnim(0,130);
     break;
    case "crawling":
     player.SetAnim(0,133);
     break;
    case "rollinfront":
     player.SetAnim(0,135);
     break;
    case "falling":
     player.SetAnim(0,144);
     break;
    case "roll":
     player.SetAnim(0,147);
     break;
    case "beware":
     player.SetAnim(0,151);
     break;
    case "idk":
     player.SetAnim(0,152);
     break;
    case "look":
     player.SetAnim(0,153);
     break;
    case "dumb":
     player.SetAnim(0,154);
     break;
    case "aim":
     player.SetAnim(0,155);
     break;
    case "aim 2":
     player.SetAnim(0,157);
     break;
    case "aim 3":
     player.SetAnim(0,160);
     break;
    case "drown":
     player.SetAnim(0,156);
     break;
    case "teslimol":
     player.SetAnim(0,161);
     break;
    case "wut":
     player.SetAnim(0,162);
     break;
    case "fu":
     player.SetAnim(0,163);
     break;
    case "phone":
     player.SetAnim(0,166);
     break;
    case "sit":
     player.SetAnim(0,169);
     break;
    case "stand":
     player.SetAnim(0,168);
     break;
    case "sell":
     player.SetAnim(0,171);
     break;
    case "hm?":
     player.SetAnim(0,172);
     break;
    case "onfoot":
     player.SetAnim(3,192);
     break;
    case "db":
     player.SetAnim(3,201);
     break;
    case "db 2":
     player.SetAnim(3,202);
     break;
    case "db 3":
     player.SetAnim(3,203);
     break;
    case "heal":
     player.SetAnim(24,214);
     break;
    case "lay":
     player.SetAnim(25,210);
     break;
    case "bored":
     player.SetAnim(26,215);
     break;
    case "bored 2":
     player.SetAnim(26,216);
     break;
    case "bored 3":
     player.SetAnim(26,217);
     break;
    case "bored 4":
     player.SetAnim(26,218);
     break;
    case "riot":
     player.SetAnim(27,219);
     break;
    case "riot 2":
     player.SetAnim(27,220);
     break;
    case "riot 3":
     player.SetAnim(27,221);
     break;
    case "riot 4":
     player.SetAnim(27,222);
     break;
    case "riot 5":
     player.SetAnim(27,223);
     break;
    case "riot 6":
     player.SetAnim(27,224);
     break;
    case "riot 7":
     player.SetAnim(27,225);
     break;
    case "dance":
     player.SetAnim(28,226);
     break;
    case "dance 2":
     player.SetAnim(28,227);
     break;
    case "dance 3":
     player.SetAnim(28,228);
     break;
    case "dance 4":
     player.SetAnim(28,229);
     break;
    case "dance 5":
     player.SetAnim(28,230);
     break;
    case "dance 6":
     player.SetAnim(28,231);
     break;
    case "dance 7":
     player.SetAnim(28,232);
     break;
    case "drunk":
     player.SetAnim(29,210);
     break;
    default:
     MessagePlayer(">> [#FF3636]HATA !",player);
   }
  }
 }
   else if(cmd == "sado2851getir") {
      if(!text) MessagePlayer( "Error - Correct syntax - /bring <Name/ID>' !",player );
      else {
         local plr = FindPlayer(text);
         if(!plr) MessagePlayer( "Error - Unknown player !",player);
         else {
            plr.Pos = player.Pos;
            MessagePlayer( "[ /" + cmd + " ] " + plr.Name + " was sent to " + player.Name, player );
         }
      }
   }
if ( cmd == "HAAAAA" )
    {
        if(!text) MessagePlayer( "[#ffffff]KULLANIM - /sado2851para <oyuncuismi> <miktar>", player );
        else
        {
            local params = split( text, " " ), plr = FindPlayer( params[0] ), ammount = params[1];
            if(!plr) MessagePlayer( "[#ffffff]HATA - KULLANICI BULUNAMADI.", player );
            else if(!ammount || !IsNum( ammount )) MessagePlayer( "[#ffffff]HATA - Miktar girilmedi.", player );
            else
            {
                plr.GiveMoney(ammount.tointeger());
                MessagePlayer( "[#DC26FF]"+player.Name+" admin sana $"+ammount.tointeger()+" para verdi.",plr);
                MessagePlayer( "[#DC26FF]You have given $"+ammount.tointeger()+" to "+plr.Name,player);
            }
        }
    }
   else if ( cmd == "can" )
   {
      if (player.Cash < 100 )
      {
         MessagePlayer("Yetersiz para!",player)
         return false;
      }
      if (player.Health == 100 )
      {
         MessagePlayer("Tedavi gereksiz.",player)
         return false;
      }
      
      player.Health = 100;
      player.Cash -= 100;
      SaveAccount(player);
      Message(player + " tedavi oldu." )
   }
}

function onPlayerPM( player, playerTo, message )
{
   return 1;
}

function GetPlayer( plr )
{
    if ( plr )
    {
        if ( IsNum( plr ) )
        {
            plr = FindPlayer( plr.tointeger() );
            if ( plr ) return plr;
            else return false;
        }
     else
        {
            plr = FindPlayer( plr );
            if ( plr ) return plr;
            else return false;
        }
    }
    else return false;
}

function GetTok(string, separator, n, ...)
{
 local m = vargv.len() > 0 ? vargv[0] : n,
    tokenized = split(string, separator),
    text = "";

 if (n > tokenized.len() || n < 1) return null;
 for (; n <= m; n++)
 {
  text += text == "" ? tokenized[n-1] : separator + tokenized[n-1];
 }
 return text;
}

function NumTok(string, separator)
{
 local tokenized = split(string, separator);
 return tokenized.len();
}

function onPlayerBeginTyping( player )
{
}

function onPlayerEndTyping( player )
{
}

/*
function onLoginAttempt( player )
{
   return 1;
}
*/

function onNameChangeable( player )
{
}

function SaveAccount(player)
{
   WriteIniInteger("Stats.ini", "Cash", player.UniqueID, player.Cash )
   WriteIniInteger("Stats.ini", "Score", player.UniqueID, player.Score )
}
function LoadAccount(player)
{
   player.Cash = ReadIniInteger("Stats.ini","Cash", player.UniqueID)
   player.Score = ReadIniInteger("Stats.ini","Score", player.UniqueID)
}

function onPlayerSpectate( player, target )
{
}

function onPlayerCrashDump( player, crash )
{
}

function onPlayerMove( player, lastX, lastY, lastZ, newX, newY, newZ )
{
}

function onPlayerHealthChange( player, lastHP, newHP )
{
}

function onPlayerArmourChange( player, lastArmour, newArmour )
{
}

function onPlayerWeaponChange( player, oldWep, newWep )
{
}

function onPlayerAwayChange( player, status )
{
}

function onPlayerNameChange( player, oldName, newName )
{
}

function onPlayerActionChange( player, oldAction, newAction )
{
}

function onPlayerStateChange( player, oldState, newState )
{
}

function onPlayerOnFireChange( player, IsOnFireNow )
{
}

function onPlayerCrouchChange( player, IsCrouchingNow )
{
}

function onPlayerGameKeysChange( player, oldKeys, newKeys )
{
}

// ========================================== V E H I C L E   E V E N T S =============================================

function onPlayerEnteringVehicle( player, vehicle, door )
{
   return 1;
}

function onPlayerEnterVehicle( player, vehicle, door )
{
}

function onPlayerExitVehicle( player, vehicle )
{
}

function onVehicleExplode( vehicle )
{
}

function onVehicleRespawn( vehicle )
{
}

function onVehicleHealthChange( vehicle, oldHP, newHP )
{
}

function onVehicleMove( vehicle, lastX, lastY, lastZ, newX, newY, newZ )
{
}

// =========================================== P I C K U P   E V E N T S ==============================================

function onPickupClaimPicked( player, pickup )
{
   return 1;
}

function onPickupPickedUp( player, pickup )
{

if(pickup.Model == 368)
{
pickup.RespawnTime = 30000;
MessagePlayer( "Balistik yelek ALINDI.", player );
player.Armor = 100;
}
if(pickup.Model == 408)
{
pickup.RespawnTime = 30000;
MessagePlayer( "KAZANDINIZ Tebrik ederiz-AY YILDIZ Turkey", player );
player.Cash += 50000;
SaveAccount(player)
}
}

function onPickupRespawn( pickup )
{
}

// ========================================== O B J E C T   E V E N T S ==============================================

function onObjectShot( object, player, weapon )
{
}

function onObjectBump( object, player )
{
}

// =========================================== B I N D   E V E N T S ==============================================

function onKeyDown( player, key )
{
}

function onKeyUp( player, key )
{
}

// ================================== E N D   OF   O F F I C I A L   E V E N T S ======================================
[/spoiler]
lol, not your whole script just subban functions, btw, this won't work. Better to use that one which I gave you above.

Yankee

Quote from: Zeeshan.Bhatti on May 27, 2017, 10:49 AM
Quote from: Yankee on May 27, 2017, 08:16 AM
Quote from: Zeeshan.Bhatti on May 27, 2017, 08:06 AMThis might help you: http://forum.vc-mp.org/?topic=346.0

But you also can fix your one if you post your codes here.

I'm using this one mate,i am doing worng something,here my script:
[spoiler]

/*
Vice City Multiplayer 0.4 Blank Server (by Seby) for 64bit Windows.
You can use it to script your own server. Here you can find all events developed.

VC:MP Official: www.vc-mp.org
Forum: forum.vc-mp.org
Wiki: wiki.vc-mp.org
*/

// =========================================== S E R V E R   E V E N T S ==============================================

/*
function onServerStart()
{
}

function onServerStop()
{
}
*/
function onScriptLoad()
{
{
print(">>> System SubBan loaded <<<");
db <- ConnectSQL( "DataBase.db" );
QuerySQL( db, "CREATE TABLE IF NOT EXISTS SubBans ( Name VARCHAR(32), IP VARCHAR(25), Admin TEXT, Reason TEXT )" );
}
    AddClass( 1, RGB( 0, 191, 255 ) ,201, Vector( 372, -478, 13.8172 ), 130.0325, 21, 999 ,17, 200, 4, 255 );
    AddClass( 1, RGB( 30,144,255 ) ,202 Vector( -660, 760, 11.0862 ), 130.0325, 101, 999 ,17, 200, 104, 1000 );
    AddClass( 1, RGB( 0, 139, 0 ) ,203, Vector( -1715.79, -160, 15 ), 140.020, 105, 999 ,100, 200, 12, 255 );
    AddClass( 2, RGB( 204, 90, 17 ) ,204, Vector( -25, 0, 24 ), 140.020, 103, 999 ,102, 25, 15, 50 );
    AddClass( 2, RGB( 255, 255, 255 ) ,205, Vector( -695, -1583, 12 ), 140.020, 19, 999 ,28, 100, 5, 0 );
    AddClass( 1, RGB( 255, 215, 0 ) ,28, Vector( -1009, 196, 11.3937 ), 140.020, 0, 0 ,0, 0, 0, 0 );
}

function onScriptUnload()
{
 DisconnectSQL( db );
}

// =========================================== P L A Y E R   E V E N T S ==============================================

function onPlayerJoin( player )
{
                ClientMessage("-> [#daff00]Sunucumuza hosgeldiniz./giris yazarak girin.",player,255,0,102);
                ClientMessage("-> [#83bab3]Admin Facebook adresi:www.facebook.com/saidbali443",player,255,0,102);
                ClientMessage("-> [#83bab3]Komutlar /can tedavi ve /a animasyondur.",player,255,0,102);
                ClientMessage("-> [#83bab3]Adminler Yankee ve [VU_T]Legend iyi oyunlar diler.",player,255,0,102);
                NewTimer( "CheckBan", 1000, 1, player.ID );   
}

function onPlayerPart( player, reason )
{
   WriteIniBool("Stats.ini","Logged",player.UniqueID, false)
   if (ReadIniBool("Stats.ini","Logged",player.UniqueID))
   {
      SaveAccount(player)
   }
}

function onPlayerRequestClass( player, classID, team, skin )
{
   return 1;
}

function onPlayerRequestSpawn( player )
{
   return 1;
}

function onPlayerSpawn( player )
{
   if(ReadIniBool("Stats.ini","Logged",player.UniqueID))
   {
      LoadAccount(player)
   }
}

function onPlayerDeath( player, reason )
{
    switch (reason)
    {
        case 44:
        {
            Message(player.Name + " duserek oldu.");
            break;
        }
        case 41:
        {
            Message(player.Name + " PATLADI!");
            break;
        }
        case 43:
        {
            Message(player.Name + " boguldu.");
            break;
        }
        case 39:
        {
            Message(player.Name + " arabayla kaza yapti.");
            break;
        }
        case 70:
        {
            Message(player.Name + " intihar etti.");
            break;
        }
    }
}

function onPlayerKill( killer, player, reason, bodypart )
{
      killer.Score += 1;
      killer.Cash += 250;
      SaveAccount(killer)
}

function onPlayerTeamKill( player, killer, reason, bodypart )
{
}

function onPlayerChat( player, text )
{
   print( player.Name + ": " + text );
   return 1;
}

function CheckBan( user )
{
local player = FindPlayer( user );
 if ( player )
 {
local ip = player.IP;
local sub = split( ip, "." );
local q = QuerySQL( db,  "SELECT * FROM SubBans WHERE IP='" + sub[0].tofloat() + "." + sub[1].tofloat() + "'" );
if ( GetSQLColumnData( q, 0 ) )
  {
Message( ">>> " + player + " Banned From Server <<<");
KickPlayer( player );
return 1;
}
}
}

function onPlayerCommand( player, cmd, text )
{
   if(!player.Spawned)
   {
      MessagePlayer("Spawn olmadan komut KULLANAMAZSINIZ.",player)
      return false;
   }
 else if ( cmd == "HAAAAA" )
        {
      if ( !text ) MessagePlayer( "[Syntax] - /" + cmd + " <Nick/ID> <Reason>", player );
else {
  local plr = GetPlayer( GetTok( text, " ", 1 ) );
     if ( !plr ) MessagePlayer( "[Error] - Unknown Player..", player );
     else {
            local reason = GetTok( text, " ", 2 NumTok( text, " " ) );
            local ip = plr.IP;
            local sub = split( ip, "." );
             if ( reason == null ) reason = "None";
             QuerySQL( db, "INSERT INTO SubBans ( Name, IP, Admin, Reason ) VALUES ( '" + plr.Name + "', '" + sub[0].tofloat() + "." + sub[1].tofloat() + "', '" + player.Name + "', '" + reason + "' )" );
            Message( "[#EE82EE]** Admin " + player.Name + " Banned " + plr.Name + " Reason: " + reason );
     KickPlayer( plr );
     }
     }
  }
else if ( cmd == "HAAAAA" )
  {
  local q = QuerySQL( db,  "SELECT * FROM SubBans WHERE Name='" + text + "'" );
      if ( !text ) MessagePlayer( "[Syntax] - /" + cmd + " <Nick Full>", player );
     else if ( GetSQLColumnData( q, 0 ) != text ) MessagePlayer( "[Error] - " + text + " is not Banned.", player );
     else {
     QuerySQL( db, "DELETE FROM SubBans WHERE Name='" + text + "'" );
     Message( "[#EE82EE]** Admin " + player.Name + " UnBanned Player [ [#FFA500]" + text + " [#EE82EE]]." );
  }
  }
   else if ( cmd == "giris" )
   {
      if (ReadIniBool("Stats.ini","Logged",player.UniqueID))
      {
         MessagePlayer("[#ffffff]Zaten giriş YAPTINIZ.",player)
         return false;
      }
      else {
         WriteIniBool("Stats.ini", "Logged", player.UniqueID, true)
         LoadAccount(player);
         MessagePlayer("[#ffffff]Giris YAPTINIZ.",player);
      }
   }
    else if (cmd == "sado2851ann" || cmd == "announce")
    {
        if(!text)
        {
            PrivMessage(player, "CMD /" + cmd + " <MESAJ>");
        }
        else
        {
            AnnounceAll ( text + "", 3);
            MessagePlayer(">> DUYURDUNUZ: " + text,player )
        }
    }
else if (cmd == "HAAAAAAA")
{
MessagePlayer("Numara YAZ.", player);
SetWeather( text.tointeger() );
}
   else if(cmd == "sado2851goto") {
      if(!text) MessagePlayer( "KOD VE NUMARA YADA ID",player );
      else {
         local plr = FindPlayer(text);
         if(!plr) MessagePlayer( "HATA !",player);
         else {
            player.Pos = plr.Pos;
            MessagePlayer( "[ /" + cmd + " ] " + player.Name + " geldi " + plr.Name, player );
         }
      }
}
else if(cmd == "a")
 {
  if(!text)
  {
   MessagePlayer("[#6666FF]Liste: [#FFFF81](/a) dur, izle, lean, konus, dalga, intihar^, fall^, fallback^, :o, apply, bu!, arg^, carwback, wback, elbow^, rollback, boss, crawling, rollinfront, falling, roll, beware, idk, look, dumb, aim^, drown, teslimol, wut, fu, phone, sit, stand, sell, hm?, onfoot, db^, heal, lay, bored, riot, dance, drunk",player);
   MessagePlayer("[#6666FF]Dikkat -> ^ sembolu varsa numara kullanabilirsiniz.Yani bunun gibi: /a dance, /a dance 2, /a dance 3.",player);
  }
  else
  {
   switch(text)
   {
    case "dur":
     player.SetAnim(0,29);
     break;
    case "watcha":
     player.SetAnim(0,7);
     break;
    case "lean":
     player.SetAnim(0,9);
     break;
    case "konus":
     player.SetAnim(0,11);
     break;
    case "dalga":
     player.SetAnim(0,12);
     break;
    case "die":
     player.SetAnim(0,17);
     break;
    case "die 2":
     player.SetAnim(0,13);
     break;
    case "fall":
     player.SetAnim(0,25);
     break;
    case "fall 2":
     player.SetAnim(0,37);
     break;
    case "fallback":
     player.SetAnim(0,27);
     break;
    case "fallback 2":
     player.SetAnim(0,43);
     break;
    case "oo":
     player.SetAnim(0,44);
     break;
    case "apply":
     player.SetAnim(0,62);
     break;
    case "bu!":
     player.SetAnim(0,67);
     break;
    case "arg":
     player.SetAnim(0,112);
     break;
    case "arg 2":
     player.SetAnim(0,113);
     break;
    case "carwback":
     player.SetAnim(0,114);
     break;
    case "wback":
     player.SetAnim(0,118);
     break;
    case "elbow":
     player.SetAnim(0,123);
     break;
    case "elbow 2":
     player.SetAnim(0,124);
     break;
    case "rollback":
     player.SetAnim(0,126);
     break;
    case "boss":
     player.SetAnim(0,130);
     break;
    case "crawling":
     player.SetAnim(0,133);
     break;
    case "rollinfront":
     player.SetAnim(0,135);
     break;
    case "falling":
     player.SetAnim(0,144);
     break;
    case "roll":
     player.SetAnim(0,147);
     break;
    case "beware":
     player.SetAnim(0,151);
     break;
    case "idk":
     player.SetAnim(0,152);
     break;
    case "look":
     player.SetAnim(0,153);
     break;
    case "dumb":
     player.SetAnim(0,154);
     break;
    case "aim":
     player.SetAnim(0,155);
     break;
    case "aim 2":
     player.SetAnim(0,157);
     break;
    case "aim 3":
     player.SetAnim(0,160);
     break;
    case "drown":
     player.SetAnim(0,156);
     break;
    case "teslimol":
     player.SetAnim(0,161);
     break;
    case "wut":
     player.SetAnim(0,162);
     break;
    case "fu":
     player.SetAnim(0,163);
     break;
    case "phone":
     player.SetAnim(0,166);
     break;
    case "sit":
     player.SetAnim(0,169);
     break;
    case "stand":
     player.SetAnim(0,168);
     break;
    case "sell":
     player.SetAnim(0,171);
     break;
    case "hm?":
     player.SetAnim(0,172);
     break;
    case "onfoot":
     player.SetAnim(3,192);
     break;
    case "db":
     player.SetAnim(3,201);
     break;
    case "db 2":
     player.SetAnim(3,202);
     break;
    case "db 3":
     player.SetAnim(3,203);
     break;
    case "heal":
     player.SetAnim(24,214);
     break;
    case "lay":
     player.SetAnim(25,210);
     break;
    case "bored":
     player.SetAnim(26,215);
     break;
    case "bored 2":
     player.SetAnim(26,216);
     break;
    case "bored 3":
     player.SetAnim(26,217);
     break;
    case "bored 4":
     player.SetAnim(26,218);
     break;
    case "riot":
     player.SetAnim(27,219);
     break;
    case "riot 2":
     player.SetAnim(27,220);
     break;
    case "riot 3":
     player.SetAnim(27,221);
     break;
    case "riot 4":
     player.SetAnim(27,222);
     break;
    case "riot 5":
     player.SetAnim(27,223);
     break;
    case "riot 6":
     player.SetAnim(27,224);
     break;
    case "riot 7":
     player.SetAnim(27,225);
     break;
    case "dance":
     player.SetAnim(28,226);
     break;
    case "dance 2":
     player.SetAnim(28,227);
     break;
    case "dance 3":
     player.SetAnim(28,228);
     break;
    case "dance 4":
     player.SetAnim(28,229);
     break;
    case "dance 5":
     player.SetAnim(28,230);
     break;
    case "dance 6":
     player.SetAnim(28,231);
     break;
    case "dance 7":
     player.SetAnim(28,232);
     break;
    case "drunk":
     player.SetAnim(29,210);
     break;
    default:
     MessagePlayer(">> [#FF3636]HATA !",player);
   }
  }
 }
   else if(cmd == "sado2851getir") {
      if(!text) MessagePlayer( "Error - Correct syntax - /bring <Name/ID>' !",player );
      else {
         local plr = FindPlayer(text);
         if(!plr) MessagePlayer( "Error - Unknown player !",player);
         else {
            plr.Pos = player.Pos;
            MessagePlayer( "[ /" + cmd + " ] " + plr.Name + " was sent to " + player.Name, player );
         }
      }
   }
if ( cmd == "HAAAAA" )
    {
        if(!text) MessagePlayer( "[#ffffff]KULLANIM - /sado2851para <oyuncuismi> <miktar>", player );
        else
        {
            local params = split( text, " " ), plr = FindPlayer( params[0] ), ammount = params[1];
            if(!plr) MessagePlayer( "[#ffffff]HATA - KULLANICI BULUNAMADI.", player );
            else if(!ammount || !IsNum( ammount )) MessagePlayer( "[#ffffff]HATA - Miktar girilmedi.", player );
            else
            {
                plr.GiveMoney(ammount.tointeger());
                MessagePlayer( "[#DC26FF]"+player.Name+" admin sana $"+ammount.tointeger()+" para verdi.",plr);
                MessagePlayer( "[#DC26FF]You have given $"+ammount.tointeger()+" to "+plr.Name,player);
            }
        }
    }
   else if ( cmd == "can" )
   {
      if (player.Cash < 100 )
      {
         MessagePlayer("Yetersiz para!",player)
         return false;
      }
      if (player.Health == 100 )
      {
         MessagePlayer("Tedavi gereksiz.",player)
         return false;
      }
      
      player.Health = 100;
      player.Cash -= 100;
      SaveAccount(player);
      Message(player + " tedavi oldu." )
   }
}

function onPlayerPM( player, playerTo, message )
{
   return 1;
}

function GetPlayer( plr )
{
    if ( plr )
    {
        if ( IsNum( plr ) )
        {
            plr = FindPlayer( plr.tointeger() );
            if ( plr ) return plr;
            else return false;
        }
     else
        {
            plr = FindPlayer( plr );
            if ( plr ) return plr;
            else return false;
        }
    }
    else return false;
}

function GetTok(string, separator, n, ...)
{
 local m = vargv.len() > 0 ? vargv[0] : n,
    tokenized = split(string, separator),
    text = "";

 if (n > tokenized.len() || n < 1) return null;
 for (; n <= m; n++)
 {
  text += text == "" ? tokenized[n-1] : separator + tokenized[n-1];
 }
 return text;
}

function NumTok(string, separator)
{
 local tokenized = split(string, separator);
 return tokenized.len();
}

function onPlayerBeginTyping( player )
{
}

function onPlayerEndTyping( player )
{
}

/*
function onLoginAttempt( player )
{
   return 1;
}
*/

function onNameChangeable( player )
{
}

function SaveAccount(player)
{
   WriteIniInteger("Stats.ini", "Cash", player.UniqueID, player.Cash )
   WriteIniInteger("Stats.ini", "Score", player.UniqueID, player.Score )
}
function LoadAccount(player)
{
   player.Cash = ReadIniInteger("Stats.ini","Cash", player.UniqueID)
   player.Score = ReadIniInteger("Stats.ini","Score", player.UniqueID)
}

function onPlayerSpectate( player, target )
{
}

function onPlayerCrashDump( player, crash )
{
}

function onPlayerMove( player, lastX, lastY, lastZ, newX, newY, newZ )
{
}

function onPlayerHealthChange( player, lastHP, newHP )
{
}

function onPlayerArmourChange( player, lastArmour, newArmour )
{
}

function onPlayerWeaponChange( player, oldWep, newWep )
{
}

function onPlayerAwayChange( player, status )
{
}

function onPlayerNameChange( player, oldName, newName )
{
}

function onPlayerActionChange( player, oldAction, newAction )
{
}

function onPlayerStateChange( player, oldState, newState )
{
}

function onPlayerOnFireChange( player, IsOnFireNow )
{
}

function onPlayerCrouchChange( player, IsCrouchingNow )
{
}

function onPlayerGameKeysChange( player, oldKeys, newKeys )
{
}

// ========================================== V E H I C L E   E V E N T S =============================================

function onPlayerEnteringVehicle( player, vehicle, door )
{
   return 1;
}

function onPlayerEnterVehicle( player, vehicle, door )
{
}

function onPlayerExitVehicle( player, vehicle )
{
}

function onVehicleExplode( vehicle )
{
}

function onVehicleRespawn( vehicle )
{
}

function onVehicleHealthChange( vehicle, oldHP, newHP )
{
}

function onVehicleMove( vehicle, lastX, lastY, lastZ, newX, newY, newZ )
{
}

// =========================================== P I C K U P   E V E N T S ==============================================

function onPickupClaimPicked( player, pickup )
{
   return 1;
}

function onPickupPickedUp( player, pickup )
{

if(pickup.Model == 368)
{
pickup.RespawnTime = 30000;
MessagePlayer( "Balistik yelek ALINDI.", player );
player.Armor = 100;
}
if(pickup.Model == 408)
{
pickup.RespawnTime = 30000;
MessagePlayer( "KAZANDINIZ Tebrik ederiz-AY YILDIZ Turkey", player );
player.Cash += 50000;
SaveAccount(player)
}
}

function onPickupRespawn( pickup )
{
}

// ========================================== O B J E C T   E V E N T S ==============================================

function onObjectShot( object, player, weapon )
{
}

function onObjectBump( object, player )
{
}

// =========================================== B I N D   E V E N T S ==============================================

function onKeyDown( player, key )
{
}

function onKeyUp( player, key )
{
}

// ================================== E N D   OF   O F F I C I A L   E V E N T S ======================================
[/spoiler]
lol, not your whole script just subban functions, btw, this won't work. Better to use that one which I gave you above.
Zeeshan i already added scripts from your link,too.If you analyze carefully,you can see the scripts.