Identifying a player in a command
#3

Your first option would probably be to use sscanf.

PHP код:
CMD:waveplayeridcmdtext[] ) {
    
    new 
        
a_szTmpDelim128 ],
        
iIndex,
        
iGivePlayerID
    
;
    
a_szTmpDelim strtokcmdtextiIndex );
    if( 
isnulla_szTmpDelim ) )
    {
        
SendClientMessageplayerid, -1"/wave [playerid/PoN]" );
        return 
1;
    }
    
sscanfa_szTmpDelim"u"iGivePlayerID );
    if( !
IsPlayerConnectediGivePlayerID ) )
    {
        
SendClientMessageplayeridCOLOR_RED"Playerid specified is invalid." );
        return 
1;
    }
    return 
1;

Or create a function to loop through players and compare names, etc.
Reply


Messages In This Thread
Identifying a player in a command - by Ducati - 28.04.2018, 00:57
Re: Identifying a player in a command - by Pottus - 28.04.2018, 01:03
Re: Identifying a player in a command - by Kane - 28.04.2018, 02:21
Re: Identifying a player in a command - by ISmokezU - 28.04.2018, 02:29
Re: Identifying a player in a command - by Zeth - 28.04.2018, 02:47
Re: Identifying a player in a command - by Ducati - 28.04.2018, 02:50
Re: Identifying a player in a command - by Zeth - 28.04.2018, 02:53
Re: Identifying a player in a command - by BigETI - 13.12.2018, 07:22
Re: Identifying a player in a command - by RoboN1X - 13.12.2018, 14:06

Forum Jump:


Users browsing this thread: 3 Guest(s)