skatefilter5 Posted February 5, 2018 Share Posted February 5, 2018 I have the custom global variable for player 2's group, like what happens is when his gangs starts shooting at my group and the game crashes in 10 seconds, but I don't know player 1's group doesn't crash after when shooting other gangs, when his group attack me, the game didn't crash, is there a way to fix this? I also tired groups from other actor whenever an leader start attack in 10 seconds the game crashes too. {$CLEO .cs}0000: NOP:DEFINEwait 0if 056D: actor $second_player_actor definedjf @DEFINEactor.StorePos($second_player_actor, [email protected], [email protected], [email protected])07AF: $PLAYER_GROUP = player $PLAYER_CHAR group06F0: set_group $PLAYER_GROUP distance_limit_to 9999999.007AF: $SECOND_PLAYER_GROUP = player $SECOND_PLAYER group06F0: set_group $SECOND_PLAYER_GROUP distance_limit_to 9999999.0:RECRUIT0AE1: [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 100.0 find_next 1 pass_deads 1wait 0if and056D: actor [email protected] defined056D: actor $second_player_actor definedjf @DEFINE0AE1: [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 100.0 find_next 1 pass_deads 1if and00E1: player 1 pressed_key 80457: player $SECOND_PLAYER aiming_at_actor [email protected]//056D: actor $second_player_actor definedjf @DEFINE 0AE1: [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 100.0 find_next 1 pass_deads 1089F: get_actor [email protected] pedtype_to [email protected] [email protected] == [email protected] == [email protected] == 8jf @DEFINEif 056D: actor $second_player_actor definedjf @DEFINE0ACA: show_text_box "Your gang is added to your group."0631: put_actor [email protected] in_group $SECOND_PLAYER_GROUPjump @DEFINE Link to comment Share on other sites More sharing options...
ZAZ Posted February 5, 2018 Share Posted February 5, 2018 how is this defined: $second_player_actor ? is $second_player_actor created in main.scm? use local var for 07AF: in cleo script also i recommand to release first the player group, before adding members, because it can crash if a group already exist 07AF: [email protected] = player $PLAYER_CHAR group0632: release_group [email protected]: put_actor [email protected] in_group [email protected]$PLAYER_CHAR is already member of $PLAYER_CHAR group and don't needs to be added about second player, i think for 07AF: only the handle of $PLAYER_CHAR works and not for any other actor i would do it in this way: 062F: [email protected] = create_group_type 00630: put_actor [email protected] in_group [email protected] as_leader0631: put_actor [email protected] in_group [email protected][email protected] should be the valid handle of the second player it's also possible to add the leader of group [email protected] to the $PLAYER_CHAR group CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Sanmodder Posted February 6, 2018 Share Posted February 6, 2018 I've corrected your scriptbut it worries meit must be very accurateotherwise they will crash indefinitelyv$ second_player_actor$ SECOND_PLAYER$ SECOND_PLAYER_GROUPbut I know what's going onyou want all the players to give a thick peoplethe game will not let you do ithomies are only assigned to carland there is a maximum of 7unless you change the limitbut there is another way outcreate an artificial groupnot recruited {$CLEO .cs}0000: NOPrepeatwait 0until if 056D: actor $second_player_actor defined07AF: $PLAYER_GROUP = player $PLAYER_CHAR group06F0: set_group $PLAYER_GROUP distance_limit_to 9999999.007AF: $SECOND_PLAYER_GROUP = player $SECOND_PLAYER group06F0: set_group $SECOND_PLAYER_GROUP distance_limit_to 9999999.0while true repeat wait 0 until if player.Defined(0) actor.StorePos($second_player_actor, [email protected], [email protected], [email protected]) if 0AE1: [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 100.0 find_next 1 pass_deads 1 then if not actor.Dead([email protected]) then 089F: get_actor [email protected] pedtype_to [email protected] if or [email protected] == 16 [email protected] == 7 [email protected] == 8 then if and 00E1: player 1 pressed_key 8 0457: player $SECOND_PLAYER aiming_at_actor [email protected] then 0ACA: show_text_box "Your gang is added to your group." 07AF: $SECOND_PLAYER_GROUP = player $SECOND_PLAYER group 0632: release_group $PLAYER_GROUP 0631: put_actor [email protected] in_group $SECOND_PLAYER_GROUP end end end endend Link to comment Share on other sites More sharing options...
skatefilter5 Posted February 6, 2018 Author Share Posted February 6, 2018 (edited) I've corrected your script but it worries me it must be very accurate otherwise they will crash indefinitely v $ second_player_actor $ SECOND_PLAYER $ SECOND_PLAYER_GROUP but I know what's going on you want all the players to give a thick people the game will not let you do it homies are only assigned to carl and there is a maximum of 7 unless you change the limit but there is another way out create an artificial group not recruited {$CLEO .cs}0000: NOPrepeatwait 0until if 056D: actor $second_player_actor defined07AF: $PLAYER_GROUP = player $PLAYER_CHAR group06F0: set_group $PLAYER_GROUP distance_limit_to 9999999.007AF: $SECOND_PLAYER_GROUP = player $SECOND_PLAYER group06F0: set_group $SECOND_PLAYER_GROUP distance_limit_to 9999999.0while true repeat wait 0 until if player.Defined(0) actor.StorePos($second_player_actor, [email protected], [email protected], [email protected]) if 0AE1: [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 100.0 find_next 1 pass_deads 1 then if not actor.Dead([email protected]) then 089F: get_actor [email protected] pedtype_to [email protected] if or [email protected] == 16 [email protected] == 7 [email protected] == 8 then if and 00E1: player 1 pressed_key 8 0457: player $SECOND_PLAYER aiming_at_actor [email protected] then 0ACA: show_text_box "Your gang is added to your group." 07AF: $SECOND_PLAYER_GROUP = player $SECOND_PLAYER group 0632: release_group $PLAYER_GROUP 0631: put_actor [email protected] in_group $SECOND_PLAYER_GROUP end end end endend <script data-cfasync="false" src="/cdn-cgi/scripts/d07b1474/cloudflare-static/email-decode.min.js"></script> okay, release $player_group solve the problem - also I have fix up my actor spawn that automatic recruit homies to remove player 1's group lol you miss 86EE: not actor [email protected] in_group $PLAYER_GROUP i try that yestesday to return player's groups and the game crashes so i add this opcode to prevent crashing to recruit player's group Edited February 6, 2018 by skatefilter5 Link to comment Share on other sites More sharing options...