Skip to content

Instantly share code, notes, and snippets.

@JuniorDjjr
Created August 28, 2022 17:07
Show Gist options
  • Save JuniorDjjr/739c34a81d8e3c80da248491df3fa86d to your computer and use it in GitHub Desktop.
Save JuniorDjjr/739c34a81d8e3c80da248491df3fa86d to your computer and use it in GitHub Desktop.
// by Junior_Djjr - MixMods.com.br
// You need: https://forum.mixmods.com.br/f141-gta3script-cleo/t5206-como-criar-scripts-com-cleoplus
SCRIPT_START
{
LVAR_INT iSeed iProgress hObj iModel
LVAR_FLOAT f rotX rotY rotZ
NOP
WHILE TRUE
WAIT 0
iProgress = 0
WHILE GET_ANY_OBJECT_NO_SAVE_RECURSIVE iProgress (iProgress hObj)
IF IS_OBJECT_REALLY_IN_AIR hObj // fast way to filter only objects that are on air
GET_OBJECT_SPEED hObj (f)
IF f > 3.0
GET_OBJECT_MODEL hObj (iModel)
IF iModel >= 342
AND iModel <= 344
GET_OBJECT_RANDOM_SEED hObj iSeed
GENERATE_RANDOM_FLOAT_IN_RANGE_WITH_SEED iSeed 1.0 5.0 (rotX)
GENERATE_RANDOM_FLOAT_IN_RANGE_WITH_SEED iSeed -7.0 -3.0 (rotY)
GENERATE_RANDOM_FLOAT_IN_RANGE_WITH_SEED iSeed 1.0 5.0 (rotZ)
SET_OBJECT_ROTATION_VELOCITY hObj rotX rotY rotZ
ENDIF
ENDIF
ENDIF
ENDWHILE
ENDWHILE
}
SCRIPT_END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment