jeremaniak Posted November 7, 2014 Share Posted November 7, 2014 Hi guys, Can anyone help me with these two commands. i want it to be when you are in a vehicle that if you type one of these commands it will change for that vehicle only. is this possible? i am willing to pay for it. Link to comment
ALw7sH Posted November 7, 2014 Share Posted November 7, 2014 addCommandHandler('setaccelaration', function(plr,cmd,accelaration) if isPedInVehicle(plr) and getPedOccupiedVehicleSeat(plr) == 0 then if tonumber(accelaration) >= 0 and tonumber(accelaration) <= 100000 then vehicle = getPedOccupiedVehicle(plr) setVehicleHandling(vehicle,'engineAcceleration',tonumber(accelaration)) else outputChatBox('ERROR',plr,255,0,0) end end end ) addCommandHandler('setmaxspeed', function(plr,cmd,maxVelocity) if isPedInVehicle(plr) and getPedOccupiedVehicleSeat(plr) == 0 then if tonumber(maxVelocity) >= 0.1 and tonumber(maxVelocity) <= 200000 then vehicle = getPedOccupiedVehicle(plr) setVehicleHandling(vehicle,'maxVelocity',tonumber(maxVelocity)) else outputChatBox('ERROR',plr,255,0,0) end end end ) Link to comment
jeremaniak Posted November 7, 2014 Author Share Posted November 7, 2014 Thanks man! Serverside right? Link to comment
ALw7sH Posted November 7, 2014 Share Posted November 7, 2014 Thanks man! Serverside right? yea 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