
Posts
125
Respect
50Add +1
Forum Rank
Pack-a-Puncher
Primary Group
Member
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!![]() | Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
So I want to give a certain weapon to every player. Is it possible and if it is, how would I do it?
Thanks in advance!
players = get_players();
for ( i = 0; i < players.size; i++ )
{
players[i] GiveWeapon( weapon, );
players[i] GiveMaxAmmo( weapon );
players[i] SwitchToWeapon( weapon );
}
Code SnippetPlaintextplayers = get_players();
for ( i = 0; i < players.size; i++ )
{
players[i] GiveWeapon( weapon, );
players[i] GiveMaxAmmo( weapon );
players[i] SwitchToWeapon( weapon );
}
obviously replacing weapon with the weapon name inside of " " eg players GiveWeapon( "weapon_name" );
players[i] SwitchToWeapon( weapon );
![]() | Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
if you didnt put that line in, the player will still have the gun and stuff, they just wont automatically switch to it