26.05.2013, 10:44
Hello!
I have another problem! I made the /report command and everything is ok, but an Admins don't get the report.
Code:
Thanks
I have another problem! I made the /report command and everything is ok, but an Admins don't get the report.
Code:
pawn Код:
CMD:report(playerid,params[])
{
new
name1[30],
name2[30],
targetid,
string[200],
reason[60];
if(sscanf(params, "us[60]", targetid, reason))return SCM(playerid, COLOR_GREY, "[USAGE]: /report [playerid] [reason]");
if(IsPlayerConnected(targetid))
{
SCM(playerid, COLOR_GREEN, "{80FF00}[Admin]: {00FF00}Your Report has been send to an online Administartor! Thank you for Reporting!");
for(new i = 0; i < MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i) && pInfo[i][Adminlevel] > 0)
{
GetPlayerName(playerid, name1, sizeof(name1));
GetPlayerName(targetid, name2, sizeof(name2));
format(string, sizeof(string), "{80FF00}[REPORT]: {FF0000}%s(ID:%d) {00FF00}has Reported {FF0000}%s (ID:%d){00FF00}! {FF0000}|| {00FF00}Reason: {FF0000}%s{00FF00}.", GetName(playerid), playerid, GetName(targetid), targetid, reason);
SCM(i, COLOR_GREEN, string);
GameTextForPlayer(i, "~w~New ~g~Report!", 3000, 5);
}
}
}
else
{
return SCM(playerid, COLOR_RED, "[ERROR]: This player is not connected!");
}
return 1;
}
