/report Command
#3

Код:
dcmd_report(playerid, params[])
{
new player, reason[30];

if(sscanf(params, "us", player, reason))
{
SendClientMessage(playerid, RED, "Type: /report [player ID or part of name [reason].");
return 1;
}

if(player == INVALID_PLAYER_ID)
{
SendClientMessage(playerid, RED, "Player not found.");
return 1;
}

new string[142], name1[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME];
GetPlayerName(playerid, name1, MAX_PLAYER_NAME);
GetPlayerName(player, name2, MAX_PLAYER_NAME);

format(string, 142, "Player %s (ID: %i) reports %s (ID: %i) . REASON: %s.", name1, playerid, name2, player, reason);

new bool:AdminOnline = false;

for(new player2; player2 < GetMaxPlayers(); player2++)
{
if(IsPlayerAdmin(player2))
{
SendClientMessage(player2, RED, string);
AdminOnline = true;
}
}

if(AdminOnline == false)
{
SendClientMessage(playerid, RED, "Niestety, aktualnie nie ma adminуw. Pisz na GG: 123456.");
}
else
{
SendClientMessage(playerid, YELLOW, "Zgłosiłeś raport.");
}
return 1;
}
Reply


Messages In This Thread
/report Command - by Kyle - 04.07.2009, 17:16
Re: /report Command - by Ignas1337 - 04.07.2009, 17:18
Re: /report Command - by YamahaYZ - 04.07.2009, 17:47

Forum Jump:


Users browsing this thread: 2 Guest(s)