14.02.2010, 12:19
Hello, I need help with the report command
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.
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;
}
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.