28.04.2018, 02:21
Your first option would probably be to use sscanf.
Or create a function to loop through players and compare names, etc.
PHP код:
CMD:wave( playerid, cmdtext[] ) {
new
a_szTmpDelim[ 128 ],
iIndex,
iGivePlayerID
;
a_szTmpDelim = strtok( cmdtext, iIndex );
if( isnull( a_szTmpDelim ) )
{
SendClientMessage( playerid, -1, "/wave [playerid/PoN]" );
return 1;
}
sscanf( a_szTmpDelim, "u", iGivePlayerID );
if( !IsPlayerConnected( iGivePlayerID ) )
{
SendClientMessage( playerid, COLOR_RED, "Playerid specified is invalid." );
return 1;
}
return 1;
}