AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get players and send them cmd (https://forums.alliedmods.net/showthread.php?t=302738)

undead52 11-09-2017 09:19

get players and send them cmd
 
i get the get_players for specific team and want to send them client_cmd for everyone but how ?

PHP Code:

public ct_win()
{
  new 
players32 ], iNum;
  
get_playersplayersiNum"ae""TERRORIST")

 
  new 
rand random_num(0,2)

  if( 
cs_get_user_teamplayers[0] ) == CS_TEAM_T )// here is should for everyone
  
{
      switch(
rand)
      {
        case 
0client_cmd(players[i],"spk iSniper/interface/ru/defeat/fail1.wav")// here is should for everyone too 


wickedd 11-09-2017 09:49

Re: get players and send them cmd
 
PHP Code:

public ct_win()
{
    new 
rand random_num0,)
        
    new 
players32 ], iNumidi
    get_players
playersiNum"ae""TERRORIST" )

    for( 
0iNumi++ )
    {
        
id players]
        
        switch( 
rand )
        {
            case 
0:
            {
                
client_cmdid,"spk iSniper/interface/ru/defeat/fail1.wav" )// here is should for everyone too 
            
}
            case 
1:
            {
                
//Your code
            
}
        }
    }



undead52 11-09-2017 12:32

Re: get players and send them cmd
 
how can i extend round end time ?

fysiks 11-09-2017 21:18

Re: get players and send them cmd
 
New questions/topics should be posted in a new thread (after searching of course).


All times are GMT -4. The time now is 17:19.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.