07.08.2009, 20:52
Here the command...
When I try to compile, it closes down the compiler
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;
}