IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 Mission Auto Gun Giver

 
Joni2030  
Posted: Saturday, May 26 2012, 10:50
Quote Post


Prankster
Group Icon
Group: Members
Joined: Jul 6, 2011

sf.gif

XXXXX



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

CODE
{$CLEO .cs}

0000: NOP

03A4: name_thread 'MissionGG'
0247: load_model #MP5LNG
0247: load_model #M4
0247: load_model #DESERT_EAGLE
038B: load_requested_models
0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here



:MissionGG_101
wait 0 ms
if
0248: model #MP5LNG available
0248: model #M4 available
0248: model #DESERT_EAGLE available
$ONMISSION = 1
004D: 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
wait 0 ms
if
$ONMISSION = 0
0555: remove_weapon #MP5LNG from_actor $PLAYER_ACTOR
0555: remove_weapon #M4 from_actor $PLAYER_ACTOR
0555: remove_weapon #DESERT_EAGLE from_actor $PLAYER_ACTOR
jump @MissionGG_141


:MissionGG_141
0A93: end_custom_thread






Users WebsitePM
  Top
 

 
Bad.boy!  
Posted: Saturday, May 26 2012, 11:13
Quote Post


SA modder
Group Icon
Group: Members
Joined: Jun 20, 2010

nl.gif

XXXXX



This line:
CODE
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.
PM
  Top
 

 
Joni2030  
Posted: Saturday, May 26 2012, 11:26
Quote Post


Prankster
Group Icon
Group: Members
Joined: Jul 6, 2011

sf.gif

XXXXX



didnīt work sad.gif
Users WebsitePM
  Top
 

 
Ashwin the new boy  
Posted: Saturday, May 26 2012, 11:43
Quote Post


I am The Most Confused Person
Group Icon
Group: Members
Joined: Nov 14, 2010

ia.gif

XXXXX



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

CODE


{$CLEO }
03A4: name_thread 'MissionGG'
0247: load_model #MP5LNG
0247: load_model #M4
0247: load_model #DESERT_EAGLE
038B: load_requested_models

:MissionGG_101
wait 0 ms
if and
0248: model #MP5LNG available
0248: model #M4 available
0248: model #DESERT_EAGLE available
$ONMISSION == 1
004D: 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_102
wait 0 ms
if
$ONMISSION == 0
jf @MissionGG_102
0555: remove_weapon #MP5LNG from_actor $PLAYER_ACTOR
0555: remove_weapon #M4 from_actor $PLAYER_ACTOR
0555: remove_weapon #DESERT_EAGLE from_actor $PLAYER_ACTOR
wait 5000
jump @MissionGG_101
Users WebsitePM
  Top
 

 
Joni2030  
Posted: Saturday, May 26 2012, 11:56
Quote Post


Prankster
Group Icon
Group: Members
Joined: Jul 6, 2011

sf.gif

XXXXX



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
Users WebsitePM
  Top
 

 
JACK JONES  
Posted: Saturday, May 26 2012, 13:31
Quote Post


Booom!!!
Group Icon
Group: Members
Joined: Dec 6, 2011

sr.gif

XXXXX



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

 
Bad.boy!  
Posted: Saturday, May 26 2012, 14:09
Quote Post


SA modder
Group Icon
Group: Members
Joined: Jun 20, 2010

nl.gif

XXXXX



QUOTE (Ashwin the new boy @ Saturday, May 26 2012, 13:43)
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

CODE


{$CLEO }
03A4: name_thread 'MissionGG'
0247: load_model #MP5LNG
0247: load_model #M4
0247: load_model #DESERT_EAGLE
038B: load_requested_models

:MissionGG_101
wait 0 ms
if and
0248: model #MP5LNG available
0248: model #M4 available
0248: model #DESERT_EAGLE available
$ONMISSION == 1
004D: 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_102
wait 0 ms
if
$ONMISSION == 0
jf @MissionGG_102
0555: remove_weapon #MP5LNG from_actor $PLAYER_ACTOR
0555: remove_weapon #M4 from_actor $PLAYER_ACTOR
0555: remove_weapon #DESERT_EAGLE from_actor $PLAYER_ACTOR
wait 5000
jump @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.
PM
  Top
 

 
Joni2030  
Posted: Friday, Jun 1 2012, 17:57
Quote Post


Prankster
Group Icon
Group: Members
Joined: Jul 6, 2011

sf.gif

XXXXX



so what is problem i tryed myself but i didnīt solved it
Users WebsitePM
  Top
 

 
JACK JONES  
Posted: Friday, Jun 1 2012, 18:09
Quote Post


Booom!!!
Group Icon
Group: Members
Joined: Dec 6, 2011

sr.gif

XXXXX



Try this:
CODE
{$CLEO .cs}
03A4: name_thread 'MissionGG'
0247: load_model #MP5LNG
0247: load_model #M4
0247: load_model #DESERT_EAGLE
038B: load_requested_models

:MissionGG_101
wait 0 ms
if and
0248: model #MP5LNG available
0248: model #M4 available
0248: model #DESERT_EAGLE available
0038:   $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_102
wait 0 ms
if
0038:   $ONMISSION == 0
004D: jump_if_false @MissionGG_102
0555: remove_weapon 29 from_actor $PLAYER_ACTOR
0555: remove_weapon 31 from_actor $PLAYER_ACTOR
0555: remove_weapon 24 from_actor $PLAYER_ACTOR
wait 5000
jump @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.


PM
  Top
 

 
Joni2030  
Posted: Friday, Jun 1 2012, 18:42
Quote Post


Prankster
Group Icon
Group: Members
Joined: Jul 6, 2011

sf.gif

XXXXX



didnīt work confused.gif
Users WebsitePM
  Top
 

 
Bad.boy!  
Posted: Friday, Jun 1 2012, 18:49
Quote Post


SA modder
Group Icon
Group: Members
Joined: Jun 20, 2010

nl.gif

XXXXX



What happens when you start a mission? Maybe the mission your playing sets your weapons?

Try this:
CODE
{$CLEO .cs}

03A4: name_thread 'WEAPONS'

:START
wait 0
if and
0256:   player $PLAYER_CHAR defined
0038:   $ONMISSION == 1
jf @START
0247: load_model #MP5LNG
0247: load_model #M4
0247: load_model #DESERT_EAGLE

:CHECK
wait 0
if and
0248: model #MP5LNG available
0248: model #M4 available
0248: model #DESERT_EAGLE available
jf @CHECK
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
0249: release_model #MP5LNG
0249: release_model #M4
0249: release_model #DESERT_EAGLE

:END
wait 0
if
0038:   $ONMISSION == 0
jf @END
if
   0491:   actor $PLAYER_ACTOR has_weapon 29
then
   0555: remove_weapon 29 from_actor $PLAYER_ACTOR
end

if
   0491:   actor $PLAYER_ACTOR has_weapon 31
then
   0555: remove_weapon 31 from_actor $PLAYER_ACTOR
end

if
   0491:   actor $PLAYER_ACTOR has_weapon 24
then
   0555: remove_weapon 24 from_actor $PLAYER_ACTOR
end
jump @START
PM
  Top
 

 
Joni2030  
Posted: Saturday, Jun 2 2012, 04:30
Quote Post


Prankster
Group Icon
Group: Members
Joined: Jul 6, 2011

sf.gif

XXXXX



No, itīs not work confused.gif
Users WebsitePM
  Top
 

 
Ashwin the new boy  
Posted: Saturday, Jun 2 2012, 05:11
Quote Post


I am The Most Confused Person
Group Icon
Group: Members
Joined: Nov 14, 2010

ia.gif

XXXXX



Did you code those Missions ???
Users WebsitePM
  Top
 

 
Joni2030  
Posted: Saturday, Jun 2 2012, 09:41
Quote Post


Prankster
Group Icon
Group: Members
Joined: Jul 6, 2011

sf.gif

XXXXX



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

 
Joni2030  
Posted: Saturday, Jun 2 2012, 09:58
Quote Post


Prankster
Group Icon
Group: Members
Joined: Jul 6, 2011

sf.gif

XXXXX



Not worked in normal missions :\
Users WebsitePM
  Top
 

 
Ashwin the new boy  
Posted: Saturday, Jun 2 2012, 12:51
Quote Post


I am The Most Confused Person
Group Icon
Group: Members
Joined: Nov 14, 2010

ia.gif

XXXXX



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

This post has been edited by Ashwin the new boy on Saturday, Jun 2 2012, 12:54
Users WebsitePM
  Top
 

 
Bad.boy!  
Posted: Saturday, Jun 2 2012, 15:43
Quote Post


SA modder
Group Icon
Group: Members
Joined: Jun 20, 2010

nl.gif

XXXXX



QUOTE (Joni2030 @ Saturday, Jun 2 2012, 11:41)
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
PM
  Top
 

 
Joni2030  
Posted: Saturday, Jun 2 2012, 16:09
Quote Post


Prankster
Group Icon
Group: Members
Joined: Jul 6, 2011

sf.gif

XXXXX



Not worked i tryed it
Users WebsitePM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG