11.05.2009, 16:18
You have to use
And at the
Take the ",rest" out.
Here is the code, i think it should work
Код:
ID = ReturnUser(cmdtext[6]);
Код:
format(str, 64, "%s has been banned from the server for: %s", pName,rest);
Here is the code, i think it should work
pawn Код:
else if(strcmp(cmdtext, "/ban", true, 5)==0)
{
if(!IsPlayerAdmin(playerid)) return 0;
if(!strlen(cmdtext[6]))
{
SendClientMessage(playerid, COLOR_ORED, "Usage: /ban [playerid] [reason]");
return 1;
}
new ID = ReturnUser(cmdtext[6]);
new pName[24], str[64];
if(IsPlayerConnected(ID))
{
GetPlayerName(ID, pName, 24);
format(str, 64, "%s has been banned from the server for: ", pName);
SendClientMessageToAll(COLOR_ORED, str);
print("Player banned");
Ban(ID);
}
return 1;
}