Jump to content

Tune vehicle by command


DLmass

Recommended Posts

function tuneSultan(thePlayer) -- addCommandHandler as element 2 return's command name and not vehicle .. 
    local theVehicle = getPedOccupiedVehicle(thePlayer) 
    local account = getPlayerAccount ( thePlayer ) 
    local access = false 
    local id = getVehicleID ( theVehicle ) 
    for _, group in ipairs ( { "Admin", "Moderator", "SuperModerator" } ) do 
        if isObjectInACLGroup ( "user." .. getAccountName(account), aclGetGroup (group) ) and id == 560 then 
            access = true 
        setVehicleHandling(getPedOccupiedVehicle(thePlayer),"driveType","awd") 
        setVehicleHandling(getPedOccupiedVehicle(thePlayer),"brakeDeceleration",11) 
        setVehicleHandling(getPedOccupiedVehicle(thePlayer),"tractionLoss",1) 
        setVehicleHandling(getPedOccupiedVehicle(thePlayer),"tractionMultiplier",1) 
        setVehicleHandling(getPedOccupiedVehicle(thePlayer),"handlingFlags",0x88000) 
        end 
    end 
    if not access then 
        outputChatBox ( "#FF0000You don't have access to this command.", thePlayer, 255, 255, 255, true ) 
        return 
    end 
end 
addCommandHandler("tuneSultan", tuneSultan) 

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