Quantcast

Jump to content

» «
Photo

Script to select weapons using numeric keys [0-9]

Best Answer deltaCJ, 3 weeks ago

Maybe because you have it all one thread.

 

Make it:

thread 'WS'

:WS_1
wait 0
if and  
   Player.Defined($PLAYER_ACTOR)
   044B:   actor $PLAYER_ACTOR on_foot
   jf @WS_1
     
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

:WS_2
if and
0AB0:   key_pressed 49
[email protected] <> 22
jf @WS_3
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 22
02D8:   actor $PLAYER_ACTOR current_weapon == 22
0470: [email protected] = actor $PLAYER_ACTOR current_weapon


:WS_3
if and
0AB0:   key_pressed 49
[email protected] <> 23
jf @WS_4
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 23
02D8:   actor $PLAYER_ACTOR current_weapon == 23
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

:WS_4
if and
0AB0:   key_pressed 49
[email protected] <> 24
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 24
02D8:   actor $PLAYER_ACTOR current_weapon == 24
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

make it so it jumps to the next thread if it's false and when it reaches the last thread it jumps to WS_1

 

 

:THREAD_01

wait 0 

if

condition

jump_false @THREAD_02

 

:THREAD_02

wait 0

if 

condition

jump_false @THREAD_03

 

etc....

Go to the full post


12 replies to this topic
Arya_Eto
  • Arya_Eto

    HustlerBustler

  • Members
  • Joined: 4 weeks ago
  • India

#1

Posted 3 weeks ago

Hi Friends,

 

I am writing a small script for " Selecting weapons using numeric keys [0-9]" i.e if i press numeric key ( 1 ) then player armed weapon should change to pistols (default, silenced or desert),

 

similarly if i press key ( 2 ), then player armed weapon should change to shotguns(chrome, sawn, combat) and so on for other weapon groups.

 

now i have written the script but its only working for only single keypress. that means its working only for

key ( 1 ) but not when i press other keys.

 

so i need your help to know where i am going wrong in my code.

 

 

 

below is the code [written from scratch]:

// Script to scroll through weapons using numeric keys [0-9]

{$CLEO .cs}

// ---------- MAIN ------------------
0A95: enable_thread_saving

:WS_1
wait 0
if and  
   Player.Defined($PLAYER_ACTOR)
   044B:   actor $PLAYER_ACTOR on_foot
   jf @WS_1
     
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 49
[email protected] <> 22
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 22
02D8:   actor $PLAYER_ACTOR current_weapon == 22
0470: [email protected] = actor $PLAYER_ACTOR current_weapon



if and
0AB0:   key_pressed 49
[email protected] <> 23
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 23
02D8:   actor $PLAYER_ACTOR current_weapon == 23
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 49
[email protected] <> 24
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 24
02D8:   actor $PLAYER_ACTOR current_weapon == 24
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 50
[email protected] <> 25
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 25
02D8:   actor $PLAYER_ACTOR current_weapon == 25
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 50
[email protected] <> 26
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 26
02D8:   actor $PLAYER_ACTOR current_weapon == 26
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 50
[email protected] <> 27
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 27
02D8:   actor $PLAYER_ACTOR current_weapon == 27
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 51
[email protected] <> 28
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 28
02D8:   actor $PLAYER_ACTOR current_weapon == 28
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 51
[email protected] <> 29
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 29
02D8:   actor $PLAYER_ACTOR current_weapon == 29
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 51
[email protected] <> 32
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 32
02D8:   actor $PLAYER_ACTOR current_weapon == 32
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 52
[email protected] <> 30
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 30
02D8:   actor $PLAYER_ACTOR current_weapon == 30
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 52
[email protected] <> 31
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
02D8:   actor $PLAYER_ACTOR current_weapon == 31
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 53
[email protected] <> 33
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 33
02D8:   actor $PLAYER_ACTOR current_weapon == 33
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 53
[email protected] <> 34
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 34
02D8:   actor $PLAYER_ACTOR current_weapon == 34
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if 
Player.Wasted($PLAYER_ACTOR)
jf @WS_1
jump @WS_2

:WS_2
wait 0
048F: actor $PLAYER_ACTOR remove_weapons
wait 0
jump @WS_1
0A93: end_custom_thread


deltaCJ
  • deltaCJ

    Davy Jones' Sock

  • Members
  • Joined: 27 Dec 2013
  • Unknown

#2

Posted 3 weeks ago   Best Answer

Maybe because you have it all one thread.

 

Make it:

thread 'WS'

:WS_1
wait 0
if and  
   Player.Defined($PLAYER_ACTOR)
   044B:   actor $PLAYER_ACTOR on_foot
   jf @WS_1
     
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

:WS_2
if and
0AB0:   key_pressed 49
[email protected] <> 22
jf @WS_3
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 22
02D8:   actor $PLAYER_ACTOR current_weapon == 22
0470: [email protected] = actor $PLAYER_ACTOR current_weapon


:WS_3
if and
0AB0:   key_pressed 49
[email protected] <> 23
jf @WS_4
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 23
02D8:   actor $PLAYER_ACTOR current_weapon == 23
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

:WS_4
if and
0AB0:   key_pressed 49
[email protected] <> 24
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 24
02D8:   actor $PLAYER_ACTOR current_weapon == 24
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

make it so it jumps to the next thread if it's false and when it reaches the last thread it jumps to WS_1

 

 

:THREAD_01

wait 0 

if

condition

jump_false @THREAD_02

 

:THREAD_02

wait 0

if 

condition

jump_false @THREAD_03

 

etc....


_Israel_
  • _Israel_

    Everyone gonna remember my name !

  • Members
  • Joined: 22 Dec 2016
  • Brazil

#3

Posted 3 weeks ago

Rewrite in high level ;-;


Arya_Eto
  • Arya_Eto

    HustlerBustler

  • Members
  • Joined: 4 weeks ago
  • India

#4

Posted 2 weeks ago

Rewrite in high level ;-;

 

okay buddy will do it in high level :) 

 

actually i just started coding... so will take lil time to get familiar with high level coding stuff.


Arya_Eto
  • Arya_Eto

    HustlerBustler

  • Members
  • Joined: 4 weeks ago
  • India

#5

Posted 2 weeks ago

Maybe because you have it all one thread.

 

Make it:

thread 'WS'

:WS_1
wait 0
if and  
   Player.Defined($PLAYER_ACTOR)
   044B:   actor $PLAYER_ACTOR on_foot
   jf @WS_1
     
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

:WS_2
if and
0AB0:   key_pressed 49
[email protected] <> 22
jf @WS_3
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 22
02D8:   actor $PLAYER_ACTOR current_weapon == 22
0470: [email protected] = actor $PLAYER_ACTOR current_weapon


:WS_3
if and
0AB0:   key_pressed 49
[email protected] <> 23
jf @WS_4
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 23
02D8:   actor $PLAYER_ACTOR current_weapon == 23
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

:WS_4
if and
0AB0:   key_pressed 49
[email protected] <> 24
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 24
02D8:   actor $PLAYER_ACTOR current_weapon == 24
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

make it so it jumps to the next thread if it's false and when it reaches the last thread it jumps to WS_1

 

 

:THREAD_01

wait 0 

if

condition

jump_false @THREAD_02

 

:THREAD_02

wait 0

if 

condition

jump_false @THREAD_03

 

etc....

 

Thanks Delta :)... its working now

  • deltaCJ likes this

Silent
  • Silent

    Chief Vision™ Alterer

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [Modding] 2016
    Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#6

Posted 2 weeks ago

Wow this code is still fairly sh*t.

boludoz
  • boludoz

    Rat

  • Members
  • Joined: 10 Dec 2009
  • Argentina

#7

Posted 2 weeks ago Edited by boludoz, 2 weeks ago.

Lo tengo, se lo había dado a DC22PACK para solucionar un bug de su hud al tener 2 juagdores, ahora se lo doy
//0 - min
//46 - max
{$CLEO}
0000:
:FIRST 
wait 0
if and
0256:   player $PLAYER_CHAR defined
0118:   not actor $PLAYER_CHAR dead
jf @FIRST
jump @ANTERIOR

:ANTERIOR
wait 0
if
00E1:   player 0 pressed_key 9 
jf @SIGUIENTE
046F: store_player $PLAYER_ACTOR currently_armed_weapon_to [email protected]
jump @ANTERIOR_BAK

:ANTERIOR_BAK
wait 0 
if
 not [email protected] == 0
jf @SET_46
000E: [email protected] -= 1
jump @ANTERIOR_SUB

:ANTERIOR_SUB
wait 0  
if 
0491:   has_char_got_weapon $PLAYER_ACTOR weapon [email protected]
jf @ANTERIOR_BAK_POST
01B9: set_current_char_weapon $PLAYER_ACTOR to [email protected]
jump @FIRST

:SET_46
wait 0
 [email protected] = 46 //procesado
jump @ANTERIOR_SUB

:ANTERIOR_BAK_POST
wait 0
000E: [email protected] -= 1
jump @ANTERIOR_SUB

:SIGUIENTE
wait 0   
if
00E1:   player 0 pressed_key 8 
jf @ANTERIOR
046F: store_player $PLAYER_ACTOR currently_armed_weapon_to [email protected]
jump @SIGUIENTE_BAK

:SIGUIENTE_BAK
wait 0
if
 not [email protected] == 46
jf @SET_0
[email protected] += 1
jump @SIGUIENTE_SUB

:SIGUIENTE_SUB
wait 0
if 
0491:   has_char_got_weapon $PLAYER_ACTOR weapon [email protected]
jf @SIGUIENTE_BAK_POST
01B9: set_current_char_weapon $PLAYER_ACTOR to [email protected]
jump @FIRST

:SET_0
wait 0
 [email protected] = 0
jump @SIGUIENTE_SUB

:SIGUIENTE_BAK_POST
wait 0
[email protected] += 1
jump @SIGUIENTE_SUB
number  Weapon Group Name   ModelID  Model name  Icon 
gift  //KEY 2 (10/15)
10  11 Purple Dildo  321  #gun_dildo1   
11  11 White Dildo  322  #gun_dildo2   
12  11 Long White Dildo  323  #gun_vibe1   
13  11 White Dildo 2  324  #gun_vibe2   
14  11 Flowers  325  #flowera   
15  11 Cane 326  #gun_cane   
melee //KEY 1 (0/9)
0  1 Unarmed        
1  1 Brass Knuckles  331  #brassknuckle   
2  2 Golf Club  333  #golfclub   
3  2 Night Stick  334  #nitestick   
4  2 Knife  335  #knifecur   
5  2 Baseball Bat  336  #bat   
6  2 Shovel  337  #shovel   
7  2 Pool cue  338  #poolcue   
8  2 Katana 339  #katana   
9  2 Chainsaw  341  #chnsaw   
projectiles //KEY 3 (16/18)/G (Like GTA V)
16  9 Grenades 342  #grenade   
17  9 Tear Gas  343  #teargas   
18  9 Molotovs 344  #molotov   
handguns  //KEY 4 (22/24)
22  3 Pistol 346  #colt45   
23  3 Silenced Pistol  347  #silenced   
24  3 Desert Eagle  348  #desert_eagle   
shotguns  //KEY 5
25  4 Shotgun 349  #chromegun   
26  4 Sawn Off Shotgun  350  #sawnoff   
27  4 Combat Shotgun  351  #shotgspa   
sub-machineguns //KEY 6
28  5 Micro Uzi (Mac 10) 352  #micro_uzi   
29  5 MP5  353  #mp5lng   
32  5 Tec9  372  #tec9   
machineguns  //KEY 7
30  6 AK47 355  #ak47   
31  6 M4  356  #m4   
rifles  //KEY 8
33  7 Rifle 357  #c*ntgun   
34  7 Sniper Rifle  358  #sniper   
specials  //KEY 9
35  8 RPG  359  #rocketla   
36  8 Missile Launcher  360  #heatseek   
37  8 Flame Thrower  361  #flame   
38  8 Minigun  362  #minigun   
39  9 Sachet Charges  363  #satchel   
40 13 Detonator 364 #bomb  
41  10 Spray Paint  365  #spraycan   
42  10 Fire Extinguisher  366  #fire_ex   
43  10 Camera 367  #camera   
44  12 Nightvision Goggles  368  #nvgoggles   
45  12 Thermal Goggles  369  #irgoggles   
46  12 Parachute  371  #gun_para   
Other //KEY 0
   jetpack 370 #jetpack  
  
  //By Sanny Builder help

deltaCJ
  • deltaCJ

    Davy Jones' Sock

  • Members
  • Joined: 27 Dec 2013
  • Unknown

#8

Posted 2 weeks ago

Wow this code is still fairly sh*t.

 

Why do you say that?


Silent
  • Silent

    Chief Vision™ Alterer

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [Modding] 2016
    Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#9

Posted 2 weeks ago Edited by Silent, 2 weeks ago.

Weird checks, conditional commands (02D8) used as if they weren't conditional etc...

deltaCJ
  • deltaCJ

    Davy Jones' Sock

  • Members
  • Joined: 27 Dec 2013
  • Unknown

#10

Posted 2 weeks ago

Lol he's a beginner what do you expect?


Silent
  • Silent

    Chief Vision™ Alterer

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [Modding] 2016
    Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#11

Posted 2 weeks ago

Lol he's a beginner what do you expect?


Since you partially fixed it I'd expect you to point those out too.

deltaCJ
  • deltaCJ

    Davy Jones' Sock

  • Members
  • Joined: 27 Dec 2013
  • Unknown

#12

Posted A week ago

Sorry, didn't really pay attention to it


Sanmodder
  • Sanmodder

    Fan script

  • Members
  • Joined: 11 Sep 2017
  • Poland

#13

Posted A week ago

 

Hi Friends,

 

I am writing a small script for " Selecting weapons using numeric keys [0-9]" i.e if i press numeric key ( 1 ) then player armed weapon should change to pistols (default, silenced or desert),

 

similarly if i press key ( 2 ), then player armed weapon should change to shotguns(chrome, sawn, combat) and so on for other weapon groups.

 

now i have written the script but its only working for only single keypress. that means its working only for

key ( 1 ) but not when i press other keys.

 

so i need your help to know where i am going wrong in my code.

 

 

 

below is the code [written from scratch]:

// Script to scroll through weapons using numeric keys [0-9]

{$CLEO .cs}

// ---------- MAIN ------------------
0A95: enable_thread_saving

:WS_1
wait 0
if and  
   Player.Defined($PLAYER_ACTOR)
   044B:   actor $PLAYER_ACTOR on_foot
   jf @WS_1
     
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 49
[email protected] <> 22
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 22
02D8:   actor $PLAYER_ACTOR current_weapon == 22
0470: [email protected] = actor $PLAYER_ACTOR current_weapon



if and
0AB0:   key_pressed 49
[email protected] <> 23
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 23
02D8:   actor $PLAYER_ACTOR current_weapon == 23
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 49
[email protected] <> 24
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 24
02D8:   actor $PLAYER_ACTOR current_weapon == 24
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 50
[email protected] <> 25
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 25
02D8:   actor $PLAYER_ACTOR current_weapon == 25
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 50
[email protected] <> 26
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 26
02D8:   actor $PLAYER_ACTOR current_weapon == 26
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 50
[email protected] <> 27
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 27
02D8:   actor $PLAYER_ACTOR current_weapon == 27
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 51
[email protected] <> 28
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 28
02D8:   actor $PLAYER_ACTOR current_weapon == 28
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 51
[email protected] <> 29
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 29
02D8:   actor $PLAYER_ACTOR current_weapon == 29
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 51
[email protected] <> 32
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 32
02D8:   actor $PLAYER_ACTOR current_weapon == 32
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 52
[email protected] <> 30
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 30
02D8:   actor $PLAYER_ACTOR current_weapon == 30
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 52
[email protected] <> 31
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
02D8:   actor $PLAYER_ACTOR current_weapon == 31
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 53
[email protected] <> 33
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 33
02D8:   actor $PLAYER_ACTOR current_weapon == 33
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if and
0AB0:   key_pressed 53
[email protected] <> 34
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 34
02D8:   actor $PLAYER_ACTOR current_weapon == 34
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

if 
Player.Wasted($PLAYER_ACTOR)
jf @WS_1
jump @WS_2

:WS_2
wait 0
048F: actor $PLAYER_ACTOR remove_weapons
wait 0
jump @WS_1
0A93: end_custom_thread

 

Maybe because you have it all one thread.

 

Make it:

thread 'WS'

:WS_1
wait 0
if and  
   Player.Defined($PLAYER_ACTOR)
   044B:   actor $PLAYER_ACTOR on_foot
   jf @WS_1
     
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

:WS_2
if and
0AB0:   key_pressed 49
[email protected] <> 22
jf @WS_3
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 22
02D8:   actor $PLAYER_ACTOR current_weapon == 22
0470: [email protected] = actor $PLAYER_ACTOR current_weapon


:WS_3
if and
0AB0:   key_pressed 49
[email protected] <> 23
jf @WS_4
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 23
02D8:   actor $PLAYER_ACTOR current_weapon == 23
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

:WS_4
if and
0AB0:   key_pressed 49
[email protected] <> 24
jf @WS_1
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 24
02D8:   actor $PLAYER_ACTOR current_weapon == 24
0470: [email protected] = actor $PLAYER_ACTOR current_weapon

make it so it jumps to the next thread if it's false and when it reaches the last thread it jumps to WS_1

 

 

:THREAD_01

wait 0 

if

condition

jump_false @THREAD_02

 

:THREAD_02

wait 0

if 

condition

jump_false @THREAD_03

 

etc....

 

Thanks Delta :)... its working now

 

i do not know exactly about what in your script
it was
but
i made you the weapon selector
learn to
write scripts
also i was noob

 

 

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagamin...opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP
0000: NOP



Model.Load(#BRASSKNUCKLE)
Model.Load(#GOLFCLUB)
Model.Load(#NITESTICK)
Model.Load(#KNIFECUR)
Model.Load(#BAT)
Model.Load(#SHOVEL)
Model.Load(#POOLCUE)
Model.Load(#KATANA)
Model.Load(#CHNSAW)
Model.Load(#GUN_DILDO1)
Model.Load(#GUN_DILDO2)
Model.Load(#GUN_VIBE1)
Model.Load(#GUN_VIBE2)
Model.Load(#FLOWERA)
Model.Load(#GUN_CANE)
Model.Load(#GRENADE)
Model.Load(#TEARGAS)
Model.Load(#MOLOTOV)
Model.Load(#COLT45)
Model.Load(#SILENCED)
Model.Load(#DESERT_EAGLE)
Model.Load(#CHROMEGUN)
Model.Load(#SAWNOFF)
Model.Load(#SHOTGSPA)
Model.Load(#MICRO_UZI)
Model.Load(#MP5LNG)
Model.Load(#AK47)
Model.Load(#M4)
Model.Load(#TEC9)
Model.Load(#c*ntGUN)
Model.Load(#SNIPER)
Model.Load(#ROCKETLA)
Model.Load(#HEATSEEK)
Model.Load(#FLAME)
Model.Load(#MINIGUN)
Model.Load(#SATCHEL)
Model.Load(#BOMB)
Model.Load(#SPRAYCAN)
Model.Load(#FIRE_EX)
038B: load_requested_models

[email protected] = 22

WHILE TRUE
WAIT 0
IF
PLAYER.Defined(0)
THEN
0494: get_joystick 0 direction_offset_to [email protected] [email protected] [email protected] [email protected] //RIGHT
if
  [email protected] > 0
THEN
if
   not [email protected] >= 42
THEN
WAIT 45
[email protected] += 1
0513: show_text_box_1number 'NUMBER' number [email protected]  
ELSE
END
END
END
0494: get_joystick 0 direction_offset_to [email protected] [email protected] [email protected] [email protected] //LEFT
if
  0 > [email protected]
THEN
if
  [email protected] >= 1
THEN
WAIT 45
[email protected] -= 1
0513: show_text_box_1number 'NUMBER' number [email protected]   
ELSE
END
END
IF
  00E1:   player 0 pressed_key 18 // C
THEN
if and
   not [email protected] == 19
   not [email protected] == 20
   not [email protected] == 21
THEN
Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, [email protected], 60)
WAIT 50
ELSE
END
END
END

 

 

 

 

 

 

<script data-cfasync="false" src="/cdn-cgi/scripts/ddc5a536/cloudflare-static/email-decode.min.js"></script>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users