CMD:report(playerid,params[]){
new string[128],id,reason;
if(sscanf(params,"us",id,reason)) return SendClientMessage(playerid,COLOR_GRAY,"SYNTAX: /report [id] [reason]");
else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GRAY, "ERROR: Player is not connected!");
format(string,sizeof(string),"%s has reported %s: %s",GetName(playerid),GetName(id),reason);
SendToAdmins(COLOR_YELLOW,string);
return 1;
}
I posted earlier and I needed help to send a message to admins, Iv figured that out but now I get this wierd error me and my friend cant figure out..
pawn Код:
But If I Type /report 0 t it works.. any one know why? |
CMD:report(playerid,params[]){
new string[128],id,reason;
if(sscanf(params,"us[128]",id,reason)) return SendClientMessage(playerid,COLOR_GRAY,"SYNTAX: /report [id] [reason]");
else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GRAY, "ERROR: Player is not connected!");
format(string,sizeof(string),"%s has reported %s: %s",GetName(playerid),GetName(id),reason);
SendToAdmins(COLOR_YELLOW,string);
return 1;
}
CMD:report(playerid, params[]) } if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /report [text]"); JustReported[playerid]=25; SendReportToQue(playerid, params); SendClientMessageEx(playerid, COLOR_YELLOW, "Your report message was sent to the Admins."); return 1;
if(sscanf(params,"us[128]",id,reason)) return SendClientMessage(playerid,COLOR_GRAY,"SYNTAX: /report [id] [reason]");
Test this one?
Код:
CMD:report(playerid, params[]) } if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /report [text]"); JustReported[playerid]=25; SendReportToQue(playerid, params); SendClientMessageEx(playerid, COLOR_YELLOW, "Your report message was sent to the Admins."); return 1; |
CMD:report(playerid,params[])
{
new string[128], id, reason[35];
if(sscanf(params,"us[35]",id,reason)) return SendClientMessage(playerid,COLOR_GRAY,"SYNTAX: /report [id] [reason]");
if(id == INVALID_PLAYER_ID)) return SendClientMessage(playerid, COLOR_GRAY, "ERROR: Player is not connected!");
format(string,sizeof(string),"%s has reported %s: %s",GetName(playerid),GetName(id),reason);
SendToAdmins(COLOR_YELLOW,string);
return 1;
}
CMD:report(playerid,params[])
{
new string[128],id,reason[128];
new reportername[MAX_PLAYER_NAME],hackername[MAX_PLAYER_NAME];
GetPlayerName(playerid,reportername,sizeof(string));
GetPlayerName(id,hackername,sizeof(string));
if(sscanf(params,"us",id,reason)) return SendClientMessage(playerid,COLOR_RED,"ERROR: /report <Playername/id> <Reason>");
else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected!");
format(string,sizeof(string),"REPORT: %s has reported %s <Reason: %s>",reportername,hackername,reason);
MessageToAdmins(COLOR_YELLOW,string);
return 1;
}
CMD:report(playerid,params[]){
new string[128],id;
if(sscanf(params,"us",id,string)) return SendClientMessage(playerid,COLOR_GRAY,"SYNTAX: /report [id] [reason]");
else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GRAY, "ERROR: Player is not connected!");
format(string,sizeof(string),"%s has reported %s: %s",GetName(playerid),GetName(id),string);
SendToAdmins(COLOR_YELLOW,string);
return 1;
}