Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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
You can’t perform that action at this time.