loms Posted May 26, 2012 Share Posted May 26, 2012 I tryed to make Mission Automatic Gun Giver but when i try it in mission it´s only start mission and it´s wait some 1-5 second and mission is (incorrect finished) What is wrong here is code {$CLEO .cs}0000: NOP03A4: name_thread 'MissionGG' 0247: load_model #MP5LNG0247: load_model #M40247: load_model #DESERT_EAGLE038B: load_requested_models0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here :MissionGG_101wait 0 msif0248: model #MP5LNG available0248: model #M4 available0248: model #DESERT_EAGLE available$ONMISSION = 1004D: jump_if_false @MissionGG_101 01B2: give_actor $PLAYER_ACTOR weapon #MP5LNG ammo 2000 // Load the weapon model before using this 01B2: give_actor $PLAYER_ACTOR weapon #M4 ammo 2000 // Load the weapon model before using this 01B2: give_actor $PLAYER_ACTOR weapon #DESERT_EAGLE ammo 2000 // Load the weapon model before using thiswait 0 msif$ONMISSION = 00555: remove_weapon #MP5LNG from_actor $PLAYER_ACTOR 0555: remove_weapon #M4 from_actor $PLAYER_ACTOR 0555: remove_weapon #DESERT_EAGLE from_actor $PLAYER_ACTORjump @MissionGG_141:MissionGG_1410A93: end_custom_thread Link to comment Share on other sites More sharing options...
Bad.boy! Posted May 26, 2012 Share Posted May 26, 2012 This line: 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here Can only be used in missions, your code needs a mission format. And don't forget to use "if and", and use "$ONMISSION == 0 // or 1" in a conditon. Link to comment Share on other sites More sharing options...
loms Posted May 26, 2012 Author Share Posted May 26, 2012 didn´t work Link to comment Share on other sites More sharing options...
Ashwin.Star Posted May 26, 2012 Share Posted May 26, 2012 after looking at your script > I think that you want to make a Script which will give you weapon if you are on Mission & remove those weapons when you aren't on Mission if i am right here is your Script {$CLEO }03A4: name_thread 'MissionGG' 0247: load_model #MP5LNG0247: load_model #M40247: load_model #DESERT_EAGLE038B: load_requested_models:MissionGG_101wait 0 msif and0248: model #MP5LNG available0248: model #M4 available0248: model #DESERT_EAGLE available$ONMISSION == 1004D: jump_if_false @MissionGG_101 01B2: give_actor $PLAYER_ACTOR weapon #MP5LNG ammo 2000 // Load the weapon model before using this 01B2: give_actor $PLAYER_ACTOR weapon #M4 ammo 2000 // Load the weapon model before using this 01B2: give_actor $PLAYER_ACTOR weapon #DESERT_EAGLE ammo 2000 // Load the weapon model before using this:MissionGG_102wait 0 msif$ONMISSION == 0jf @MissionGG_1020555: remove_weapon #MP5LNG from_actor $PLAYER_ACTOR 0555: remove_weapon #M4 from_actor $PLAYER_ACTOR 0555: remove_weapon #DESERT_EAGLE from_actor $PLAYER_ACTORwait 5000jump @MissionGG_101 Link to comment Share on other sites More sharing options...
loms Posted May 26, 2012 Author Share Posted May 26, 2012 Didn´t Work what to do I want upload this i think this will be usefull but when i try go mission i dont get these weapons Link to comment Share on other sites More sharing options...
Jack Posted May 26, 2012 Share Posted May 26, 2012 What are you talking about? Ashwins code is working - I just start a mission and weapons are loaded. Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
Bad.boy! Posted May 26, 2012 Share Posted May 26, 2012 after looking at your script > I think that you want to make a Script which will give you weapon if you are on Mission & remove those weapons when you aren't on Mission if i am right here is your Script {$CLEO }03A4: name_thread 'MissionGG' 0247: load_model #MP5LNG0247: load_model #M40247: load_model #DESERT_EAGLE038B: load_requested_models:MissionGG_101wait 0 msif and0248: model #MP5LNG available0248: model #M4 available0248: model #DESERT_EAGLE available$ONMISSION == 1004D: jump_if_false @MissionGG_101 01B2: give_actor $PLAYER_ACTOR weapon #MP5LNG ammo 2000 // Load the weapon model before using this 01B2: give_actor $PLAYER_ACTOR weapon #M4 ammo 2000 // Load the weapon model before using this 01B2: give_actor $PLAYER_ACTOR weapon #DESERT_EAGLE ammo 2000 // Load the weapon model before using this:MissionGG_102wait 0 msif$ONMISSION == 0jf @MissionGG_1020555: remove_weapon #MP5LNG from_actor $PLAYER_ACTOR 0555: remove_weapon #M4 from_actor $PLAYER_ACTOR 0555: remove_weapon #DESERT_EAGLE from_actor $PLAYER_ACTORwait 5000jump @MissionGG_101 Now your doing it too Use "038B: load_requested_models" OR "0248: model #MP5LNG available". Using both is a complete waste of memory. Link to comment Share on other sites More sharing options...
loms Posted June 1, 2012 Author Share Posted June 1, 2012 so what is problem i tryed myself but i didn´t solved it Link to comment Share on other sites More sharing options...
Jack Posted June 1, 2012 Share Posted June 1, 2012 Try this: {$CLEO .cs}03A4: name_thread 'MissionGG' 0247: load_model #MP5LNG0247: load_model #M40247: load_model #DESERT_EAGLE038B: load_requested_models:MissionGG_101wait 0 msif and0248: model #MP5LNG available0248: model #M4 available0248: model #DESERT_EAGLE available0038: $ONMISSION == 1 004D: jump_if_false @MissionGG_101 01B2: give_actor $PLAYER_ACTOR weapon 29 ammo 2000 // Load the weapon model before using this 01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 2000 // Load the weapon model before using this 01B2: give_actor $PLAYER_ACTOR weapon 24 ammo 2000 // Load the weapon model before using this:MissionGG_102wait 0 msif0038: $ONMISSION == 0004D: jump_if_false @MissionGG_1020555: remove_weapon 29 from_actor $PLAYER_ACTOR 0555: remove_weapon 31 from_actor $PLAYER_ACTOR 0555: remove_weapon 24 from_actor $PLAYER_ACTOR wait 5000jump @MissionGG_101 It's actually same as the Ashwins code - I just used SB opcode DB to define some of the opcodes he wrote - see it yourself. Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
loms Posted June 1, 2012 Author Share Posted June 1, 2012 didn´t work Link to comment Share on other sites More sharing options...
Bad.boy! Posted June 1, 2012 Share Posted June 1, 2012 What happens when you start a mission? Maybe the mission your playing sets your weapons? Try this: {$CLEO .cs}03A4: name_thread 'WEAPONS':STARTwait 0if and0256: player $PLAYER_CHAR defined 0038: $ONMISSION == 1jf @START 0247: load_model #MP5LNG0247: load_model #M40247: load_model #DESERT_EAGLE:CHECKwait 0if and0248: model #MP5LNG available0248: model #M4 available0248: model #DESERT_EAGLE availablejf @CHECK01B2: give_actor $PLAYER_ACTOR weapon 29 ammo 2000 // Load the weapon model before using this01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 2000 // Load the weapon model before using this01B2: give_actor $PLAYER_ACTOR weapon 24 ammo 2000 // Load the weapon model before using this0249: release_model #MP5LNG0249: release_model #M40249: release_model #DESERT_EAGLE:ENDwait 0if 0038: $ONMISSION == 0jf @ENDif 0491: actor $PLAYER_ACTOR has_weapon 29then 0555: remove_weapon 29 from_actor $PLAYER_ACTORendif 0491: actor $PLAYER_ACTOR has_weapon 31then 0555: remove_weapon 31 from_actor $PLAYER_ACTORendif 0491: actor $PLAYER_ACTOR has_weapon 24then 0555: remove_weapon 24 from_actor $PLAYER_ACTORendjump @START Link to comment Share on other sites More sharing options...
loms Posted June 2, 2012 Author Share Posted June 2, 2012 No, it´s not work Link to comment Share on other sites More sharing options...
Ashwin.Star Posted June 2, 2012 Share Posted June 2, 2012 Did you code those Missions ??? Link to comment Share on other sites More sharing options...
loms Posted June 2, 2012 Author Share Posted June 2, 2012 No, i tryed it in Design your own mission i can try it again in normal mission Link to comment Share on other sites More sharing options...
loms Posted June 2, 2012 Author Share Posted June 2, 2012 Not worked in normal missions :\ Link to comment Share on other sites More sharing options...
Ashwin.Star Posted June 2, 2012 Share Posted June 2, 2012 (edited) Look around & you will find , Use it from next time. @Topic That script is working for Other, i think there is any other problem make sure that your Mission set the value of $ONMISSION var to 1 when they Begin Edited June 2, 2012 by Ashwin the new boy Link to comment Share on other sites More sharing options...
Bad.boy! Posted June 2, 2012 Share Posted June 2, 2012 No, i tryed it in Design your own mission i can try it again in normal mission Try it with a normal mission, not DYOM Link to comment Share on other sites More sharing options...
loms Posted June 2, 2012 Author Share Posted June 2, 2012 Not worked i tryed it 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