[HELP] Report commands [SOLVED]
#1

Hello, I need help with the report command

pawn Код:
dcmd_report(playerid, text[]) {
  if(!strlen(text)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /report [id] [reason]");
  else{
      new string[ 256 ], playername[ MAX_PLAYER_NAME ], playername2[MAX_PLAYER_NAME];
      GetPlayerName(playerid, playername, sizeof(playername));
      GetPlayerName(playerid,playername2,sizeof(playername));
    format(string, sizeof(string), "%s(%d) reported %s(%d) Reason: %s", playername, playerid, playername2, playerid, text);
    add_Reportlog( string );
    SendAdminMessage(COLOR_RED, string);
    SendClientMessage(playerid, COLOR_GREEN, "[Succeeded] Report sent to currently online admins.");
  }
  return 1;
}
Everything works except, when I use /report 0 BlaBlaBla (when I report myself), it gives this income to admins; Player1(0) reported Player1(0) Reason: 0 BlaBlaBla

How can I remove that 0 before the text??

Also can anyone add if player id is not valid to send client message "Invalid ID" or something,
Thanks.
Reply


Messages In This Thread
[HELP] Report commands [SOLVED] - by leapfish - 14.02.2010, 12:19
Re: [HELP] Report commands - by leapfish - 14.02.2010, 13:11
Re: [HELP] Report commands - by kmzr - 14.02.2010, 13:14
Re: [HELP] Report commands - by leapfish - 14.02.2010, 13:19
Re: [HELP] Report commands - by DarkPower - 14.02.2010, 15:04
Re: [HELP] Report commands - by leapfish - 14.02.2010, 15:23
Re: [HELP] Report commands - by kLx - 14.02.2010, 16:04
Re: [HELP] Report commands - by leapfish - 14.02.2010, 16:20

Forum Jump:


Users browsing this thread: 1 Guest(s)