command report
#1

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;
}
Reply


Messages In This Thread
command report - by nigga'z - 16.12.2011, 10:38
Re : command report - by BigBaws - 16.12.2011, 10:41
Re: Re : command report - by nigga'z - 16.12.2011, 11:21
Re: command report - by Jack_Leslie - 16.12.2011, 11:24
Re: command report - by nigga'z - 16.12.2011, 11:25
Re: command report - by Michael@Belgium - 16.12.2011, 13:27
Re: command report - by BlackWolf120 - 16.12.2011, 13:31

Forum Jump:


Users browsing this thread: 2 Guest(s)