SA-MP Forums Archive
'/ban' shuts down the compiler! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: '/ban' shuts down the compiler! (/showthread.php?tid=90363)



'/ban' shuts down the compiler! - Antonio [G-RP] - 07.08.2009

Here the command...

pawn Код:
if(strcmp(cmdtext, "/ban", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_PURPLE, "USAGE: /ban [playerid] [reason]");
return 1;
}
new playa = strval(tmp);
new string[256];
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessage(playa, COLOR_RED, "You were banned from the server!");
format(string, sizeof(string), "[!] AdmCmd: %s Banned %s, Reason: %s",sendername, giveplayer, result);
SendClientMessageToAll(COLOR_ADMIN, string);
Ban(playa);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "[!] You cannot use this command!");
}
return 1;
}
When I try to compile, it closes down the compiler


Re: '/ban' shuts down the compiler! - Dark_Kostas - 07.08.2009

EDIT: Its working perfect for me. I tried it on my pawno


Re: '/ban' shuts down the compiler! - Antonio [G-RP] - 07.08.2009

Damn, its one command that keeps bugging the command below it. Thanks for your help