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. Support

    3. Suggestions

Happy Holidays from the GTANet team!

Automatic Doors/Gates


GTA Solid Snake
 Share

Recommended Posts

GTA Solid Snake

How and what codes using cleo scrips would i created a door or a gate that opens when cj is near.

 

i need help with this as i am making a new area on the map which i want to look and feel like a army base and the automatic gates and doors would be a big help.

 

Thanks In advance.

Link to comment
Share on other sites

 

How and what codes using cleo scrips would i created a door or a gate that opens when cj is near.

 

i need help with this as i am making a new area on the map which i want to look and feel like a army base and the automatic gates and doors would be a big help.

 

Thanks In advance.

The script below spawns the gate at SF crackfactory area

(same like in original before it will be removed by mission accomplished)

Press F5 to open the door when stand infront of it

It moves sidewards

The door closes autom. when your distance to the door is bigger then 19.0

Or press F5 when you not standing near the door radius 3.0 to close it

 

 

{$CLEO .cs}:ONEDOOR_103A4: name_thread 'ONEDOOR' :ONEDOOR_30001: wait 0 ms if0256:   player $PLAYER_CHAR defined 004D: jump_if_false @ONEDOOR_3if00FE:   actor $PLAYER_ACTOR  0 (in-sphere)near_point -2127.0 -80.8 34.3281 radius  80.5  80.5  80.5004D: jump_if_false @ONEDOOR_30107: [email protected] = create_object 2990 at -2127.0 -80.8 34.32810177: set_object [email protected] Z_angle_to 180.00007: [email protected] =  -2127.0     // default X (closed)0007: [email protected] =  -80.8  //default Y (closed)0007: [email protected] =  34.3281  //default Z (closed)0007: [email protected] =  -2117.0    // destination X (open)0007: [email protected] =  -80.8  // destination Y (open)  0007: [email protected] =  34.3281  // destination Z (open)0006: [email protected] = 00006: [email protected] = 00002: jump @ONEDOOR_12:ONEDOOR_120001: wait 0 ms if0256:   player $PLAYER_CHAR defined 004D: jump_if_false @ONEDOOR_75 if 80FE:   not actor $PLAYER_ACTOR  0 (in-sphere)near_point [email protected] [email protected] [email protected] radius  95.5  95.5  95.5004D: jump_if_false @ONEDOOR_13 0002: jump @ONEDOOR_75:ONEDOOR_13if0039:   [email protected] ==  0  // integer values004D: jump_if_false @ONEDOOR_15 if00FE:   actor $PLAYER_ACTOR  0 (in-sphere)near_point [email protected] [email protected] [email protected] radius  20.5  20.5  20.50AB0:   key_pressed 116//------------------key = F5 004D: jump_if_false @ONEDOOR_150006: [email protected] = 1000A: [email protected] +=  1  // integer values0002: jump @ONEDOOR_15:ONEDOOR_15if0039:   [email protected] ==  1  // integer values004D: jump_if_false @ONEDOOR_18:ONEDOOR_16if0039:   [email protected] ==  1  // integer values004D: jump_if_false @ONEDOOR_17034E: move_object [email protected] to  [email protected] [email protected] [email protected] speed  0.1  0.1  0.0 flag  0if04E5:  object [email protected] near_point [email protected] [email protected] radius 1.0 1.0 flag 0004D: jump_if_false @ONEDOOR_170006: [email protected] = 20006: [email protected] = 10001: wait 500 ms0002: jump @ONEDOOR_29:ONEDOOR_17if0039:   [email protected] ==  3  // integer values004D: jump_if_false @ONEDOOR_18034E: move_object [email protected] to  [email protected] [email protected] [email protected] speed  0.1  0.1  0.0 flag  0if04E5:  object [email protected] near_point [email protected] [email protected] radius 0.1 0.1 flag 0004D: jump_if_false @ONEDOOR_180006: [email protected] = 00006: [email protected] = 0:ONEDOOR_18if  and0039:   [email protected] ==  2  // integer values80FE:   not actor $PLAYER_ACTOR  0 (in-sphere)near_point [email protected] [email protected] [email protected] radius  19.0  19.0  15.0004D: jump_if_false @ONEDOOR_190006: [email protected] = 10006: [email protected] = 30002: jump @ONEDOOR_12:ONEDOOR_19if  and0039:   [email protected] ==  2  // integer values80FE:   not actor $PLAYER_ACTOR  0 (in-sphere)near_point [email protected] [email protected] [email protected] radius  3.0  3.0  5.00AB0:   key_pressed 116004D: jump_if_false @ONEDOOR_290006: [email protected] = 10006: [email protected] = 30002: jump @ONEDOOR_12:ONEDOOR_290002: jump @ONEDOOR_12:ONEDOOR_7501C4: remove_references_to_object [email protected]  // This object will now disappear when the player looks away03F0: text_draw_toggle  0  0001: wait 1000 ms0006: [email protected] = 00006: [email protected] = 00002: jump @ONEDOOR_3

 

Link to comment
Share on other sites

  • 5 weeks later...

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.