Jump to content

[HELP] How to use attachElements in a player's weapon.


Vazern

Recommended Posts

Hello!
I need to use attachElements with an object in a player's gun, but from what I noticed the player's weapon is not recognized as "element".

Code:

function customM4(source)
 	if getPedWeapon(source) == 31 then
		local gunModel = createObject(1487, 1, 2, 3)
		attachElements(gunModel, getPedWeapon(source)) 
	end
end 
addCommandHandler("m4skin", customM4)

 

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...