CastiaL Posted July 11, 2020 Share Posted July 11, 2020 (edited) -- Client example veh = getElementData(localPlayer, "vehicle") if isElement(veh) then triggerServerEvent ( "vehUpgrade", resourceRoot, veh, "suspensionFrontRearBias", 0.2 ) end -- Server Example function vehUpgrade ( vehicle, property, value ) setVehicleHandling( vehicle, property, value ) end 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 July 11, 2020 by CastiaL Link to comment
AaroN⍩ Posted July 12, 2020 Share Posted July 12, 2020 you are using localplayer, to do it remotely you must pass the specific user parameter GetPlayerAccount Link to comment
Sisqo0 Posted July 12, 2020 Share Posted July 12, 2020 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 comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now