Skip to content

Instantly share code, notes, and snippets.

@JuniorDjjr
Last active January 5, 2024 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JuniorDjjr/e366bc7eebc85f68fce7ed5f388f1182 to your computer and use it in GitHub Desktop.
Save JuniorDjjr/e366bc7eebc85f68fce7ed5f388f1182 to your computer and use it in GitHub Desktop.
// 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