sscanf id bug
#4

Try this.

Код:
CMD:pm(playerid, params[]) 
{ 
    new str[128], text[128], targetid; 
    if(sscanf(params, "us", targetid, text)) return SendClientMessage(playerid, -1, "{8EB2D6}SERVER:{FFFFFF} /pm [player] [text]"); 
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "{8EB2D6}SERVER:{FFFFFF} Player isn't connected!"); 
	if(playerid == targetid) return SendClientMessage(playerid,-1,"{FF0000}You can't pm yourself.");
    format(str, sizeof(str), "PM to %s (%d): %s", GetName(targetid), targetid, text); 
    SendClientMessage(playerid, 0xE0E800FF, str); 
    format(str, sizeof(str), "PM from %s (%d): %s", GetName(playerid), playerid, text); 
    SendClientMessage(targetid, 0xE8C900FF, str); 
    return true; 
}
Reply


Messages In This Thread
sscanf id bug - by Uberanwar - 11.06.2016, 18:21
Re: sscanf id bug - by K0P - 11.06.2016, 18:36
Re: sscanf id bug - by Uberanwar - 11.06.2016, 18:40
Re: sscanf id bug - by sampkinq - 11.06.2016, 18:41
Re: sscanf id bug - by moura98 - 11.06.2016, 19:21
Re: sscanf id bug - by Uberanwar - 24.06.2016, 16:03

Forum Jump:


Users browsing this thread: 1 Guest(s)