Jump to content

Default Wheel


JunkDealer

Recommended Posts

Posted

Hi. I have DD server and I need help about wheels. Almost in all maps we are using Cheetah and as everyone know every map car's wheels changing. I want to make it start with default wheel. Like this: http://mahiwaga.com/img.jpg

I mean other uprages will stay but every map car will start with default wheel. I hope you understand me and anyone can help me. Thx..

index.php
Posted

Remove every wheel upgrade when you first get the vehicle.

onVehicleEnter

removeVehicleUpgrade 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

ty for help. I tried this but it doesn't work.

function remWheel ( sourcePlayer ) 
    theVehicle = getPlayerOccupiedVehicle ( sourcePlayer ) 
    if ( theVehicle ) then 
        removeVehicleUpgrade ( theVehicle, 1085 ) 
    end 
end 

I did this, started map (with map 1085 id wheel is coming) but nothing changed. Can you tell me more wide?

index.php
Posted

Maybe the upgrades are being applied after, try this:

addEvent ( "onRaceStateChanging", true ) 
addEventHandler ( "onRaceStateChanging", root, 
    function ( state ) 
        if ( state == "GridCountdown" ) then 
            for _, player in ipairs ( getElementsByType ( "player" ) ) do 
                local theVehicle = getPlayerOccupiedVehicle ( player ) 
                if ( theVehicle ) then 
                    removeVehicleUpgrade ( theVehicle, 1085 ) 
                end 
            end 
        end 
    end 
) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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