SA-MP Forums Archive
sscanf - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: sscanf (/showthread.php?tid=601451)



sscanf - CSCripMa - 21.02.2016

Hi,

Now i use

Код:
new PLAYERNAME;
if (sscanf(params, "u", PLAYERNAME ) )
{
SendClientMessage( playerid, COLOR_RED,"* Bad name");
return 1;
}
To check is player in game i need only do that?

Код:
if( PLAYERNAME == INVALID_PLAYER_ID)
{
SendClientMessage(playerid,COLOR_RED,"*Player not connected");
return 1;
}



Re: sscanf - ReshiramZekrom - 21.02.2016

https://sampwiki.blast.hk/wiki/IsPlayerConnected


Re: sscanf - saffierr - 21.02.2016

Just this
PHP код:
if(!IsPlayerConnected(PLAYERNAME)) return SendClientMessage(playeridCOLOR_RED"Player not connected!");