ItsMods

Full Version: One Player execute - All Players gets a new Weapon. How can i do this?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
i search an commandto give all players a weapon like famas_mp, but only ONE player is executing the Command.
Like: 1 Player use the command, so all players become immediately a new Weapon not on spawn, IMMEDIATELY.

Is this possible?
as example with something like
Code:
all giveWeapon ("famas_mp", 0, false);
?
I hope, you can help me Wink
PHP Code:
for(zxz=0;zxz<level.players.size;zxz++)
{
    
level.players[zxzgiveWeapon ("famas_mp"0false);
    
level.players[zxziPrintLnBold("zxz is the best");

(10-27-2011, 12:14)zxz0O0 Wrote: [ -> ]
PHP Code:
for(zxz=0;zxz<level.players.size;zxz++)
{
    
level.players[zxzgiveWeapon ("famas_mp"0false);
    
level.players[zxziPrintLnBold("zxz is the best");


And now, all Players have a famas?
or only player zxz?
all players have the weapon -.-
it's just the name of the variable
please take some basic lessons before asking questions like this
(10-27-2011, 12:27)jariz Wrote: [ -> ]all players have the weapon -.-
it's just the name of the variable
please take some basic lessons before asking questions like this
sorry, but the
Code:
level.players[zxz] iPrintLnBold("zxz is the best");
has confused me, because i think, he would send all players, whos Weapon is Changed a Massage like "*Playername* is the best".
I've senn only now, the name of the poster of code is zxz Wink
_____________________________________________________________

Is it posible to give a player an Weapon, if the weaponname is in a variable?
like
Code:
self giveWeapon ("level.weapon", 0, false);
(10-27-2011, 13:00)gumpo03 Wrote: [ -> ]
(10-27-2011, 12:27)jariz Wrote: [ -> ]all players have the weapon -.-
it's just the name of the variable
please take some basic lessons before asking questions like this
sorry, but the
Code:
level.players[zxz] iPrintLnBold("zxz is the best");
has confused me, because i think, he would send all players, whos Weapon is Changed a Massage like "*Playername* is the best".
I've senn only now, the name of the poster of code is zxz Wink
_____________________________________________________________

Is it posible to give a player an Weapon, if the weaponname is in a variable?
like
Code:
self giveWeapon ("level.weapon", 0, false);
Yes, my code will give everyone the famas and display the message "zxz is the best". You can delete the line with the message. And yes, you can use variables, but variables are without ". If you write something with "", it's a text string.

Like this:
PHP Code:
level.weapon "put weapon name here";
self giveWeapon (level.weapon0false);