Jump to content

Question - CJ "moto" Helmet


manve1

Recommended Posts

I Found this on the Wiki...

*Serverside

function addHelmetOnEnter ( theVehicle, seat, jacked ) 
    if ( getElementModel ( theVehicle ) == 522 ) then -- if its a nrg 
        addPedClothes ( source, "moto", "moto", 16 ) -- add the helmet 
    end 
end 
addEventHandler ( "onPlayerVehicleEnter", getRootElement(), addHelmetOnEnter ) 
  
function removeHelmetOnExit ( theVehicle, seat, jacked ) 
    if ( getElementModel ( theVehicle ) == 522 ) then -- if its a nrg 
        removePedClothes ( source, 16 ) -- remove the helmet 
    end 
end 
addEventHandler ( "onPlayerVehicleExit", getRootElement(), removeHelmetOnExit ) 

No, he wants to replace it with another texture.

@manve1: You can find the ID (or the name) on this page: https://wiki.multitheftauto.com/wiki/Cl ... ponent_IDs

Example:

txd = engineLoadTXD("textureName.txd") 
engineImportTXD( txd, 30403 ) 

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