Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Forum Support

    3. Suggestions

[Help] My Frist ini


Nesthor
 Share

Recommended Posts

This is my first cleo with an .ini file, however I have some doubts, for example:

 

Can the same variavle 1 @ 2 @ 3 @ 4 @ and 5 @ be used in all jumps?

 

the ini file has some start and end instructions ??

 

My cleo only reproduces a clue when the player is in an area that the user can configure using the ini file.

 

Here is my script, I do not know if it's well done, but I'm doing it

 

cleo:

 

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
03A4: name_thread 'BS_AMBIENT'

:START
WAIT 0
IF
Player.Defined($PLAYER_CHAR)
ELSE_JUMP @START
JUMP  @ENABLE_001

:ENABLE_001
IF
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Enable" key "Benable" 
0019:  [email protected] > 0
jf @ENABLE_001
jump @TERMINAL_001

:TERMINAL_001
if
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station1" key "Enable" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station1" key "Xcoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station1" key "Ycoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station1" key "Zcoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station1" key "AreaSize" 
if
0019:  [email protected] > 0
jf @TERMINAL_002
wait 0
if 
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] 
jf @TERMINAL_002
0952: load_soundtrack 13
wait 1000
0954: start_playing_loaded_soundtrack
jump @STOP_TRACK

:TERMINAL_002
if
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station2" key "Enable" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station2" key "Xcoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station2" key "Ycoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station2" key "Zcoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station2" key "AreaSize" 
if
0019:  [email protected] > 0
jf @TERMINAL_003
wait 0
if 
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] 
jf @TERMINAL_003
0952: load_soundtrack 13
wait 1000
0954: start_playing_loaded_soundtrack
jump @STOP_TRACK

:TERMINAL_003
if
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station3" key "Enable" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station3" key "Xcoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station3" key "Ycoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station3" key "Zcoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station3" key "AreaSize" 
if
0019:  [email protected] > 0
jf @TERMINAL_004
wait 0
if 
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] 
jf @TERMINAL_004
0952: load_soundtrack 13
wait 1000
0954: start_playing_loaded_soundtrack
jump @STOP_TRACK

:TERMINAL_004
if
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station4" key "Enable" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station4" key "Xcoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station4" key "Ycoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station4" key "Zcoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station4" key "AreaSize" 
if
0019:  [email protected] > 0
jf @TERMINAL_005
wait 0
if 
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] 
jf @TERMINAL_005
0952: load_soundtrack 13
wait 1000
0954: start_playing_loaded_soundtrack
jump @STOP_TRACK

:TERMINAL_005
if
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station5" key "Enable" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station5" key "Xcoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station5" key "Ycoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station5" key "Zcoordinate" 
0AF0: [email protected] = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station5" key "AreaSize" 
if
0019:  [email protected] > 0
jf @TERMINAL_001
wait 0
if 
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] 
jf @TERMINAL_001
0952: load_soundtrack 13
wait 1000
0954: start_playing_loaded_soundtrack
jump @STOP_TRACK

:STOP_TRACK
WAIT 1000
if 
80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]
jf @STOP_TRACK
0955: end_playing_loaded_soundtrack
jump @START         

The ini:

 


;-------Activacion General / General Activation -------

[Enable]

; Para activar el mod cambia este valor a 1, to activate the mod change this value to 1

Benable = 0 

;-----------------Instrucciones /Instructions ------------------

;Enable = 1 activa el audio en la terminal. Los valores: "XCoordinate", "Ycoordinate", y "Zcoordinate" representan la ubicación en el mapa, para obtener estos valores se deben utilizar el cleo mod para mostrar la ubicacion del jugador, el valor "AreaSize" corresponde el área en la que quiere que mar activado El mod, esta en nidades metricas del juego, por ejemplo, un valor de 50, corresponde a 50 metros en el juego (este valor es el recomendado) esto depende del tamao de la terminal

;Enable = 1 Activate sound in bus station. The values: "XCoordinate", "Ycoordinate", and "Zcoordinate" represent the location on the map, to obtain these values the cleo mod must be used to show the location of the player, the value "AreaSize" corresponds to the area in which you want it to be activated. The mod, is in metric units of the game, for example, a value of 50, corresponds to 50 meters in the game (this value is recommended) this depends on the size of the the terminal

;-------Terminal 1 / Bus Station 1-------

[Bus_station1]

Enable = 0

Xcoordinate = 0.0
Ycoordinate = 0.0
zcoordinate = 0.0
AreaSize = 50.0 

;------- Terminal 2 / Bus Station 2 -------

[Bus_station2]

Enable = 0

Xcoordinate = 0.0
Ycoordinate = 0.0
zcoordinate = 0.0
AreaSize = 50.0 

;------- Terminal 3 / Bus Station 3 -------

[Bus_station3]

Enable = 0

Xcoordinate = 0.0
Ycoordinate = 0.0
zcoordinate = 0.0
AreaSize = 50.0 

;------- Terminal 4 / Bus Station 4 -------

[Bus_station3]

Enable = 0

Xcoordinate = 0.0
Ycoordinate = 0.0
zcoordinate = 0.0
AreaSize = 50.0 

;------- Terminal 5 / Bus Station 5 -------

[Bus_station3]

Enable = 0

Xcoordinate = 0.0
Ycoordinate = 0.0
zcoordinate = 0.0
AreaSize = 50.0 

    

Do you have any observations? I did following some post here to read values of an ini

Link to comment
Share on other sites

 

Open and close the ini file

and use opcode 0AF2: for floats

{$CLEO .cs}
03A4: name_thread 'BS_AMB'

:START
WAIT 250
IF
0A9A: 0@ = openfile "CLEO\BusStations.ini" mode 114
ELSE_JUMP @START
0AF0: 1@ = get_int_from_ini_file "CLEO\BusStations.ini" section "Enable" key "Benable" 
0A9B: closefile 0@
IF
0019:  1@ > 0
jf @START



:TERMINAL_001
WAIT 0
IF
Player.Defined($PLAYER_CHAR)
ELSE_JUMP @TERMINAL_001
//03F0: enable_text_draw 1
//045A: text_draw_1number  50.0  250.0 'NUMBER' 1@

IF
0A9A: 0@ = openfile "CLEO\BusStations.ini" mode 114
ELSE_JUMP @TERMINAL_001

0AF0: 1@ = get_int_from_ini_file "CLEO\BusStations.ini" section "Bus_station1" key "Enable"
0AF2: 2@ = get_float_from_ini_file "CLEO\BusStations.ini" section "Bus_station1" key "Xcoordinate"
0AF2: 3@ = get_float_from_ini_file "CLEO\BusStations.ini" section "Bus_station1" key "Ycoordinate"
0AF2: 4@ = get_float_from_ini_file "CLEO\BusStations.ini" section "Bus_station1" key "Zcoordinate"
0AF2: 5@ = get_float_from_ini_file "CLEO\BusStations.ini" section "Bus_station1" key "AreaSize"
0A9B: closefile 0@
if
0019:  1@ > 0
jf @TERMINAL_002
if 
00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere 2@ 3@ 4@ radius 5@ 5@ 5@ 
jf @TERMINAL_002
0952: load_soundtrack 13
wait 1000
0954: start_playing_loaded_soundtrack
5@ += 5.0
jump @STOP_TRACK



:TERMINAL_002
jump @TERMINAL_001




:STOP_TRACK
WAIT 0
IF
Player.Defined($PLAYER_CHAR)
ELSE_JUMP @STOP_TRACK
if 
80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere 2@ 3@ 4@ radius 5@ 5@ 5@
jf @STOP_TRACK
0955: end_playing_loaded_soundtrack
jump @START

 

 

don't make spaces inside entries of ini file

(don't know if it's really required, i just too lazy to check it out because your script caused a heavy crash on my computer)

[Enable]
Benable=1 

[Bus_station1]
Enable=1

Xcoordinate=-1580.1
Ycoordinate=1220.7
zcoordinate=7.1
AreaSize=20.0

 

 

P.S.

5@ += 5.0

read here

 

Edited by ZAZ
Link to comment
Share on other sites

Thanks for reply

 

So, can the same variable 1 @ 2 @ 3 @ 4 @ and 5 @ be used for each jump?

 

24 minutes ago, ZAZ said:

don't make spaces inside entries of ini file

(don't know if it's really required, i just too lazy to check it out because your script caused a heavy crash on my computer)

Sorry, I also crashed my PC 😪 It's the first time I try to use a file of this type, the spaces I do not think are necessary, I only put them to differentiate in the jumps from one station to another, the use of ";" is it correct to be able to embed the instructions in the ini file?

 

If I want to use this same kernel for android, what directory should I put to read the ini file?

Link to comment
Share on other sites

1 hour ago, Nesthor said:

So, can the same variable 1 @ 2 @ 3 @ 4 @ and 5 @ be used for each jump? 

In case if you submit content to a variable before you immediately check then that content, then it doesn't need to hold that content, right?

example.

0@ = get_content_from_ini
if
  0@ == 1
jf @next_one
<action script>
jump @exit

:next_one
0@ = get_new_content_from_ini
if
  0@ == 2
jf @next_two
<action script>
jump @exit  

 

but it needs that the variable hold the handle of an actor

in this case it needs to hold the handle as long as you release it with opcode 01C2: or 009B: or 034F:

example:

0@ = create_actor
if
not actor 0@ dead
jf @cleanup
actor 0@ go_to xyz
jump @skip

:cleanup
01C2: remove_references_to_actor 0@ // Like turning an actor into a random pedestrian
jump @Start

 

 

 

 

Quote

If I want to use this same kernel for android, what directory should I put to read the ini file?

don't know, ask here

Edited by ZAZ
Link to comment
Share on other sites

Already set the area equal to the activation, so I said to 80.0 the same, but I still do not get the cars or objects disappear every time I restart within the same area of activation. For example This code:

 

{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 
Thread "PSSgate" 
jump @START

:START
wait 0 
if and
   Player.Defined($PLAYER_CHAR)
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2888.9827 -1940.198 10.7892 radius 80.0 80.0 80.0
else_jump @START 
Model.Load(968)
038B: load_requested_models  
WAIT 500
[email protected] = Object.Create(968, 2966.11, -1927.49, 10.49)
0453: set_object [email protected] XYZ_rotation 0.0 90.0 0.0 
[email protected] = Object.Create(968, 2886.17, -1928.6,  10.4328)
0453: set_object [email protected] XYZ_rotation 0.0 90.0 0.0 
JUMP @GATE_001

:GATE_001
0001: wait 250 ms 
00D6: if 
00EE:   actor $PLAYER_ACTOR sphere 0 near_point 2969.0374 -1933.1233 radius 7.0 7.0 in_car 
004D: jump_if_false @GATE_003 
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 80.0 0.0 
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 70.0 0.0 
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 60.0 0.0 
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 50.0 0.0 
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 40.0 0.0 
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 30.0 0.0 
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 20.0 0.0 
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 10.0 0.0 
0002: jump @GATE_002

:GATE_002
0001: wait 0 ms 
00D6: if 
00EC:  NOT actor $PLAYER_ACTOR sphere 0 near_point 2969.0374 -1933.1233 radius 9.0 9.0 
0001: wait 10000 ms 
0453: set_object [email protected] XYZ_rotation 0.0 90.0 0.0 
0002: jump @GATE_003 
 
:GATE_003
0001: wait 250 
00D6: if 
00EE:   actor $PLAYER_ACTOR sphere 0 near_point 2889.7646 -1923.0292 radius 7.0 7.0 in_car 
004D: jump_if_false @GATE_001
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 80.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 70.0 0.0 
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 60.0 0.0 
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 50.0 0.0 
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 40.0 0.0 
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 30.0 0.0 
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 20.0 0.0 
0001: wait 100 ms 
0453: set_object [email protected] XYZ_rotation 0.0 10.0 0.0 
0002: jump @GATE_004

:GATE_004
0001: wait 0 ms 
00D6: if 
00EC:  NOT actor $PLAYER_ACTOR sphere 0 near_point 2889.7646 -1923.0292 radius 9.0 9.0 
0001: wait 10000 ms 
0453: set_object [email protected] XYZ_rotation 0.0 90.0 0.0 
0002: jump @GATE_005

:GATE_005
wait 0 
if 
80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere 2888.9827 -1940.198 10.7892 radius 80.0 80.0 80.0 
jf @GATE_001
else_jump @GATE_005
Object.Destroy([email protected])
Object.Destroy([email protected])
wait 1000
jump @START
 

 

It is the creation and movement of barriers, works well while I'm in the area and leave it and return, but if for some reason I close the game and this is resumed in the area of activation appear two barriers (the previous and the new) and create in the game previous does not open, only the one in this game, if I add the code:

 

Object.removereferences ([email protected])

 

the object disappears but no longer appears within the same game, I have to do so that each end a game or close the play the memory is cleaned and no apper objects to the or valuables created in the Previous game

Link to comment
Share on other sites

28 minutes ago, Nesthor said:

Already set the area equal to the activation, so I said to 80.0 the same, but I still do not get the cars or objects disappear every time I restart within the same area of activation.

don't make it equal

i said, make bigger radius for exit zone as radius for enter zone

 

 

 

 

 

 

 

 

{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 
Thread "PSSgate" 
jump @START          <<--------- useless

:START
wait 0 
if
   Player.Defined($PLAYER_CHAR)     <<---------- make single check for  Player.Defined
else_jump @START
if
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2888.9827 -1940.198 10.7892 radius 80.0 80.0 80.0
else_jump @START 
Model.Load(968)
038B: load_requested_models  
WAIT 500
1@ = Object.Create(968, 2966.11, -1927.49, 10.49)
0453: set_object 1@ XYZ_rotation 0.0 90.0 0.0 
2@ = Object.Create(968, 2886.17, -1928.6,  10.4328)
0453: set_object 2@ XYZ_rotation 0.0 90.0 0.0 
JUMP @GATE_001      <<--------------------------------- useless

:GATE_001
0001: wait 250 ms     <<--------- too much, make wait 0
       <<-------------------------- check for Player.Defined is missing
00D6: if 
00EE:   actor $PLAYER_ACTOR sphere 0 near_point 2969.0374 -1933.1233 radius 7.0 7.0 in_car 
004D: jump_if_false @GATE_003 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 80.0 0.0 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 70.0 0.0 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 60.0 0.0 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 50.0 0.0 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 40.0 0.0 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 30.0 0.0 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 20.0 0.0 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 10.0 0.0 
0002: jump @GATE_002             <<--------------------------------- useless

:GATE_002          <<--------------------------------- useless
0001: wait 0 ms        <<--------------------------------- useless
00D6: if 
00EC:  NOT actor $PLAYER_ACTOR sphere 0 near_point 2969.0374 -1933.1233 radius 9.0 9.0
       <<--------------------------------- else_jump is missing !!!!!!!!!!!!!!!!
0001: wait 10000 ms     
0453: set_object 1@ XYZ_rotation 0.0 90.0 0.0   
0002: jump @GATE_003        <<--------------------------------- useless
 
:GATE_003
0001: wait 250    <<--------- too much, make wait 0
00D6: if 
00EE:   actor $PLAYER_ACTOR sphere 0 near_point 2889.7646 -1923.0292 radius 7.0 7.0 in_car 
004D: jump_if_false @GATE_001
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 80.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 70.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 60.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 50.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 40.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 30.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 20.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 10.0 0.0 
0002: jump @GATE_004    <<--------------------------------- useless

:GATE_004   <<--------------------------------- useless
0001: wait 0 ms       <<--------------------------------- useless
00D6: if 
00EC:  NOT actor $PLAYER_ACTOR sphere 0 near_point 2889.7646 -1923.0292 radius 9.0 9.0 
  <<--------------------------------- else_jump is missing !!!!!!!!!!!!!!!!
0001: wait 10000 ms 
0453: set_object 2@ XYZ_rotation 0.0 90.0 0.0 
0002: jump @GATE_005    <<--------------------------------- useless

:GATE_005   
wait 0
    <<-------------------------- check for Player.Defined is missing
if 
80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere 2888.9827 -1940.198 10.7892 radius 80.0 80.0 80.0 
jf @GATE_001          <<--------------------------------- wrong else_jump
else_jump @GATE_005
Object.Destroy(1@)
Object.Destroy(2@)
wait 1000
jump @START

 

 

Make bigger radius for exit zone as radius for enter zone

if 
80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere 2888.9827 -1940.198 10.7892 radius 85.0 85.0 85.0 
else_jump @GATE_005

 

 

 

long wait times like wait 10000 are not good, the code stucks there, not possible to check permanently if player is available

 

 

  • Like 1
Link to comment
Share on other sites

  • 3 months later...
Dr.  Prakamya Khare
On Fri Apr 19 2019 at 10:34 AM, ZAZ said:

don't make it equal

i said, make bigger radius for exit zone as radius for enter zone

 

 

 

 

 

 

 

 

{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 
Thread "PSSgate" 
jump @START          <<--------- useless

:START
wait 0 
if
   Player.Defined($PLAYER_CHAR)     <<---------- make single check for  Player.Defined
else_jump @START
if
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2888.9827 -1940.198 10.7892 radius 80.0 80.0 80.0
else_jump @START 
Model.Load(968)
038B: load_requested_models  
WAIT 500
1@ = Object.Create(968, 2966.11, -1927.49, 10.49)
0453: set_object 1@ XYZ_rotation 0.0 90.0 0.0 
2@ = Object.Create(968, 2886.17, -1928.6,  10.4328)
0453: set_object 2@ XYZ_rotation 0.0 90.0 0.0 
JUMP @GATE_001      <<--------------------------------- useless

:GATE_001
0001: wait 250 ms     <<--------- too much, make wait 0
       <<-------------------------- check for Player.Defined is missing
00D6: if 
00EE:   actor $PLAYER_ACTOR sphere 0 near_point 2969.0374 -1933.1233 radius 7.0 7.0 in_car 
004D: jump_if_false @GATE_003 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 80.0 0.0 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 70.0 0.0 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 60.0 0.0 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 50.0 0.0 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 40.0 0.0 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 30.0 0.0 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 20.0 0.0 
0001: wait 100 ms 
0453: set_object 1@ XYZ_rotation 0.0 10.0 0.0 
0002: jump @GATE_002             <<--------------------------------- useless

:GATE_002          <<--------------------------------- useless
0001: wait 0 ms        <<--------------------------------- useless
00D6: if 
00EC:  NOT actor $PLAYER_ACTOR sphere 0 near_point 2969.0374 -1933.1233 radius 9.0 9.0
       <<--------------------------------- else_jump is missing !!!!!!!!!!!!!!!!
0001: wait 10000 ms     
0453: set_object 1@ XYZ_rotation 0.0 90.0 0.0   
0002: jump @GATE_003        <<--------------------------------- useless
 
:GATE_003
0001: wait 250    <<--------- too much, make wait 0
00D6: if 
00EE:   actor $PLAYER_ACTOR sphere 0 near_point 2889.7646 -1923.0292 radius 7.0 7.0 in_car 
004D: jump_if_false @GATE_001
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 80.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 70.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 60.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 50.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 40.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 30.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 20.0 0.0 
0001: wait 100 ms 
0453: set_object 2@ XYZ_rotation 0.0 10.0 0.0 
0002: jump @GATE_004    <<--------------------------------- useless

:GATE_004   <<--------------------------------- useless
0001: wait 0 ms       <<--------------------------------- useless
00D6: if 
00EC:  NOT actor $PLAYER_ACTOR sphere 0 near_point 2889.7646 -1923.0292 radius 9.0 9.0 
  <<--------------------------------- else_jump is missing !!!!!!!!!!!!!!!!
0001: wait 10000 ms 
0453: set_object 2@ XYZ_rotation 0.0 90.0 0.0 
0002: jump @GATE_005    <<--------------------------------- useless

:GATE_005   
wait 0
    <<-------------------------- check for Player.Defined is missing
if 
80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere 2888.9827 -1940.198 10.7892 radius 80.0 80.0 80.0 
jf @GATE_001          <<--------------------------------- wrong else_jump
else_jump @GATE_005
Object.Destroy(1@)
Object.Destroy(2@)
wait 1000
jump @START

 

 

Make bigger radius for exit zone as radius for enter zone

if 
80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere 2888.9827 -1940.198 10.7892 radius 85.0 85.0 85.0 
else_jump @GATE_005

 

 

 

long wait times like wait 10000 are not good, the code stucks there, not possible to check permanently if player is available

 

 

Hey respected zaz can u help me in how to load ini file in android, because pc opcodes does not work in android my game always crashes please help me

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.