lol.com Posted July 18, 2012 Share Posted July 18, 2012 I wanted my hunter, was much higher without limitation of time, as this script jetpapck I found ... I tried to replace the "setJetpackMaxHeight" by "setHunterMaxHeight" most do not run .-. .Then maybe someone can help? function setMyMaxHeight ( cmd, value ) local height = tonumber ( 1000 ) -- Get the number of the value if height > -20 then -- If the height is higher than -20 local succes = setJetpackMaxHeight ( height ) -- Set the maximum height if succes then -- If it's succesfully changed outputChatBox ( "You've set you maximum jetpack height to "..height.."!", 0, 255, 0 ) -- Send the client a succes message else -- If there was something wrong outputChatBox ( "Failed to set your maximum jetpack height to "..height.."!", 255, 0, 0 ) -- Send the client an error message end else -- If the given value was below -20 outputChatBox ( "Failed to change you jetpack height! Please use a number above -20." , 255, 0, 0 ) -- Send the client an error message end end addCommandHandler ( "maxheight", setMyMaxHeight ) -- Add the command handler Link to comment
Castillo Posted July 18, 2012 Share Posted July 18, 2012 That's because you can't replace a function with another and expect it to work, the function 'setHunterMaxHeight' does not exist. Link to comment
TAPL Posted July 18, 2012 Share Posted July 18, 2012 https://wiki.multitheftauto.com/wiki/Set ... tMaxHeight Link to comment
lol.com Posted July 18, 2012 Author Share Posted July 18, 2012 That's because you can't replace a function with another and expect it to work, the function 'setHunterMaxHeight' does not exist. sorry, I'm not very good with certain commands .. And thank you TAPL. One more thing how do I do it all without being activated by the command "addCommandHandler (" aircraft ", setAircraftHeight)", without the command"/aircraft"? Link to comment
Wei Posted July 18, 2012 Share Posted July 18, 2012 If you mean on resource start then use addEventHandler("onResourceStart", getRootElement(), setAircraftHeight) Link to comment
Anderl Posted July 18, 2012 Share Posted July 18, 2012 If you mean on resource start then use addEventHandler("onResourceStart", getRootElement(), setAircraftHeight) It won't work magically. Link to comment
Wei Posted July 18, 2012 Share Posted July 18, 2012 height = 0 --put Your Height Here function setMyMaxHeight ( ) setAircraftMaxHeight ( height ) end addEventHandler("onResourceStart", getRootElement(), setMyMaxHeight) Link to comment
lol.com Posted July 19, 2012 Author Share Posted July 19, 2012 height = 0 --put Your Height Here function setMyMaxHeight ( ) setAircraftMaxHeight ( height ) end addEventHandler("onResourceStart", getRootElement(), setMyMaxHeight) how to put? function setAircraftHeight ( command, ve1 ) local height = tonumber ( 2000 ) if height then if height > 200 then function setMyMaxHeight ( ) setAircraftMaxHeight ( height ) end end addEventHandler("onResourceStart", getRootElement(), setMyMaxHeight) height = 2000 --put Your Height Herefunction setMyMaxHeight ( ) setAircraftMaxHeight ( height ) end addEventHandler("onResourceStart", getRootElement(), setMyMaxHeight) ???? Link to comment
TAPL Posted July 19, 2012 Share Posted July 19, 2012 -- Server Side -- height = 2000 --put Your Height Here function setMyMaxHeight() setAircraftMaxHeight(height) end addEventHandler("onResourceStart", resourceRoot, setMyMaxHeight) should we give you even the meta? if you don't know how to make the meta, then learn. https://wiki.multitheftauto.com/wiki/Meta.xml 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