joaosilva099 Posted September 27, 2014 Posted September 27, 2014 Hi all i'm making some script to my server and i have a problem. How can I enable the player to jump highter? (For who plays GTA SA and use codes I want to do what LFGMHAL code does) Hope u can help me TY http://i.imgur.com/CSE28MJ.png Don't hesitate to contact me for anything! If I can help, I will for sure! Education is the most powerful weapon which you can use to change the world. - Castillo
joaosilva099 Posted September 27, 2014 Author Posted September 27, 2014 nobody? http://i.imgur.com/CSE28MJ.png Don't hesitate to contact me for anything! If I can help, I will for sure! Education is the most powerful weapon which you can use to change the world. - Castillo
mustang Posted September 27, 2014 Posted September 27, 2014 nobody? Try using gravity for example : Client Script : function jump() if not isPedInVehicle(getLocalPlayer()) then -- here you check if the player is not in a vehicle (in other words "on foot") local moveState = getPedMoveState( getLocalPlayer() ) -- Get the player move state if moveState == "jump" then setGravity ( 0.001 ) elseif moveState ~= "jump" then setGravity ( 0.008 ) end end end addEventHandler("onClientRender", getRootElement(), jump) ^tested and working English : viewtopic.php?f=108&t=79589&p=729088#p729088 The Infernus Mod Review : TEAM : FPSSERVER Arabic : viewtopic.php?f=161&t=79590&p=729135#p729135
joaosilva099 Posted September 28, 2014 Author Posted September 28, 2014 thanks men that worked but how can i only set the gravity only for local player? http://i.imgur.com/CSE28MJ.png Don't hesitate to contact me for anything! If I can help, I will for sure! Education is the most powerful weapon which you can use to change the world. - Castillo
mustang Posted September 28, 2014 Posted September 28, 2014 thanks men that worked but how can i only set the gravity only for local player? You mean only for one player ? if so i will add a command for the players that want to jump higher playerDo = 0 -- Default Status , change to 1 if you want the default status ON which will make all players jump high when the resource start function jump() if playerDo == 1 then if not isPedInVehicle(getLocalPlayer()) then -- here you check if the player is not in a vehicle (in other words "on foot") local moveState = getPedMoveState( getLocalPlayer() ) -- Get the player move state if moveState == "jump" then setGravity ( 0.001 ) elseif moveState ~= "jump" then setGravity ( 0.008 ) end end end end addEventHandler("onClientRender", getRootElement(), jump) function jumpset() if playerDo == 0 then outputChatBox("Cheat Activated", 0, 255, 0, true ) playerDo = 1 elseif playerDo == 1 then outputChatBox("Cheat Deactivated", 255, 0, 0, true ) setGravity ( 0.008 ) playerDo = 0 end end addCommandHandler("jumptoggle", jumpset) -- Command to toggle the status(Cheat) if you type /jumptoggle you will toggle it, default is off English : viewtopic.php?f=108&t=79589&p=729088#p729088 The Infernus Mod Review : TEAM : FPSSERVER Arabic : viewtopic.php?f=161&t=79590&p=729135#p729135
joaosilva099 Posted September 28, 2014 Author Posted September 28, 2014 i don't mean this. i mean when u jump the ALL server takes gravity low and i want only the local player to take the gravity so he can jump highter http://i.imgur.com/CSE28MJ.png Don't hesitate to contact me for anything! If I can help, I will for sure! Education is the most powerful weapon which you can use to change the world. - Castillo
mustang Posted September 28, 2014 Posted September 28, 2014 i don't mean this. i mean when u jump the ALL server takes gravity low and i want only the local player to take the gravity so he can jump highter Did you test the new script i gave you with someone ? cause it wont change the grav for all player in the newer one i gave you English : viewtopic.php?f=108&t=79589&p=729088#p729088 The Infernus Mod Review : TEAM : FPSSERVER Arabic : viewtopic.php?f=161&t=79590&p=729135#p729135
joaosilva099 Posted September 28, 2014 Author Posted September 28, 2014 hum i tested it and checked on admin panel and the gravity was low http://i.imgur.com/CSE28MJ.png Don't hesitate to contact me for anything! If I can help, I will for sure! Education is the most powerful weapon which you can use to change the world. - Castillo
mustang Posted September 28, 2014 Posted September 28, 2014 hum i tested it and checked on admin panel and the gravity was low Iam not sure about this but try getting someone in your server and test it English : viewtopic.php?f=108&t=79589&p=729088#p729088 The Infernus Mod Review : TEAM : FPSSERVER Arabic : viewtopic.php?f=161&t=79590&p=729135#p729135
Anubhav Posted September 28, 2014 Posted September 28, 2014 How will it work like that? It will do it for each CLIENT. You must trigger from server like this Server: triggerClientEvent(someElement, "hi", someElement) Client: addEvent("hi", true) addEventHandler('hi', root, function() -- do stuff end This will be triggered for specified element/player. This is only a example, do it yourself and tell us if you get a error. See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
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