Yields Posted May 22, 2012 Share Posted May 22, 2012 This script is server sided and I get this error [2012-05-22 03:17:52] ERROR: realism-system\s_vehicle_crash.lua:11: attempt to call global 'getLocalPlayer' (a nil value) this is the lua code local vehicle = getPedOccupiedVehicle( getLocalPlayer( ) ) if getVehicleOccupant( vehicle ) == getLocalPlayer( ) and getVehicleType( vehicle ) == "BMX" then if speed then if getElementModel(vehicle) == 510 then --mtbike if speed >= 60 then toggleControl( "accelerate", false ) else toggleControl( "accelerate", true ) end else if speed >= 45 then toggleControl( "accelerate", false ) else toggleControl( "accelerate", true ) end end end end Link to comment
Castillo Posted May 22, 2012 Share Posted May 22, 2012 It must be that the script is set as a server side instead of client side. Link to comment
Yields Posted May 22, 2012 Author Share Posted May 22, 2012 Fixed thanks Solidsnake :> 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