ItsMods

Full Version: command to all players of a Team - SOLVED
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.
How can i give an command only to the players in one Team.
As example:
All players of the Team axis should get an golden Famas.
How can i do this?
I dont have any Idea. I only know, its something with "for()".

Hope you can help me.

PS: Sorry for noob-Questions like theese... I want to learn it but in the moment i didnt know enouth...
Code:
for(i=0;i<level.players.size;i++)
    if( level.players[i].team == "axis" )
        self doSomething();
(11-01-2011, 22:04)Justin Wrote: [ -> ]
Code:
for(i=0;i<level.players.size;i++)
    if( level.players[i].team == "axis" )
        self doSomething();

Oh.. Im so stupid :|
All Parts of this i have in my Code but Not in this Compilation :/
Sometimes i want shoot me fo be so stupidFuck yea! Fuck yea!
(11-01-2011, 22:04)Justin Wrote: [ -> ]
Code:
for(i=0;i<level.players.size;i++)
    if( level.players[i].team == "axis" )
        self doSomething();

It should be

level.players[i] doSomething();