|
 |
|
|
|
|
|
GTA Modification Forums
[NEED HELP] Scripting an Infinite Health mod Problem with toggleable
 |
|
 |
| |
oksa8  |
Posted: Tuesday, Jun 19 2012, 09:45
|
Just call me Oksu

Group: Members
Joined: Sep 30, 2010



|
Maybe you should try this:
When you press a key, it would toggle a variable from 0 to 1, and when pressed again, from 1 to 0. When the variable is 0, then the script only waits for keypress-command, and when it's 1, it'll wait for keypress AND run "infinite health"-code at same time.
By the way, you should always tell for what game you are scripting, and if it's not a huge secret, also post the script.
This post has been edited by oksa8 on Tuesday, Jun 19 2012, 09:48
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
1998gtasa  |
Posted: Wednesday, Jun 20 2012, 00:20
|
Rat

Group: Members
Joined: Jun 14, 2012

|
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
arijitsen  |
Posted: Wednesday, Jun 20 2012, 15:10
|
Modder,Gamer & GFX Artist

Group: Members
Joined: Jun 19, 2012


|
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
SamJohnson98  |
Posted: Wednesday, Jun 20 2012, 15:39
|
Player Hater

Group: Members
Joined: Jan 13, 2012

|
| CODE | // This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
{$VERSION 3.1.0027} {$CLEO .cs}
//-------------MAIN--------------- 0000: NOP
:NONAME_2 0001: wait 0 ms 00D6: if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @NONAME_2 0AB0: key_pressed 17 0AB0: key_pressed 89 004D: jump_if_false @NONAME_2 02AB: set_actor $PLAYER_ACTOR immunities BP 1 FP 1 EP 1 CP 1 MP 1 00BC: show_text_highpriority GXT 'GMOD' time 3000 flag 1
:NONAME_4 0001: wait 0 ms 00D6: if 0AB0: key_pressed 17 0AB0: key_pressed 85 004D: jump_if_false @NONAME_4 02AB: set_actor $PLAYER_ACTOR immunities BP 0 FP 0 EP 0 CP 0 MP 0 00BC: show_text_highpriority GXT 'GMODD' time 3000 flag 1 0002: jump @NONAME_2 |
If I use this, it can't be disabled. It's disabled but my health won't go down. | CODE | :NONAME_59 wait 0 if 0256: player $PLAYER_CHAR defined else_jump @NONAME_59 if and 0AB0: key_pressed 9 0AB0: key_pressed 71 else_jump @NONAME_59 Actor.Health($PLAYER_ACTOR) = 250 Actor.Armour($PLAYER_ACTOR) = 250 Actor.SetImmunities($PLAYER_ACTOR, 1, 1, 1, 1, 1) 03E5: show_text_box 'GMOD' jump @NONAME_147
:NONAME_147 wait 0 if and 0AB0: key_pressed 9 0AB0: key_pressed 72 else_jump @NONAME_147 Actor.SetImmunities($PLAYER_ACTOR, 0, 0, 0, 0, 0) 03E5: show_text_box 'GMODD' jump @NONAME_59 |
On the other hand, if use this it will disable the infinite health by itself if you load the game like enter any safe house.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
arijitsen  |
Posted: Wednesday, Jun 20 2012, 15:49
|
Modder,Gamer & GFX Artist

Group: Members
Joined: Jun 19, 2012


|
| QUOTE (SamJohnson98 @ Wednesday, Jun 20 2012, 15:39) | | CODE | // This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
{$VERSION 3.1.0027} {$CLEO .cs}
//-------------MAIN--------------- 0000: NOP
:NONAME_2 0001: wait 0 ms 00D6: if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @NONAME_2 0AB0: key_pressed 17 0AB0: key_pressed 89 004D: jump_if_false @NONAME_2 02AB: set_actor $PLAYER_ACTOR immunities BP 1 FP 1 EP 1 CP 1 MP 1 00BC: show_text_highpriority GXT 'GMOD' time 3000 flag 1
:NONAME_4 0001: wait 0 ms 00D6: if 0AB0: key_pressed 17 0AB0: key_pressed 85 004D: jump_if_false @NONAME_4 02AB: set_actor $PLAYER_ACTOR immunities BP 0 FP 0 EP 0 CP 0 MP 0 00BC: show_text_highpriority GXT 'GMODD' time 3000 flag 1 0002: jump @NONAME_2 |
If I use this, it can't be disabled. It's disabled but my health won't go down.
| CODE | :NONAME_59 wait 0 if 0256: player $PLAYER_CHAR defined else_jump @NONAME_59 if and 0AB0: key_pressed 9 0AB0: key_pressed 71 else_jump @NONAME_59 Actor.Health($PLAYER_ACTOR) = 250 Actor.Armour($PLAYER_ACTOR) = 250 Actor.SetImmunities($PLAYER_ACTOR, 1, 1, 1, 1, 1) 03E5: show_text_box 'GMOD' jump @NONAME_147
:NONAME_147 wait 0 if and 0AB0: key_pressed 9 0AB0: key_pressed 72 else_jump @NONAME_147 Actor.SetImmunities($PLAYER_ACTOR, 0, 0, 0, 0, 0) 03E5: show_text_box 'GMODD' jump @NONAME_59 |
On the other hand, if use this it will disable the infinite health by itself if you load the game like enter any safe house. | Try this code : 0A95: enable_thread_saving If any doubt reply .Hope that this will work i haven't tried it.If it works reply me
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
arijitsen  |
Posted: Wednesday, Jun 20 2012, 15:56
|
Modder,Gamer & GFX Artist

Group: Members
Joined: Jun 19, 2012


|
| QUOTE (SamJohnson98 @ Wednesday, Jun 20 2012, 15:51) | | Where am I suppose to add that? And I think that is for something else. | :NONAME_1 0A95: enable_thread_saving :NONAME_59 wait 0 if 0256: player $PLAYER_CHAR defined else_jump @NONAME_59 if and 0AB0: key_pressed 9 0AB0: key_pressed 71 else_jump @NONAME_59 Actor.Health($PLAYER_ACTOR) = 250 Actor.Armour($PLAYER_ACTOR) = 250 Actor.SetImmunities($PLAYER_ACTOR, 1, 1, 1, 1, 1) 03E5: show_text_box 'GMOD' jump @NONAME_147 :NONAME_147 wait 0 if and 0AB0: key_pressed 9 0AB0: key_pressed 72 else_jump @NONAME_147 Actor.SetImmunities($PLAYER_ACTOR, 0, 0, 0, 0, 0) 03E5: show_text_box 'GMODD' jump @NONAME_59 Hope this will solve your problem .I have not tried it .If it works then reply me if any doubts still reply me .
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(2) [1] 2
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|