AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Execute command to all on... (https://forums.alliedmods.net/showthread.php?t=74577)

Davidos 07-21-2008 11:15

Execute command to all on...
 
I need some help.

How do you make it possible that, if a certain events is triggered for 'one' player, a different command is used on everybody else.
For example, if someone gets out of a...
...

car, the sound is stopped for the player in the car, but not for anyone else around it, as the sound will continue to roar from the player.

How could you fix this in one example to:
-stopsound on everyone
-make the sound auto stop when the event is triggered/revoked.

atomen 07-21-2008 11:56

Re: Execute command to all on...
 
PHP Code:

public plugin_init()
{
 [...]
 
g_maxplayers get_maxplayers();
}

public 
stop_sound()
{
 for(new 
1<= g_maxplayersi++)
 {
  
client_cmd(i"your command");
 }


Not sure what you mean. But this code executes a command on everyone on the server.

Great Tutorial : How to Block Sounds

Davidos 07-21-2008 19:33

Re: Execute command to all on...
 
Quote:

Originally Posted by atomen (Post 656102)
PHP Code:

public plugin_init()
{
 [...]
 
g_maxplayers get_maxplayers();
}

public 
stop_sound()
{
 for(new 
1<= g_maxplayersi++)
 {
  
client_cmd(i"your command");
 }


Not sure what you mean. But this code executes a command on everyone on the server.

Great Tutorial : How to Block Sounds


Eh, good enough, I managed to fix it with the tutorial, +karma >.>


All times are GMT -4. The time now is 05:39.

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