'/ban' shuts down the compiler!
#1

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
Reply
#2

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)