Foreach player
From EventScripts Community Encyclopedia
|
[edit] OverviewSyntax: Note: Command parameters are described inside the
< and > characters. Optional parameters are contained within [ and ] characters.Variation of this command that doesn't expand variables: foreach [edit] DescriptionRuns a command on every player of a group or on a single player. It stores the current player in variable. You can also use it with an es before it. Note: It doesn't expand server variables!
[edit] Parameters
[edit] Examples// foreach requires the corelib that comes with EventScripts. This is usually loaded for you when ES starts. es_load corelib // let the bots and humans say something foreach player tempuserid #bot "es_sexec server_var(tempuserid) say I am a silly bot!" foreach player tempuserid #human "es_sexec server_var(tempuserid) say I am a real player!"
[edit] Notes
[edit] See also |
