Jump to content

Alpha weapon


Ascla

Recommended Posts

Posted

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,

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

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

  • Moderators
Posted (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 by Guest
Posted

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 

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