Skip to content

Instantly share code, notes, and snippets.

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