brdgamemaster Posted December 1, 2011 Share Posted December 1, 2011 I script a cleo mod for gta 3 and I intended to spawn 3 Yakuza peds in your safehouse in stauntan island, while they carried shotguns, uzis, and ak47s, follow you and assist you. For some reason I cant get it to work, I made the script: {$CLEO .cs} :GANGMEM 03A4: name_thread 'GANGMEM' :GANGMEM_485 0001: wait 5000 00D6: if 0038: $ONMISSION == 0 // integer values 004D: jump_if_false @GANGMEM_485 00D6: if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @GANGMEM_485 00D6: if 0039: [email protected] == 0 // integer values 004D: jump_if_false @GANGMEM_485 00D6: if 0248: model #GANG08 available 004D: jump_if_false @GANGMEM_485 00D6: if 0248: model #UZI available 004D: jump_if_false @GANGMEM_485 00D6: if 0248: model #SHOTGUN available 004D: jump_if_false @GANGMEM_485 00D6: if 0248: model #AK47 available 004D: jump_if_false @GANGMEM_485 009A: $723 = create_actor 4 #GANG08 at 97.7477 -467.1534 16.0461 0173: set_actor $723 z_angle_to 180 0568: set_actor $723 untargetable 1 01B2: give_actor $723 weapon 3 ammo 9999 // Load the weapon model before using this 0223: set_actor $723 health_to 1000 02E2: set_actor $723 weapon_accuracy_to 90 00D6: if 8118: not actor $723 dead 004D: jump_if_false @GANGMEM_485 01DF: tie_actor $723 to_player $PLAYER_CHAR 009A: $724 = create_actor 4 #GANG08 at 101.8649 -467.2302 16.0461 0173: set_actor $724 z_angle_to 180 0568: set_actor $724 untargetable 1 01B2: give_actor $724 weapon 4 ammo 9999 // Load the weapon model before using this 0223: set_actor $724 health_to 1000 02E2: set_actor $724 weapon_accuracy_to 90 00D6: if 8118: not actor $724 dead 004D: jump_if_false @GANGMEM_485 01DF: tie_actor $724 to_player $PLAYER_CHAR 009A: $725 = create_actor 4 #GANG08 at 104.9266 -467.279 16.0461 0173: set_actor $725 z_angle_to 180 0568: set_actor $725 untargetable 1 01B2: give_actor $725 weapon 5 ammo 9999 // Load the weapon model before using this 0223: set_actor $725 health_to 1000 02E2: set_actor $725 weapon_accuracy_to 90 00D6: if 8118: not actor $725 dead 004D: jump_if_false @GANGMEM_485 01DF: tie_actor $725 to_player $PLAYER_CHAR If you guys have any ideas, please help me. I would totally appreciate it. Link to comment Share on other sites More sharing options...
fireguy109 Posted December 1, 2011 Share Posted December 1, 2011 (edited) You are doing it wrong. #1, you don't need three separate checks - consolidate them into one. And what the hell is "[email protected]" supposed to be? You need to define this first before you can check it. All it does is crash the game right now. Let's replace it with an island check. {$CLEO .cs}:GANGMEM03A4: name_thread 'GANGMEM'0001: wait 5000 ms:GANGMEM_4850001: wait 0 ms00D6: if and0038: $ONMISSION == 0 // integer values 0256: player $PLAYER_CHAR defined 03C6: current_island == 2004D: jump_if_false @GANGMEM_485 #2, you need to request the models before checking if they are available. And for God's sake, break this up into more manageable chunks. And you need waits in your scripts, otherwise the game will crash. 0247: request_model #GANG08 0247: request_model #SHOTGUN 0247: request_model #UZI 0247: request_model #AK47 :GANGMEM_4860001: wait 0 ms00D6: if and0248: model #GANG08 available 0248: model #UZI available 0248: model #SHOTGUN available 0248: model #AK47 available 004D: jump_if_false @GANGMEM_486 #3, use local variables instead of globals ([email protected], [email protected], etc instead of $1, $2). Opcode 0568 doesn't work with GTA 3, I don't know where you got that idea from. First spawn and group the actors, then check if they're dead. Once they are all spawned release the models to free up memory. 009A: [email protected] = create_actor 4 #GANG08 at 97.7477 -467.1534 16.0461 0173: set_actor [email protected] z_angle_to 180 01B2: give_actor [email protected] weapon 3 ammo 9999 // Load the weapon model before using this 0223: set_actor [email protected] health_to 1000 02E2: set_actor $723 weapon_accuracy_to 9001DF: tie_actor [email protected] to_player $PLAYER_CHAR009A: [email protected] = create_actor 4 #GANG08 at 101.8649 -467.2302 16.0461 0173: set_actor [email protected] z_angle_to 180 01B2: give_actor [email protected] weapon 4 ammo 9999 // Load the weapon model before using this 0223: set_actor [email protected] health_to 1000 02E2: set_actor [email protected] weapon_accuracy_to 9001DF: tie_actor [email protected] to_player $PLAYER_CHAR009A: [email protected] = create_actor 4 #GANG08 at 104.9266 -467.279 16.0461 0173: set_actor [email protected] z_angle_to 180 01B2: give_actor [email protected] weapon 5 ammo 9999 // Load the weapon model before using this 0223: set_actor [email protected] health_to 1000 02E2: set_actor [email protected] weapon_accuracy_to 9001DF: tie_actor [email protected] to_player $PLAYER_CHAR0249: release_model #GANG08 0249: release_model #SHOTGUN 0249: release_model #AK470249: release_model #UZI :GANGMEM_4870001: wait 0 ms00D6: if and0118: actor [email protected] dead 0118: actor [email protected] dead 0118: actor [email protected] dead 004D: jump_if_false @GANGMEM_48701C2: remove_references_to_actor [email protected] 01C2: remove_references_to_actor [email protected] 01C2: remove_references_to_actor [email protected]: end_thread So we'll end up with something like this - {$CLEO .cs}:GANGMEM03A4: name_thread 'GANGMEM'0001: wait 5000 ms:GANGMEM_4850001: wait 0 ms00D6: if and0038: $ONMISSION == 0 // integer values 0256: player $PLAYER_CHAR defined 03C6: current_island == 2004D: jump_if_false @GANGMEM_4850247: request_model #GANG08 0247: request_model #SHOTGUN 0247: request_model #UZI 0247: request_model #AK47 :GANGMEM_4860001: wait 0 ms00D6: if and0248: model #GANG08 available 0248: model #UZI available 0248: model #SHOTGUN available 0248: model #AK47 available 004D: jump_if_false @GANGMEM_486009A: [email protected] = create_actor 4 #GANG08 at 97.7477 -467.1534 16.0461 0173: set_actor [email protected] z_angle_to 180 01B2: give_actor [email protected] weapon 3 ammo 9999 // Load the weapon model before using this 0223: set_actor [email protected] health_to 1000 02E2: set_actor $723 weapon_accuracy_to 9001DF: tie_actor [email protected] to_player $PLAYER_CHAR009A: [email protected] = create_actor 4 #GANG08 at 101.8649 -467.2302 16.0461 0173: set_actor [email protected] z_angle_to 180 01B2: give_actor [email protected] weapon 4 ammo 9999 // Load the weapon model before using this 0223: set_actor [email protected] health_to 1000 02E2: set_actor [email protected] weapon_accuracy_to 9001DF: tie_actor [email protected] to_player $PLAYER_CHAR009A: [email protected] = create_actor 4 #GANG08 at 104.9266 -467.279 16.0461 0173: set_actor [email protected] z_angle_to 180 01B2: give_actor [email protected] weapon 5 ammo 9999 // Load the weapon model before using this 0223: set_actor [email protected] health_to 1000 02E2: set_actor [email protected] weapon_accuracy_to 9001DF: tie_actor [email protected] to_player $PLAYER_CHAR0249: release_model #GANG08 0249: release_model #SHOTGUN 0249: release_model #AK470249: release_model #UZI:GANGMEM_4870001: wait 0 ms00D6: if and0118: actor [email protected] dead 0118: actor [email protected] dead 0118: actor [email protected] dead 004D: jump_if_false @GANGMEM_48701C2: remove_references_to_actor [email protected] 01C2: remove_references_to_actor [email protected] 01C2: remove_references_to_actor [email protected]: end_thread Edited December 1, 2011 by fireguy109 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