04.01.2014, 11:32
Ok guys, so i've tried both, changing from "d" to "ds" or "uds" or just "ud"
but none of them worked, when I try to use the cmd IG, it crashes my server.
but none of them worked, when I try to use the cmd IG, it crashes my server.
Код HTML:
CMD:warn(playerid, params[]) { if(PInfo[playerid][Level] >= 1) { { new name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME],string[128],id,reason[64]; if(sscanf(params,"us[125]",id,reason)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /warn [playerid] [reason]"); GetPlayerName(id,name, sizeof(name)); GetPlayerName(playerid,name2, sizeof(name2)); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "SERVER: User is not connected."); format(string, sizeof(string), "%s has been warned by %s %s [Reason: %s]",name2, aLevel(playerid), name, reason); SendClientMessageToAll(COLOR_RED,string); SendClientMessage(id, COLOR_RED, "SERVER: You warned by %s, please avoid to rulebreak again.", name); } } else { SendClientMessage(playerid, COLOR_RED, "You are not admin level 1."); } return 1; }