Skip to content

Instantly share code, notes, and snippets.

@JuniorDjjr
Created April 15, 2020 22:21
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/ff4144b991a2c0d86bb9c3b84cf44f52 to your computer and use it in GitHub Desktop.
Save JuniorDjjr/ff4144b991a2c0d86bb9c3b84cf44f52 to your computer and use it in GitHub Desktop.
// You need: https://forum.mixmods.com.br/f16-utilidades/t179-gta3script-while-true-return_true-e-return_false
SCRIPT_START
{
LVAR_INT scplayer iRandTime i
LVAR_FLOAT fFat fRandTime
GET_PLAYER_CHAR 0 scplayer
WHILE TRUE
WAIT 1000 // randomize each 1 second
GET_FLOAT_STAT 21 fFat
fRandTime = 9999999.9 / fFat
iRandTime =# fRandTime
iRandTime *= 6 // 1000.0 fat will be 6000 seconds (1,666 hours)
IF iRandTime < 100000 // too hard, don't do it (<60% fat)
GENERATE_RANDOM_INT_IN_RANGE 0 6000 (i)
IF i = 666
SET_CHAR_HEALTH scplayer 0
WAIT 60000 // 1 min
ENDIF
ENDIF
ENDWHILE
}
SCRIPT_END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment