Infinite oxygen and etc.
#1

I'm not even a scripter, I'm just interested whether it is possible to script infinite oxygen. Knowing it is possible via a-cheat-this-site-won't-let-me-name.
I had an idea of hovering an ability bar textdraw over where oxygen should be, and use GetPlayerAnim equal to the index of the diving one (basically how roleplay servers identify if player is wet or not), and if the animation is positive, set player's health to infinity as long as the anim is active, and the lightblue textdraw will stay untouched as if it never decreased. IDK If this is possible of whatever I said about scripts will even work. I'm not a scripter like I said.

I have another question, is it possible to script walking under water?
I also have an idea of how to make this work and tell me if it will.
Basically, say a player is already somewhere where the swimming animation activates, if he dives, and then presses a button, let's say Action Key (server sided bind triggering the following), and server does GetPlayerCoordinates X,Y,Z to get his location, then do SetPlayerCoordinate X,Y,Z-20 or Z-30 and then again SetPlayerCoordinate X,Y,Z, basically teleporting the player out and in water again to make him fall down and walk around normally.
Will this work? If yes someone help, I've no idea how to script, I can only make theories.
Thanks in advance.
Reply
#2

You can use this include:
https://sampforum.blast.hk/showthread.php?pid=3694016#pid3694016
And then use SetPlayerOxygenValue in a short repeating timer or something.
Код:
SetPlayerOxygenValue(playerid, Float:Value);
Reply
#3

Quote:
Originally Posted by CalvinC
Посмотреть сообщение
You can use this include:
https://sampforum.blast.hk/showthread.php?pid=3694016#pid3694016
And then use SetPlayerOxygenValue in a short repeating timer or something.
Код:
SetPlayerOxygenValue(playerid, Float:Value);
Can the value be set to infinity, or uh an extremely large value, so the time intervals won't be measured by seconds?
And, what about the walking under water?
Reply
#4

Quote:
Originally Posted by Telekinetic
Посмотреть сообщение
Can the value be set to infinity, or uh an extremely large value, so the time intervals won't be measured by seconds?
And, what about the walking under water?
The include should provide documentation for it's functions, though this uses a "custom" oxygen system. You cannot natively interact with oxygen levels without modifying the data the client sends to the server(and the data the server sends to the client).
Reply
#5

Quote:
Originally Posted by Telekinetic
Посмотреть сообщение
I'm not even a scripter, I'm just interested whether it is possible to script infinite oxygen. Knowing it is possible via a-cheat-this-site-won't-let-me-name.
I had an idea of hovering an ability bar textdraw over where oxygen should be, and use GetPlayerAnim equal to the index of the diving one (basically how roleplay servers identify if player is wet or not), and if the animation is positive, set player's health to infinity as long as the anim is active, and the lightblue textdraw will stay untouched as if it never decreased. IDK If this is possible of whatever I said about scripts will even work. I'm not a scripter like I said.

I have another question, is it possible to script walking under water?
I also have an idea of how to make this work and tell me if it will.
Basically, say a player is already somewhere where the swimming animation activates, if he dives, and then presses a button, let's say Action Key (server sided bind triggering the following), and server does GetPlayerCoordinates X,Y,Z to get his location, then do SetPlayerCoordinate X,Y,Z-20 or Z-30 and then again SetPlayerCoordinate X,Y,Z, basically teleporting the player out and in water again to make him fall down and walk around normally.
Will this work? If yes someone help, I've no idea how to script, I can only make theories.
Thanks in advance.
There is no native function which can modify or something like that for the oxygen like Abagail said.
And for walk in the water, I don't think it's possible. Why? When someone is in the water, he constantly uses animations and walking are animations too. The best you can do are clean animations every 0.1 sec (?) and put walk animation. Seems like glitches walk.
I hope I helped you.
Reply
#6

As pretty much everyone here said there is no native function to interact with it, however I believe SKY plugin lets you do that, hence the include provided by Calvin.

About walking under water, there is a rule in GTA SA which is if you don't enter the water from surface(falling into the water etc.) floating rules don't apply to you, so you can 'walk' under water therefore you could just take the player out and in again below the surface and player can walk, however there are some weird visual effects.
oh btw are you the Telekinetic on supernatural RP servers?
Reply
#7

Quote:
Originally Posted by Telekinetic
Посмотреть сообщение
Can the value be set to infinity, or uh an extremely large value, so the time intervals won't be measured by seconds?
And, what about the walking under water?
Well.. you can set SetPlayerMaxOxygenValue(playerid, 5000.0); so that is x50 than default, so u can be under water too long..

about walking under water, that anyway will be detected like under water, dont worry
Reply
#8

Not you! The guy above you. PrO.Gamer, he apparently knows my name, although I'm nothing like a name on the net, not in GTA at least. I wonder who he is.
Reply
#9

Quote:
Originally Posted by Ivan_Ino
Посмотреть сообщение
Well.. you can set SetPlayerMaxOxygenValue(playerid, 5000.0); so that is x50 than default, so u can be under water too long..

about walking under water, that anyway will be detected like under water, dont worry

i am Ino, old samper, just random guy here
In your include, you set the player's health at a huge value?
If yes, the player can't be killed by an another player by shooting for example ?
Btw still a nice inc.
Reply
#10

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
In your include, you set the player's health at a huge value?
If yes, the player can't be killed by an another player by shooting for example ?
Btw still a nice inc.
U controlling normal player's hp with SetPlayerHealth like normal, and player will take normal damage, probably i will limit it at 100.0 but samp default is huge
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)