03.02.2011, 14:43
Код:
CMD:accept(playerid, params) { new id,name[MAX_PLAYERS], query[128],string[128]; if(sscanf(params,"u",id)) return SendClientMessage(playerid, red, "USAGE:/accept [id]"); if(leader[playerid]<1) return SendClientMessage(playerid, red, "Your not a leader."); if(req[id] != org[playerid]) return SendClientMessage(playerid, red, "The player is not requesting to join your org."); GetPlayerName(playerid, Name, sizeof(Name)); GetPlayerName(id,name,sizeof(name)); format(query,sizeof(query), "UPDATE ostats SET org=%d, req=0 WHERE name='%s'",org[playerid],name); format(string, sizeof(string), "Your application for %s has been accepted.",oname[playerid]); SendClientMessage(id, COLOR_ORANGE, string); new string1[128]; format(string1, 128, "You have accepted %s into your organisation.",name); SendClientMessage(playerid, COLOR_ORANGE, string1); return 1; }
line:
if(sscanf(params,"u",id)) return SendClientMessage(playerid, red, "USAGE:/accept [id]");