Help with report cmd...
#2

Quote:
Originally Posted by Azzeto
Посмотреть сообщение
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 Код:
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;
}
When I go ingame and do /report 0 test it says Player not connected
But If I Type
/report 0 t it works.. any one know why?
Maybe because you haven't specified a length for the string(reason)?

PHP код:
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(playeridCOLOR_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;

Reply


Messages In This Thread
Help with report cmd... - by Azzeto - 11.10.2011, 10:00
Re: Help with report cmd... - by Kush - 11.10.2011, 10:03
Re: Help with report cmd... - by TheMaddox - 11.10.2011, 10:03
Re: Help with report cmd... - by Wesley221 - 11.10.2011, 10:04
Re: Help with report cmd... - by Kush - 11.10.2011, 10:05
Re: Help with report cmd... - by Azzeto - 11.10.2011, 10:08
Re: Help with report cmd... - by Jafet_Macario - 11.10.2011, 11:56
Re: Help with report cmd... - by GAMER_PS2 - 26.10.2011, 13:36
Re: Help with report cmd... - by i514x - 26.10.2011, 13:42
Re: Help with report cmd... - by SmiT - 26.10.2011, 14:19

Forum Jump:


Users browsing this thread: 1 Guest(s)