Jump to content

Weapon change


Recommended Posts

Hi everyone. I have a question

What function i can use to avoid change weapon of a player?

I mean, i have a chainsaw, m4, colt and a shotgun

I want make to when im enter to some zone, just i can use chainsaw, and dont change my weapon to m4 or colt or shotgun

What functions i can use?

Thanks for your time

Link to comment
     
setPedWeaponSlot --To set the slot to a chainsaw 
toggleControl ( playerElement, "next_weapon", false )  -- disable next_wepaon control 
toggleControl ( playerElement, "previous_weapon", false ) --disable previous_weapon control 
  
--optional 
giveWeapon 
-- the player might not have a chainsaw. 
  

Or:

onClientPlayerWeaponFire 
--with 
cancelEvent() 

Link to comment
     
setPedWeaponSlot --To set the slot to a chainsaw 
toggleControl ( playerElement, "next_weapon", false )  -- disable next_wepaon control 
toggleControl ( playerElement, "previous_weapon", false ) --disable previous_weapon control 
  
--optional 
giveWeapon 
-- the player might not have a chainsaw. 
  

Thanks.. i forgot that functions

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...