Jump to content

Vehicle Change pickup problem [Race]


Overkillz

Recommended Posts

Hey dear community, Im experimenting a problem with the default race. When I try to pick up any vehicle changer pickup, it doesnt change and it drops me this message

function handleHitPickup(pickup) 
    if pickup.type == 'vehiclechange' then 
        if pickup.vehicle == getElementModel(g_Vehicle) then 
            return 
        end 
        local health = nil 
        g_PrevVehicleHeight = getElementDistanceFromCentreOfMassToBaseOfModel(g_Vehicle) 
        alignVehicleWithUp() 
        if checkModelIsAirplane(pickup.vehicle) then -- Hack fix for Issue #4104 
            health = getElementHealth(g_Vehicle) 
        end 
        setElementModel(g_Vehicle, pickup.vehicle) 
        if health then 
            fixVehicle(g_Vehicle) 
            setElementHealth(g_Vehicle, health) 
        end 
        vehicleChanging(g_MapOptions.classicchangez, pickup.vehicle) 
    elseif pickup.type == 'nitro' then 
        addVehicleUpgrade(g_Vehicle, 1010) 
    elseif pickup.type == 'repair' then 
        fixVehicle(g_Vehicle) 
    end 
    triggerServerEvent('onPlayerPickUpRacePickupInternal', g_Me, pickup.id, pickup.respawn) 
    playSoundFrontEnd(46) 
end 

I hope you can help me.

Thanks for your time and regards.

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