SA-MP Forums Archive
2 fast helps :D - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 2 fast helps :D (/showthread.php?tid=294631)



2 fast helps :D - vassilis - 02.11.2011

1stly what is wrong? i compiled it no errors/warnings however when i press the command in-game it shows this
PHP код:
Usage:/kick [id] [reason
code:
pawn Код:
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "ERROR:Only admins can use this command!");
   if(strcmp(cmd, "/kick", true) ==0) {
   new giveid, reason[128];
   if(sscanf(cmd, "rs[128]",giveid,reason))return SendClientMessage(playerid, -1, "Usage:/kick [id] [reason]");
   if(giveid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "ERROR:This player isn't connected!");
   else
   {
   new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,pName,sizeof(pName));
   new gname[MAX_PLAYER_NAME];
   GetPlayerName(giveid, gname, sizeof(gname));
   GetPlayerName(playerid, pName, sizeof(pName));
   format(string, sizeof(string), "ADMIN KICK : %s has been kicked From The Server ( Reason : %s)", gname,reason);
   SendClientMessageToAll(COLOR_PINK, string);
   Kick(giveid);
   }
   return 1;
   }
2ndly how i can add admin levels?


Re: 2 fast helps :D - vassilis - 02.11.2011

please help me