06.01.2011, 15:13
Well, yesterday I started making mAdmin (MeanAdmin) and I have done 1k lines already, but I got a little problem with my /report command:
And my reason says: reason: 0
Asking for help
pawn Код:
dcmd_report(playerid, params[])
{
new tmp[256];
new tmp2[256];
new Index;
tmp = strtok(params, Index);
tmp2 = strtok(params, Index);
new id = strval(tmp);
new reason = strval(tmp2);
new string[128];
new reporter[MAX_PLAYER_NAME], reported[MAX_PLAYER_NAME];
GetPlayerName(playerid, reporter, MAX_PLAYER_NAME);
GetPlayerName(id, reported, MAX_PLAYER_NAME);
format(string, 128, "[REPORT] [%d]%s reported [%d]%s || reason: %d", playerid, reporter, id, reported, reason);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PInfo[i][Level] >= 1)
{
SendClientMessage(i, LIGHTBLUE, string);
}
}
return 1;
}
Asking for help