Jump to content

Mission Auto Gun Giver


loms

Recommended Posts

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

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

Ashwin.Star

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

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

What are you talking about? Ashwins code is working - I just start a mission and weapons are loaded.

Link to comment
Share on other sites

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 cry.gif

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

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.

 

 

 

Link to comment
Share on other sites

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

No, i tryed it in Design your own mission i can try it again in normal mission

Link to comment
Share on other sites

Ashwin.Star

Look around & you will find user posted image, 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 by Ashwin the new boy
Link to comment
Share on other sites

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

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