01.12.2012, 06:49
The problem with your code is here :
It should be string.
Also make sure
Solution
Код:
new text;
Also make sure
Код:
stock PlayerName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,MAX_PLAYER_NAME); return name; }
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[50];
para1 = ReturnUser(tmp);
text = strtok(cmdtext, idx);
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
format(string, sizeof(string), "Your report has been send to all online admins");
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "%s has report %s.Reason:%s",PlayerName(para1),PlayerName(playerid),text);
for(new i =0;i<MAX_PLAYERS;++i)
if(PlayerInfo[i][pAdmin] >= 1 && IsPlayerConnected(i))
{
SendClientMessage(i, COLOR_LIGHTBLUE, string);
}
}
}
}
return 1;
}