01.12.2012, 06:02
Hi.Today i have problem with /report command.When i use it i get the message Nick has report Nick.Reason:
pawn Код:
if(strcmp(cmd, "/report", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /report [Playerid] [text]");
return 1;
}
new para1;
new text;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
text = strval(tmp);
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "Your report has been send to all online admins");
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(string, sizeof(string), "%s has report %s.Reason:%s",giveplayer,PlayerName(playerid),text);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
}
}
}
}
return 1;
}