15.05.2014, 03:47
dude I will kill you ! Isplayeradmin! whats this! here is mine edit it
this one somewhere in your gm
and this one is like anti spam
you will something called Level change it to your admin system ! and there is something called message to admins here its is define it
if I help +rep
this one somewhere in your gm
pawn Код:
new Reports[MAX_REPORTS][128];
pawn Код:
#define MAX_REPORTS 7
pawn Код:
dcmd_report(playerid, params[]) {
new reported, tmp[128], tmp2[128], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /report [playerid] [reason]");
reported = strval(tmp);
if(IsPlayerConnected(reported) && reported != INVALID_PLAYER_ID) {
if(PlayerInfo[reported][Level] == ServerInfo[MaxAdminLevel]) 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], hour,minute,second; gettime(hour,minute,second);
GetPlayerName(reported, reportedname, sizeof(reportedname)); GetPlayerName(playerid, reporter, sizeof(reporter));
format(str, sizeof(str), "||NewReport|| %s(%d) reported %s(%d) Reason: %s |@%d:%d:%d|", reporter,playerid, reportedname, reported, params[strlen(tmp)+1], hour,minute,second);
MessageToAdmins(COLOR_WHITE,str);
SaveToFile("ReportLog",str);
format(str, sizeof(str), "Report(%d:%d:%d): %s(%d) reported %s(%d) Reason: %s", hour,minute,second, reporter,playerid, reportedname, reported, params[strlen(tmp)+1]);
for(new i = 1; i < MAX_REPORTS-1; i++) Reports[i] = Reports[i+1];
Reports[MAX_REPORTS-1] = str;
return SendClientMessage(playerid,yellow, "Your report has been sent to online administrators.");
} else return SendClientMessage(playerid,red,"ERROR: Must be a valid reason");
} else return SendClientMessage(playerid, red, "Player is not connected");}
pawn Код:
forward MessageToAdmins(color,const string[]);
public MessageToAdmins(color,const string[]){
for(new i = 0; i < MAX_PLAYERS; i++){
if(IsPlayerConnected(i) == 1) if (PlayerInfo[i][Level] >= 1) SendClientMessage(i, color, string);}
return 1;}