Skip to content

Instantly share code, notes, and snippets.

@JuniorDjjr
Created January 23, 2020 02:29
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/06bac284f8b87bc54ced6522e5cc45b2 to your computer and use it in GitHub Desktop.
Save JuniorDjjr/06bac284f8b87bc54ced6522e5cc45b2 to your computer and use it in GitHub Desktop.
// by Junior_Djjr - MixMods.com.br
// You are free to edit it, just keep credits for me as a base script
// You need: https://forum.mixmods.com.br/f16-utilidades/t179-gta3script-while-true-return_true-e-return_false
SCRIPT_START
{
LVAR_INT scplayer i pickup id
LVAR_FLOAT x y z px py pz pa
GET_PLAYER_CHAR 0 scplayer
SAVE_THIS_CUSTOM_SCRIPT
WHILE TRUE
WAIT 600
GET_AREA_VISIBLE i
IF NOT i = 0
AND IS_PLAYER_CONTROL_ON 0
// IMPORTANT: You can't use GOSUB in this case due to script saving
// Denise
x = 248.0721
y = 302.5974
z = 999.15
px = 247.8521
py = 304.2138
pz = 999.15
pa = 0.0
id = 0
GOTO RunSavePickup
ReturnDenise:
// Helena
x = 291.3998
y = 304.9087
z = 999.1584
px = 291.4342
py = 307.0368
pz = 999.1584
pa = 0.0
id = 1
GOTO RunSavePickup
ReturnHelena:
// Michelle
x = 309.0412
y = 304.9286
z = 1003.3059
px = 309.3751
py = 307.4927
pz = 1003.3059
pa = 0.0
id = 2
GOTO RunSavePickup
ReturnMichelle:
// Katie
x = 272.189
y = 307.05
z = 999.15
px = 271.2983
py = 304.8351
pz = 999.1573
pa = 90.0
id = 3
GOTO RunSavePickup
ReturnKatie:
// Barbara
x = 318.2411
y = 317.3365
z = 999.1578
px = 319.5966
py = 316.9949
pz = 999.1578
pa = 220.0
id = 4
GOTO RunSavePickup
ReturnBarbara:
// Millie
x = 347.959
y = 301.7384
z = 999.15
px = 348.3625
py = 303.6932
pz = 999.15
pa = 0.0
id = 5
GOTO RunSavePickup
ReturnMillie:
ENDIF
ENDWHILE
RunSavePickup:
IF LOCATE_CHAR_ANY_MEANS_3D scplayer x y z 10.0 10.0 10.0 FALSE
CREATE_PICKUP 1277 3 x y z (pickup)
WHILE LOCATE_CHAR_ANY_MEANS_3D scplayer x y z 15.0 15.0 10.0 FALSE
WAIT 0
IF HAS_PICKUP_BEEN_COLLECTED pickup
SET_CHAR_COORDINATES_NO_OFFSET scplayer (px py pz)
SET_CHAR_HEADING scplayer (pa)
RESTORE_CAMERA_JUMPCUT
REMOVE_PICKUP pickup
DO_FADE 0 0
WAIT 50
ACTIVATE_SAVE_MENU
GET_PLAYER_CHAR 0 scplayer
SET_CHAR_HEADING scplayer (pa)
RESTORE_CAMERA_JUMPCUT
WAIT 2000
CREATE_PICKUP 1277 3 x y z (pickup)
ENDIF
ENDWHILE
REMOVE_PICKUP pickup
ENDIF
SWITCH id
CASE 0
GOTO ReturnDenise
BREAK
CASE 1
GOTO ReturnHelena
BREAK
CASE 2
GOTO ReturnMichelle
BREAK
CASE 3
GOTO ReturnKatie
BREAK
CASE 4
GOTO ReturnBarbara
BREAK
CASE 5
GOTO ReturnMillie
BREAK
ENDSWITCH
}
SCRIPT_END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment