So in my map I have like a shooing range EE so I was wondering can someone please help me with giving the player a argus shotgun while they shoot the target but then give them back their gun that they had before they started the shooting range. Thanks.
So in my map I have like a shooing range EE so I was wondering can someone please help me with giving the player a argus shotgun while they shoot the target but then give them back their gun that they had before they started the shooting range. Thanks.
Well you can store their current weapon(s) in a variable then give them a new one.
Once its over you can give them the weapons from the stored variable.
I'm not going to write a script for you but since you are making your own shooting range I would expect you at least know how to script.
Well you can store their current weapon(s) in a variable then give them a new one.
Once its over you can give them the weapons from the stored variable.
I'm not going to write a script for you but since you are making your own shooting range I would expect you at least know how to script.
function that gives the player there gun.
function gun(player) {
player DisableOffhandWeapons(); player DisableWeaponCycling();
player AllowLean( false ); player AllowCrouch( false ); player AllowSprint( false ); player AllowProne( false ); player AllowMelee( false ); player AllowJump( false );
if ( player GetStance() == "prone, Crouch" ) { player SetStance( "stand" ); }
primaries = player GetWeaponsListPrimaries();
start_gun = player GetCurrentWeapon(); start_ammo = player GetWeaponAmmoStock( start_gun ); weapon = "pistol_burst"; // rk5 just because idk what the name of the argus is player GiveWeapon( weapon ); player SwitchToWeapon( weapon );
self waittill("done");
player EnableOffhandWeapons(); player EnableWeaponCycling(); player GiveWeapon( start_gun ); player SetWeaponAmmoStock( start_gun, start_ammo ); player SwitchToWeapon( start_gun ); player AllowLean( true ); player AllowSprint( true ); player AllowProne( true ); player AllowMelee( true ); player AllowJump( true ); return start_gun;
wait .5;
}
If you can tell me what's wrong with that because everything else works beside it giving me the rk5/shootgun, and also if you tell me were to look for the names for guns that would be great because I have searched for them in the _zm_weapons.gsc can't find them. Also what's the easiest way of not allowing a person to move because I couldn't find it in the _zm_utility.gsc just found how not to let them sprint, switch weapons ect. I hope that it's not something easy that I'm just overlooking, Thsnks. Double Post Merge: October 21, 2016, 10:10:35 pmnvm I got the gun list I guess it helps of you go the wiki, also found out how to give the gun as well I guess the only thing I have left for questions what the easies way to make it so players can't move forward back left right but sill spin in place?
Last Edit: October 21, 2016, 10:10:35 pm by GNT123
player DisableOffhandWeapons(); player DisableWeaponCycling();
player AllowLean( false ); player AllowCrouch( false ); player AllowSprint( false ); player AllowProne( false ); player AllowMelee( false ); player AllowJump( false );
if ( player GetStance() == "prone, Crouch" ) { player SetStance( "stand" ); }
primaries = player GetWeaponsListPrimaries();
start_gun = player GetCurrentWeapon(); start_ammo = player GetWeaponAmmoStock( start_gun ); weapon = "pistol_burst"; // rk5 just because idk what the name of the argus is player GiveWeapon( weapon ); player SwitchToWeapon( weapon );
self waittill("done");
player EnableOffhandWeapons(); player EnableWeaponCycling(); player GiveWeapon( start_gun ); player SetWeaponAmmoStock( start_gun, start_ammo ); player SwitchToWeapon( start_gun ); player AllowLean( true ); player AllowSprint( true ); player AllowProne( true ); player AllowMelee( true ); player AllowJump( true ); return start_gun;
wait .5;
}
If you can tell me what's wrong with that because everything else works beside it giving me the rk5/shootgun, and also if you tell me were to look for the names for guns that would be great because I have searched for them in the _zm_weapons.gsc can't find them. Also what's the easiest way of not allowing a person to move because I couldn't find it in the _zm_utility.gsc just found how not to let them sprint, switch weapons ect. I hope that it's not something easy that I'm just overlooking, Thsnks. Double Post Merge: October 21, 2016, 10:10:35 pmnvm I got the gun list I guess it helps of you go the wiki, also found out how to give the gun as well I guess the only thing I have left for questions what the easies way to make it so players can't move forward back left right but sill spin in place?
The is the engine function that they use for the teleporters but doesn't allow you to look around called:
Code Snippet
Plaintext
player FreezeControls(true/false)
However they also included a convenient engine function which allows this called:
Code Snippet
Plaintext
player FreezeControlsAllowLook(true/false)
Last Edit: October 22, 2016, 02:11:50 am by reckfullies