16.12.2011, 10:38
I need help on how to make a command in the dialog?
Код:
CMD:report(playerid, params[]) { new pID,pMsg[128],reason[128]; if(sscanf(params, "us[128]", pID, reason)) return SendClientMessage(playerid, -1, "Usage: /report [id] [reason]"); else if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Invalid ID."); else if(pID == playerid) return SendClientMessage(playerid, -1, "You can't report yourself."); else { foreach(Player, a) { if(GetPVarInt(a, "Admin") >= 1) { format(pMsg, sizeof(pMsg), "Report: %s [%i] has reported %s [%i].", GetName(playerid), playerid, GetName(pID), pID); SendClientMessage(a, -1, pMsg); format(pMsg, sizeof(pMsg), "-%s", reason); SendClientMessage(a,-1, pMsg); } } } return 1; }