Ascla Posted March 12, 2013 Share Posted March 12, 2013 Hey guys, I've a problem, I want to make a invisible just a weapon. I try : local weapon= giveWeapon ( thePlayer, 24, 100 ) if (arme) then setElementAlpha ( weapon, 0 ) end But "setElementAlpha" not found the element. Thanks, Link to comment
-ffs-Sniper Posted March 12, 2013 Share Posted March 12, 2013 bool giveWeapon ( ped thePlayer, int weapon [, int ammo=30, bool setAsCurrent=false ] ) GiveWeapon does not return an element. Instead the function returns whether the weapon has been created (true or false). As there isn't any weapon element this is currently not possible by using setElementAlpha. At last you could try an invisible weapon model. Link to comment
Anderl Posted March 12, 2013 Share Posted March 12, 2013 Hey guys,I've a problem, I want to make a invisible just a weapon. I try : local weapon= giveWeapon ( thePlayer, 24, 100 ) if (arme) then setElementAlpha ( weapon, 0 ) end But "setElementAlpha" not found the element. Thanks, Where are 'arme' and 'thePlayer' declared? Link to comment
Moderators IIYAMA Posted March 12, 2013 Moderators Share Posted March 12, 2013 (edited) You can only set element alpha to custom weapons. Not with (onhand)weapons, they aren't elements. Can only be done by mods. Edited March 12, 2013 by Guest Link to comment
Ascla Posted March 12, 2013 Author Share Posted March 12, 2013 Anderl, it's an error function taser (thePlayer) local arme = giveWeapon ( thePlayer, 24, 100 ) if (arme) then setElementAlpha ( arme, 0 ) triggerClientEvent(thePlayer, "avoiruntazer", getRootElement(), thePlayer, taser) --attachElements ( taser, thePlayer, 0.2, 0, 1,180,0,0) end end Link to comment
Anderl Posted March 12, 2013 Share Posted March 12, 2013 Ok, so.. Read what guys said above Link to comment
Ascla Posted March 12, 2013 Author Share Posted March 12, 2013 Yes but this is a problem for me, because I want create a tazer without replacing one weapon in the game Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now