Forum: Grand Theft Auto Series Modding - Our GTA Modding Team is the best around. Tutorials & Topics related to modding your GTA games, trophies, and save files! Discuss GTA game modding with the knowledgeable members of PSX-Scene and the Official GTA IV Mod Team.


The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Thread: Coding in SCO Assembley
  

Results 1 to 5 of 5
  1. #1 Coding in SCO Assembley 
    zorg93's Avatar
    zorg93 is offline Developer
    Join Date
    Jun 2012
    Posts
    254
    Downloads
    0
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    50
    Likes Received
    142
    Who here can code effectively in sco. im trying to teach myself, been looking up what opcodes do and tried to make a script to toggle invisibility, does it look right, if not where did i mess up
    Code:
    FnBegin 0 2
    CallNative THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME 0 0
    
    :Label1 
    PushD 0
    CallNative WAIT 1 0
    PushD 23
    CallNative  IS_KEYBOARD_KEY_JUST_PRESSED 1 1
    JumpFalse @Label1
    CallNative GET_PLAYER_ID 0 1
    PushD 0
    Var
    RefSet
    PushD 0
    Var
    RefGet
    CallNative PLAYER_HAS_CHAR 1 1
    JumpFalse @Label1
    PushD 0
    Var
    RefGet
    PushD 1
    Var
    CallNative GET_PLAYER_CHAR 2 0
    PushD 0
    LocalVar
    RefGet
    PushD 0
    CmpEq
    PushD 0
    LocalVar
    RefSet
    PushD 1
    Var
    RefGet
    PushD 0
    LocalVar
    RefGet
    CallNative SET_CHAR_VISIBLE 2 0
    PushD 0
    LocalVar
    RefGet
    JumpTrue @Label2 
    PushString "STRING"
    PushString "Player Now Invisible"
    PushS 2500
    PushD 1
    CallNative PRINT_STRING_WITH_LITERAL_STRING_NOW 4 0
    Jump @Label1
    
    :Label2
    PushString "STRING"
    PushString "Player Now Visible"
    PushS 2500
    PushD 1
    CallNative PRINT_STRING_WITH_LITERAL_STRING_NOW 4 0
    Jump @Label1
    
    FnEnd 0 0
    all it has is 1 global variable thats currently set to 1
    invisibility script.rar
    Reply With Quote  

  2. #2  
    keredor's Avatar
    keredor is online now Developer
    Join Date
    Mar 2012
    Posts
    180
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    136
    Likes Received
    123
    looks good actually. would you like me to send you the work i did in .sco?


    EDIT: just thinking there, you could make this a thread for cool .sco functions, that people could add into their script. have not seen that anywhere?
    Reply With Quote  

  3. #3  
    zorg93's Avatar
    zorg93 is offline Developer
    Join Date
    Jun 2012
    Posts
    254
    Downloads
    0
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    50
    Likes Received
    142
    Quote Originally Posted by keredor View Post
    looks good actually. would you like me to send you the work i did in .sco?
    if you dont mined this stuff looks confusing, but im sort of getting the hang of it
    Quote Originally Posted by keredor View Post
    EDIT: just thinking there, you could make this a thread for cool .sco functions, that people could add into their script. have not seen that anywhere?
    I dont think im up to that level just yet, and it would require explaining to everyone how to do it, and anyone who uses that sco 'security' will mean its not possible for that script. It would only beuseful for keyboard mod menus or similar which almost seem out dated
    Reply With Quote  

  4. #4  
    keredor's Avatar
    keredor is online now Developer
    Join Date
    Mar 2012
    Posts
    180
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    136
    Likes Received
    123
    Quote Originally Posted by zorg93 View Post
    if you dont mined this stuff looks confusing, but im sort of getting the hang of it

    I dont think im up to that level just yet, and it would require explaining to everyone how to do it, and anyone who uses that sco 'security' will mean its not possible for that script. It would only beuseful for keyboard mod menus or similar which almost seem out dated
    I did a MASSIVE edit to the 1.0s. and that is the script i use all the time , more so than my menu. and because i wrote it in .sco its alot easier to understand than the scripts that have been complied in scocl. ill upload it now and pm you the link.
    Reply With Quote  

  5. #5  
    spadger's Avatar
    spadger is offline Member
    Join Date
    Mar 2012
    Location
    UK
    Posts
    141
    Downloads
    2
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    29
    Likes Received
    29
    I think you need variable set up for your first get player Id call, other than that I didn't look through it all. It will be more efficient code if you were to write mods in assembly. Catherine's v1.0 was written totally in assembly, before scocl was made. If you look at it you'll see it looks more efficient. But anyway yes make the rocket mod with it I'll test it for you
    Reply With Quote  

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •