Quote:
Originally Posted by Anthony ©
pawn Код:
CMD:ban(playerid, params[]) { new pID, reason[68], msg[128], name[MAX_PLAYER_NAME], bannername[MAX_PLAYER_NAME]; if(sscanf(params, "us", pID, reason)) return SendClientMessage(playerid, 0xDF0000FF, "USAGE: /ban [playerid] [reason]"); { GetPlayerName(pID, name, sizeof(name)); GetPlayerName(pID, bannername, sizeof(bannername)); format(msg, sizeof(msg), "[AdmCmd]: %s has been banned by %s, reason: %s", name, bannername, reason); SendClientMessageToAll(0xDF0000FF, msg); BanEx(pID, reason); } return 1; }
|
pawn Код:
if(sscanf(params, "us", pID, reason))
You will get a warning in the Console.
It should be:
pawn Код:
if(sscanf(params, "us[68]", pID, reason))
If you need help(topic creator) tell me and I'll help you.