26.11.2011, 12:13
Код:
CMD:kick(playerid, params[]) { new string[128], giveplayerid, adminname[MAX_PLAYER_NAME], playername[MAX_PLAYER_NAME], reason[50]; if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COL_GREY, "You are not authorized for that command!"); else if(sscanf(params, "rs[50]", giveplayerid, reason)) return SendClientMessage(playerid, COL_GREY, "[SYNTAX]: /kick [ID/PartOfName] [10.chars.max] [50.chars.max]"); else if(!IsPlayerConnected(giveplayerid) || giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COL_GREY, "Invalid playerid!"); else { format(string, sizeof(string), "SERVER: %s have been kicked by %s, reason: %s.", playername, adminname, reason); SendClientMessageToAll(COL_RED, string); Kick(giveplayerid); } return 1; }
Код:
C:\Users\admin\Desktop\Server\gamemodes\Server.pwn(744) : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Код:
SendClientMessageToAll(COL_RED, string);