Jump to content

Alpha weapon


Ascla

Recommended Posts

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

Anderl, it's an error :P

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

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