Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    2. News

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

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

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Site Suggestions

Sign in to follow this  
megachaos17

Labels? in Gta 5 .csc scripts ?

Recommended Posts

megachaos17

im looking at some mod menus and im reading a bunch of "@label" with numbers at the end... so far the only thing i know is "PushString" which gives text or in other words.. "echos" the words you want on your menu if im correct.. and not only that i see "function 20 2 3" and a lot of "i get push" and "ipush"

what are these?

Share this post


Link to post
Share on other sites
sasuke78200

Hey, actually we don't support console modding plus we can't help since we haven't set yet a syntax for the scripting.

Each compiler has his own syntax.

Share this post


Link to post
Share on other sites
byteMe420

pushing an integer onto a stack maybe?

 

i usually represents an integer and push refers to putting values onto a stack which organizes data in a first in last out fashion... just google for better explanation

 

that i is probably being used in some function being called after the push

Edited by byteMe420

Share this post


Link to post
Share on other sites
2much4u

Those are all opcodes used in scripts. Many of them are used for pushing different things onto the stack. There are a ton of them but here's the description of the few you talked about in the op.

 

  • PushString is just pushing a string onto the stack. A single PushString will not display anything onscreen, a few natives are required for that.
  • iPush is pushing an integer onto the stack. There are a few different iPush opcodes which are for how many bytes the integer takes up but they all have the same function.
  • Function is for starting a function. The three numbers after it meanings are as following:
    • Function[1] Parameter count .
    • Function[2] Frame count, frames being like local variables in high level.
    • Function[3] Unknown to me. For creation of my own scripts I always keep it at 0
  • Return comes at the end of every function even if it doesn't actually return any values. It has two numbers after it and their meanings are as following:
    • Return[1] Parameter count. Should be the same number as Function[1]
    • Return[2] Number of values to take off the stack of the function and actually return.
  • Labels are used for calling functions and jumping around in code inside of functions.

 

Like sasuke said, the names of these opcodes vary depending on what decompiler/compiler you use. However they are all pretty similar.

Edited by 2much4u

Share this post


Link to post
Share on other sites
unknown modder

The label system is used to show where to go for branching instructions(Conditional and loops mainly) They aren't specifically defined in the script container, but decompilers can work out where they are looking at where branches go to. What disassembler are you using to look at the script, each one will likely have their own way of representing opcodes

Share this post


Link to post
Share on other sites
XBLToothPik

^^^^^^^^

 

You can see these being used in an open source program like GTA IV's SCOToolBox SCO Editor.

Share this post


Link to post
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
Sign in to follow this  

  • 1 User Currently Viewing
    0 Members, 0 Anonymous, 1 Guest

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.