How do I execute a command on all players?
I want to execute a voice command on all players, but when I do this:
Code:
FakeClientCommand(_:TFTeam_Red, "voicemenu 1 4"); |
Re: How do I execute a command on all players?
PHP Code:
|
Re: How do I execute a command on all players?
You use their client index.. Not the team num.
Loop over the inhame clients for(new i=1; i<=MaxClients;i++) { if(IsClientInGame(i)) { do stuff } } |
Re: How do I execute a command on all players?
Thanks to you both! It worked!
|
Re: How do I execute a command on all players?
Don't forget to use !IsFakeClient or else you'll get errors when it hits a bot, SourceTV, or replay.
|
Re: How do I execute a command on all players?
Fakeclientcommand works just fine on fakeclients.
|
All times are GMT -4. The time now is 05:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.