09.03.2013, 13:56
Код:
sscanf warning: Strings without a length are deprecated, please add a destination size.
Код:
CMD:freeze(playerid,params[]) { if(pInfo[playerid][pLogged] == 1) { if(pInfo[playerid][pAdminLevel] >= 1) { if(IsPlayerConnected(playerid)) { new id, grund, str[667]; if(sscanf(params,"us",id,grund)) return SendClientMessage(playerid,COLOR_RED,"Usage: /freeze <player> <reason>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Player is not connected!"); format(str,144,"{00CC66}» %s has been freezed! [Reason: %s]",PlayerName(id),grund); SendClientMessageToAll(-1,str); TogglePlayerControllable(id,0); } } else { SendClientMessage(playerid,-1,""chat""COL_GRUEN" You have not the sufficient privileges to use this command."); } } else { SendClientMessage(playerid,-1,""chat" You are not logged in!"); Kick(playerid); } return 1; }