Last active
January 5, 2024 17:49
-
-
Save JuniorDjjr/e366bc7eebc85f68fce7ed5f388f1182 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// by Junior_Djjr - MixMods.com.br | |
// You need: https://forum.mixmods.com.br/f16-utilidades/t179-gta3script-while-true-return_true-e-return_false | |
SCRIPT_START | |
{ | |
LVAR_INT scplayer[2] | |
LVAR_INT curHealth[2] lastHealth[2] | |
LVAR_INT playerId inWidescreenScene | |
NOP | |
main_loop: | |
WAIT 0 | |
playerId = 0 | |
GOSUB Process | |
IF IS_2PLAYER_GAME_GOING_ON | |
playerId = 1 | |
GOSUB Process | |
ENDIF | |
GOTO main_loop | |
Process: | |
IF IS_PLAYER_PLAYING playerId | |
GET_PLAYER_CHAR playerId scplayer[playerId] | |
GET_CHAR_HEALTH scplayer[playerId] curHealth[playerId] | |
IF curHealth[playerId] < lastHealth[playerId] | |
READ_MEMORY 0xB6F065 1 FALSE (inWidescreenScene) | |
IF inWidescreenScene = FALSE | |
SET_CHAR_HEALTH scplayer[playerId] 0 | |
ENDIF | |
ENDIF | |
lastHealth[playerId] = curHealth[playerId] | |
ENDIF | |
RETURN | |
} | |
SCRIPT_END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment