JagleW Posted April 15, 2018 Share Posted April 15, 2018 Can anyone give me script for a unlimited oxygen on water please? (Can be on command,but musn't) Link to comment
Addlibs Posted April 15, 2018 Share Posted April 15, 2018 This section is not for asking others to make scripts for you or to find them for you. Link to comment
Moderators Patrick Posted April 15, 2018 Moderators Share Posted April 15, 2018 local maxOxygen = math.floor ( 1000 + getPedStat ( localPlayer, 22 ) * 1.5 + getPedStat ( localPlayer, 225 ) * 1.5 ) addEventHandler("onClientRender", getRootElement(), function() setPedOxygenLevel ( localPlayer, maxOxygen ) end) Link to comment
Awang Posted April 17, 2018 Share Posted April 17, 2018 I think it's a better way to cancel this damage, than use a client render for it... function stopDrown ( attacker, damage_type) if ( damage_type == 53 ) then -- if the damage type is drowning, check the wiki for more id cancelEvent() --cancel the event end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopDrown ) Always think about the client's cpu, when you use ClientRender... 2 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