Sscanf Warning
#2

pawn Код:
dcmd_pm(playerid,params[])
{
    new id,message[128],string[128],name[MAX_PLAYER_NAME];
    if(sscanf(params,"us[128]",id,message)) SendClientMessage(playerid,0x00FF00AA,"Usage: /pm [id] [Message]");
    else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid,0x00FF00AA,"Player Not Connected");
    else {
    GetPlayerName(playerid,name,sizeof(name));
    format(string,sizeof(string),"PM From %s (%i) -%s",name,playerid,message);
    SendClientMessage(id,0x00FF00AA,string);
   
    }
    return 1;
}


Try that .
Reply


Messages In This Thread
Sscanf Warning - by CSSI - 04.08.2011, 08:05
Re: Sscanf Warning - by Jack_Leslie - 04.08.2011, 08:09
Re: Sscanf Warning - by CSSI - 04.08.2011, 08:12
Re: Sscanf Warning - by Famalamalam - 04.08.2011, 08:22

Forum Jump:


Users browsing this thread: 1 Guest(s)