hrtht Posted March 21, 2020 Share Posted March 21, 2020 function repairVehicle ( thePlayer, commandName) if ( isPedInVehicle ( thePlayer ) ) then local theVehicle = getPedOccupiedVehicle ( thePlayer) local succes = fixVehicle ( theVehicle ) if ( succes ) then outputChatBox (" 1 ", thePlayer ) outputChatBox ( "0", thePlayer ) end end end addCommandHandler ( "rv", repairVehicle) Its serverside Link to comment
Moderators Citizen Posted March 21, 2020 Moderators Share Posted March 21, 2020 First you could say hi or something, we are not robots so we do have feelings and that would be greatly apreciated. Second, you didn't follow the Formatting guidelines: Your code has to be in a code block with Lua language. Third, you can't request people to make the script for you, try to do it first and if you can't make it work, please show the code you tried. 2 Link to comment
#\_oskar_/# Posted March 22, 2020 Share Posted March 22, 2020 local Key = 'H' addEventHandler("onPlayerJoin",root,function () bindKey (source,Key,"down",repairVehicle) end) local function ResourceStart() for _,player in ipairs(getElementsByType("player")) do bindKey (player,Key,"down",repairVehicle) end end addEventHandler("onResourceStart",resourceRoot,ResourceStart) 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