Jump to content

SetVehicleHandling Remote Control Problem

Recommended Posts

-- Client example

veh = getElementData(localPlayer, "vehicle")
	if isElement(veh) then
		triggerServerEvent ( "vehUpgrade", resourceRoot, veh, "suspensionFrontRearBias", 0.2 )

-- Server Example

function vehUpgrade ( vehicle, property, value ) 
	setVehicleHandling( vehicle, property, value )
addEvent( "vehUpgrade", true )
addEventHandler( "vehUpgrade", resourceRoot, vehUpgrade ) 

This command works when I am in the vehicle, but this command does not work if nobody is in the vehicle. I Want to make this setting remotely, How Can i Fix that

Edited by CastiaL
Link to post

Maybe you set the element data "vehicle" when someone enter the vehicle only and remove it when he gets out of it so the " data = nil " and keep in mind that if you reconnected, the data would be removed auto unless you saved it. 

Link to post

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