[HELP] Report commands [SOLVED]
#5

Код:
dcmd_report(playerid,params[])
{
	if(PlayerInfo[playerid][LoggedIn] != 1) return SendClientMessage(playerid, COLOR_RED, "You must be loged in");

	new tmp[256], tmp2[256], Index;
	tmp = strtok(params,Index), tmp2 = strtok(params,Index);

	new kohde;
	kohde = strval(tmp);

	if(!strlen(tmp)) return SendClientMessage(playerid, 0xB4B4B4FF, "Use: /report [ID] [reason]");
	if(!strlen(tmp2)) return SendClientMessage(playerid, 0xB4B4B4FF, "Use: /report [ID] [reason]");
	if(!IsPlayerConnected(kohde)) SendClientMessage(playerid, 0xB4B4B4FF, "Wrong ID");
	if(playerid == kohde) return SendClientMessage(playerid, 0xB4B4B4FF, "You cant report yourself -.-");

	new string[128];

	format(string, sizeof(string), "New report %s(%d) has reported %s(%d), reason: %s", PlayerName(playerid), playerid, PlayerName(kohde), kohde, params[2]);
	SendMessageToAdmins(0xFF0000FF, string);

	SendClientMessage(playerid, 0xB4B4B4FF, "Your report is sended to online admins");

	PlayerPlaySound(playerid,1057,0.0,0.0,0.0);

	return 1;
}
try this
Reply


Messages In This Thread
[HELP] Report commands [SOLVED] - by leapfish - 14.02.2010, 12:19
Re: [HELP] Report commands - by leapfish - 14.02.2010, 13:11
Re: [HELP] Report commands - by kmzr - 14.02.2010, 13:14
Re: [HELP] Report commands - by leapfish - 14.02.2010, 13:19
Re: [HELP] Report commands - by DarkPower - 14.02.2010, 15:04
Re: [HELP] Report commands - by leapfish - 14.02.2010, 15:23
Re: [HELP] Report commands - by kLx - 14.02.2010, 16:04
Re: [HELP] Report commands - by leapfish - 14.02.2010, 16:20

Forum Jump:


Users browsing this thread: 3 Guest(s)