Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

High level coding


Ify24
 Share

Recommended Posts

HY guys ..

Till now I wasn't using high level coding but now I want And I have a question..

What's wrong whit my script ??

 

 

{$CLEO .cs}thread "MYSCRIPT"0A95: enable_thread_savingConstDESERT_EAGLE=24AK_47=30GRENADE=16EndModel.Load(#AK47)Model.Load(#DESERT_EAGLE)Model.Load(#GRENADE)While truewait 0 if andModel.Available(#AK47)Model.Available(#DESERT_EAGLE)Model.Available(#GRENADE)jf Breakend wait 0if00E1:   player 0 pressed_key 8then 048F: actor $PLAYER_ACTOR remove_weapons 017B: set_actor $PLAYER_ACTOR weapon DESERT_EAGLE ammo_to 50 017B: set_actor $PLAYER_ACTOR weapon AK_47 ammo_to 250 017B: set_actor $PLAYER_ACTOR weapon GRENADE ammo_to 3endModel.Destroy(#DESERT_EAGLE)Model.Destroy(#AK47)Model.Destroy(#GRENADE)0A93: end_custom_thread

 

 

?

Link to comment
Share on other sites

Model-Available checks should be negated.

012          345
678   9A   BCD
EFG HIJK LMN
OPQR  STUV
WX    YZ

Link to comment
Share on other sites

Yeah. Pay attention to 0A93 opcode, which will end the current script too quickly to let player pressing any key.

012          345
678   9A   BCD
EFG HIJK LMN
OPQR  STUV
WX    YZ

Link to comment
Share on other sites

Yeah. Pay attention to 0A93 opcode, which will end the current script too quickly to let player pressing any key.

So then I can use just

 

 

end_thread

 

 

?

Link to comment
Share on other sites

So my edited script is not working..

 

 

{$CLEO .cs}thread "MYSCRIPT"0A95: enable_thread_savingConstDESERT_EAGLE=24AK_47=30GRENADE=16EndModel.Load(#AK47)Model.Load(#DESERT_EAGLE)Model.Load(#GRENADE)While truewait 0 if andnot Model.Available(#AK47)not Model.Available(#DESERT_EAGLE)not Model.Available(#GRENADE)else_jump @MYSCRIPTjf Breakend :MYSCRIPTPlayer.Defined($PLAYER_CHAR)Player.CanMove($PLAYER_CHAR, true)wait 0if00E1:   player 0 pressed_key 8then 048F: actor $PLAYER_ACTOR remove_weapons 017B: set_actor $PLAYER_ACTOR weapon DESERT_EAGLE ammo_to 50 017B: set_actor $PLAYER_ACTOR weapon AK_47 ammo_to 250 017B: set_actor $PLAYER_ACTOR weapon GRENADE ammo_to 3endModel.Destroy(#DESERT_EAGLE)Model.Destroy(#AK47)Model.Destroy(#GRENADE)end_thread

 

 

(I typed Player.CanMove () becouse player didn't move..)

And when I press Backspace nothing happens...

Link to comment
Share on other sites

No, that's not a normal thread as it is a CLEO script. Take a look at the following:

 

{$CLEO}Const GRENADE      = 16  DESERT_EAGLE = 24  AK_47        = 30 End0000: NOP0A95: enable_thread_saving#GRENADE.Load()#DESERT_EAGLE.Load()#AK47.Load()while true wait 0  if  00E1:  player 0 pressed_key 8  then   While true     if and       #GRENADE.Available()       #DESERT_EAGLE.Available()       #AK47.Available()     then       break     else       wait 0      end   end   048F: actor $PLAYER_ACTOR remove_weapons   017B: set_actor $PLAYER_ACTOR weapon GRENADE ammo_to 3    017B: set_actor $PLAYER_ACTOR weapon DESERT_EAGLE ammo_to 50    017B: set_actor $PLAYER_ACTOR weapon AK_47 ammo_to 250    #GRENADE.Destroy()   #DESERT_EAGLE.Destroy()   #AK47.Destroy()   0A93: end_custom_thread endend

 

012          345
678   9A   BCD
EFG HIJK LMN
OPQR  STUV
WX    YZ

Link to comment
Share on other sites

 

{$CLEO}0000: const   DESERT_EAGLE = 24   AK_47        = 30   GRENADE      = 16end#AK47.Load#DESERT_EAGLE.Load#GRENADE.Load038B: load_requested_models while true   wait 0   if    00E1:  player 0 pressed_key 8   then       048F: actor $PLAYER_ACTOR remove_weapons       017B: set_actor $PLAYER_ACTOR weapon DESERT_EAGLE ammo_to 50       017B: set_actor $PLAYER_ACTOR weapon AK_47 ammo_to 250       017B: set_actor $PLAYER_ACTOR weapon GRENADE ammo_to 3       #AK47.Destroy              #DESERT_EAGLE.Destroy       #GRENADE.Destroy       break       endend0A93:

 

 

Dammit I have to stop using fast reply. bored.gif

Edited by BnB
Link to comment
Share on other sites

The order isn't necessary for this kind of things, unless you write a constant before the const...end construct.

012          345
678   9A   BCD
EFG HIJK LMN
OPQR  STUV
WX    YZ

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
 Share

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