GTA Solid Snake Posted April 29, 2010 Share Posted April 29, 2010 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 More sharing options...
ZAZ Posted April 29, 2010 Share Posted April 29, 2010 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 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
GTA Solid Snake Posted April 29, 2010 Author Share Posted April 29, 2010 thanks zaz, thats just what i needed Link to comment Share on other sites More sharing options...
nitishdash Posted May 29, 2010 Share Posted May 29, 2010 THANKS FOR THIS. IT IS REALLY USEFUL Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now