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

 from 1 to another script

 help
 
Ify24  
Posted: Saturday, May 19 2012, 19:23
Quote Post


0x00000000 --> invisible
Group Icon
Group: Members
Joined: Aug 17, 2011

yu.gif

XXXXX



Hy guys, I need help.

1. script:

CODE

{$CLEO .cs}
thread 'TRAVA'
0A95: enable_thread_saving
0AB3: var 0 = 0
0AB4: 0@ = var 0
Model.Load(#BMYDRUG)

:TRAVA_30
wait 0
if
  Model.Available(#BMYDRUG)
jf @TRAVA_30

:TRAVA_49
wait 0
if
00EC:   actor $PLAYER_ACTOR 0 near_point -591.3925 -1476.945 radius 160.0 160.0
jf @TRAVA_49
1@ = Actor.Create(Dealer, #BMYDRUG, -589.2266, -1485.615, 11.74)
Actor.Angle(1@) = 30.0
2@ = Marker.CreateIconAndSphere(56, -591.0867, -1482.677, 12.32)
Marker.SetIconSize(2@, 2)

:TRAVA_154
wait 0
if
00ED:   actor $PLAYER_ACTOR 0 near_point -591.0867 -1482.677 radius 1.2 1.2 on_foot
jf @TRAVA_154
08D4: $MENU = create_panel_with_title 'MENU_2' position 29.0 170.0 width 180.0 columns 1 interactive 1 background 1 alignment 0  // Marihuana
08DB: set_panel $MENU column 0 header 'DUMMY' data 'MENU_4' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'  // Kupi travu.
03E5: show_text_box 'MENU_1'  // Pritisni SPACE da kupis travu ili pritisni ENTER da izades.
Player.CanMove($PLAYER_CHAR) = False

:TRAVA_375
wait 0
if
00E1:   player 0 pressed_key 15
jf @TRAVA_422
08DA: remove_panel $MENU
03E6: remove_text_box
Player.CanMove($PLAYER_CHAR) = True
wait 2700
jump @TRAVA_154

:TRAVA_422
00E1:   player 0 pressed_key 16
jf @TRAVA_375
08D7: $choice = panel $MENU active_row
08DA: remove_panel $MENU
03E6: remove_text_box
if
  Player.Money($PLAYER_CHAR) > 12
jf @TRAVA_508
jump @TRAVA_475

:TRAVA_475
wait 0 ms
if $choice == 0
then
0AB3: var 0 = 0@
0@ += 1
wait 100 ms
0AB4: 0@ = var 0
0109: player $PLAYER_CHAR money += -12
end
Player.CanMove($PLAYER_CHAR) = True
wait 2700
jump @TRAVA_154

:TRAVA_508
0ACE: show_formatted_text_box "Nemas dosta para." 2766  
wait 2700
Player.CanMove($PLAYER_CHAR) = True
jump @TRAVA_154
Model.Destroy(#BMYDRUG)
0A93: end_custom_thread


2. script

CODE

{$CLEO .cs}
thread 'TRAVA2'
0A95: enable_thread_saving
:A
wait 0 ms
0AB4: 0@ = var 0 // 0@ = CLEO Global var 0
wait 5000 ms
0ACE: show_formatted_text_box "%d" 0@
jump @A
0A93: end_custom_thread



So the thing is that in text box created in 2. script should be a number of var 0, of course that at start it will be 0, but when I will by more, it should increase.

But it does not increase... It stays 0 all the time.
I hope you now what I mean smile.gif
Please guys slove this problem.
PM
  Top
 

 
Bad.boy!  
Posted: Saturday, May 19 2012, 20:37
Quote Post


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

nl.gif

XXXXX



Look at this:
CODE
:TRAVA_475
wait 0 ms
if $choice == 0
then
0AB3: var 0 = 0@
0@ += 1
wait 100 ms
0AB4: 0@ = var 0
0109: player $PLAYER_CHAR money += -12
end
Player.CanMove($PLAYER_CHAR) = True
wait 2700
jump @TRAVA_154


You need to swap 0AB3 and 0AB4.
CODE
:TRAVA_475
wait 0 ms
if $choice == 0
then
0AB4: 0@ = var 0
0@ += 1
wait 100 ms
0AB3: var 0 = 0@
0109: player $PLAYER_CHAR money += -12
end
Player.CanMove($PLAYER_CHAR) = True
wait 2700
jump @TRAVA_154


And try to avoid using globals as much as possible.
PM
  Top
 

 

1 User(s) are reading this topic (1 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