08.10.2012, 13:34
pawn Код:
C:\Users\carlo\Desktop\SA-MP Server\trucking\filterscripts\WindAdmin.pwn(621) : warning 225: unreachable code
C:\Users\carlo\Desktop\SA-MP Server\trucking\filterscripts\WindAdmin.pwn(624) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\carlo\Desktop\SA-MP Server\trucking\filterscripts\WindAdmin.pwn(612) : warning 204: symbol is assigned a value that is never used: "str"
C:\Users\carlo\Desktop\SA-MP Server\trucking\filterscripts\WindAdmin.pwn(611) : warning 203: symbol is never used: "id"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Warnings.
pawn Код:
CMD:report(playerid,params[])
{
new id, reported;
new str[256];
new tmp[256];
if(isnull(params)) return
SendClientMessage(playerid, LIGHTBLUE2, "Usage: /report [PlayerID] [Reason]") &&
SendClientMessage(playerid, orange, "Attention: Not report anyone without Reason!");
if(IsPlayerConnected(reported) && reported != INVALID_PLAYER_ID)
{
return SendClientMessage(playerid,red,"ERROR: You cannot report this Administrator");
if(playerid == reported) return SendClientMessage(playerid , red, "ERROR: You Cannot report Yourself");
if(strlen(params) > 7)
{
new reportedname[MAX_PLAYER_NAME], reporter[MAX_PLAYER_NAME], str[128];
new hour, minute, second;
gettime(hour,minute, second);
GetPlayerName(reported, reportedname, sizeof(reportedname));
GetPlayerName(playerid, reporter, sizeof(reporter));
format(str, sizeof(str), "REPORT: %s (Id:%d) Reported %s(Id:%d) Reason: %s |Time: %d : %d : %d|", reporter,playerid,reportedname,reported,params[strlen(tmp)+1], hour,minute,second);
MessageToAdmins(COLOR_WHITE,str);
SaveIn("ReportLog",str);
format(str, sizeof(str), "(%d : %d : %d): %s(Id:%d) Reported %s(Id:%d) Reason: %s", hour,minute,second, reporter,playerid, reportedname, reported, params[strlen(tmp)+1]);
return SendClientMessage(playerid,yellow, "|- Your report has been sent to Online Administrators and saved in File! -|");
}
}
return 1;
}