Yields Posted May 22, 2012 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
Castillo Posted May 22, 2012 Posted May 22, 2012 It must be that the script is set as a server side instead of client side. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted May 22, 2012 Posted May 22, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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