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

Like Tree33Likes

Thread: Old Tutorial for Script modding (outdated)
  

Page 7 of 12 FirstFirst ... 5 6 7 8 9 ... LastLast
Results 61 to 70 of 113
  1. #61  
    JDMAlex's Avatar
    JDMAlex is offline & developer
    Join Date
    Nov 2010
    Posts
    742
    Downloads
    5
    Uploads
    1
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    204
    Likes Received
    467
    well I think there is a size limit on the script.img @arount 14.44mb cus at 14.45mb I get a loading loop... and when I used the same new code minus old code.. it works again.. think I will add dummy scripts to add space

    heres what I have been working on.. ped switching for main char (some models cause freezing like MODEL_SUPERLOD) ..
    NOTE: not sure if Wait(100) is needed.. and it seems that I have to press all 3 buttons to activate.. if you take out "if (IS_BUTTON_PRESSED(0,X)) " and the open and close brackets then its just 2 buttons.. what I was trying to do is let the user select what option and use "X" as the activator..

    Im still learing C++ (I am no way a coder yet)

    here's my code for ped switching.. needs to be in GeneralInput.c
    Code:
    boolean listnumber = 0;
    
    
    void PlayerchangeOnCommand(void)
    {
    if((IS_BUTTON_PRESSED(0,DPAD_LEFT)) && (IS_BUTTON_PRESSED(0,CIRCLE)) )
    	{
    	if (listnumber == 0) 
     	{
    		Print("NIKKO");
    		WAIT(100);
    		if (IS_BUTTON_PRESSED(0,X)) 
    		{
    			ChangePlayerModel(MODEL_PLAYER);
    		}
    		listnumber = 1;
     	}
    else if(listnumber == 1)
     	{
    		Print("Male MULTIPLAYER");
    		WAIT(100);
    		if (IS_BUTTON_PRESSED(0,X)) 
    		{
    			ChangePlayerModel(MODEL_M_Y_MULTIPLAYER);
    		}
    		listnumber = 2;
     	}
    else if(listnumber == 2)
     	{
    		Print("Female MULTIPLAYER");
    		WAIT(100);
    		if (IS_BUTTON_PRESSED(0,X)) 
    		{
    			ChangePlayerModel(MODEL_F_Y_MULTIPLAYER);
    		}
    		listnumber = 3;
    	}
    else if(listnumber == 3)
     	{
    		Print("GRACIE");
    		WAIT(100);
    		if (IS_BUTTON_PRESSED(0,X)) 
    		{
    		ChangePlayerModel(MODEL_IG_GRACIE);
    		}
    		listnumber = 0;
    	}
    	//}
    	//}
     	}
    	
    
    }

  2. #62  
    ribonucleic's Avatar
    ribonucleic is offline Moderator & Developer
    Join Date
    Mar 2012
    Posts
    631
    Downloads
    4
    Uploads
    0
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    128
    Likes Received
    280
    Hey guys new here, i have attempted to make a .sco script for my ps3 version of GTA IV (original), i have followed the tutorial as best as i can (i can't quite grasp some parts of what you say),

    i can use OpenIV to modify .img archives,
    i can compile with scocl,
    i can use scotoolbox to convert from 1.0.7.0 to 1.0.4.0 then change the hex pointers to word pointers,
    i can sort of understand c,

    the code i have wrote is as follows (i dunno if its any good and its just a test so i can get started when it eventually works out for me)

    Code:
    #include <natives.h>
    #include <common.h>
    #include <strings.h>
    #include <types.h>
    #include <consts.h>
    
    //############### Define Ps3 GamePad ################################//
    #define BUTTON_SELECT  0xD
    #define BUTTON_START  0xC
    #define BUTTON_X  0xE
    #define BUTTON_Y  0xF
    #define BUTTON_A  0x10
    #define BUTTON_B  0x11
    #define BUTTON_DPAD_UP  0x8
    #define BUTTON_DPAD_DOWN  0x9
    #define BUTTON_DPAD_LEFT  0xA
    #define BUTTON_DPAD_RIGHT  0xB
    #define BUTTON_L1  0x4
    #define BUTTON_L2  0x5
    #define BUTTON_R1  0x6
    #define BUTTON_R2  0x7
    #define BUTTON_STICK_LEFT  0x12
    #define BUTTON_STICK_RIGHT  0x13  
    //####################################################################//
    
    void god(void) {
      if (IS_BUTTON_PRESSED(0, BUTTON_STICK_RIGHT)) {
        Player pid = GetPlayerIndex();
        float x, y, z;
        GET_CHAR_COORDINATES(GetPlayerPed(), &x, &y, &z);
        Vehicle ban, pol;
    
        CREATE_CAR(MODEL_BANSHEE, x, y+0.5, z, &ban, 1);
        CREATE_CAR(MODEL_POLICE, x, y+1.5, z, &pol, 1);
        CHANGE_CAR_COLOUR(ban, 59, 133);
        CHANGE_CAR_COLOUR(pol, 89, 99);
      }
    }
    
    void main(void) {
      while (TRUE) {
        WAIT(0);
        god();
      }
    }
    any help will be greatly appreciated and if/when i make something awesome with scripts then i'll be sure to share it with the community here

    Btw i noticed this in the controller button definitions it declares buttons Y, A and B yet these buttons don't exist on the ps3 controller. Will these button definitions work despite being mislabeled if so what do they correspond to e.g is Y Triangle, or is A Square ??
    Code:
    #define BUTTON_X  0xE
    #define BUTTON_Y  0xF
    #define BUTTON_A  0x10
    #define BUTTON_B  0x11

  3. #63  
    EvilB's Avatar
    EvilB is offline Bringin' that funky flava
    Join Date
    Jan 2011
    Posts
    420
    Downloads
    17
    Uploads
    0
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    70
    Likes Received
    472
    Quote Originally Posted by ribonucleic View Post
    Hey guys new here, i have attempted to make a .sco script for my ps3 version of GTA IV (original), i have followed the tutorial as best as i can (i can't quite grasp some parts of what you say),

    i can use OpenIV to modify .img archives,
    i can compile with scocl,
    i can use scotoolbox to convert from 1.0.7.0 to 1.0.4.0 then change the hex pointers to word pointers,
    i can sort of understand c,

    the code i have wrote is as follows (i dunno if its any good and its just a test so i can get started when it eventually works out for me)

    Code:
    #include <natives.h>
    #include <common.h>
    #include <strings.h>
    #include <types.h>
    #include <consts.h>
    
    //############### Define Ps3 GamePad ################################//
    #define BUTTON_SELECT  0xD
    #define BUTTON_START  0xC
    #define BUTTON_X  0xE
    #define BUTTON_Y  0xF
    #define BUTTON_A  0x10
    #define BUTTON_B  0x11
    #define BUTTON_DPAD_UP  0x8
    #define BUTTON_DPAD_DOWN  0x9
    #define BUTTON_DPAD_LEFT  0xA
    #define BUTTON_DPAD_RIGHT  0xB
    #define BUTTON_L1  0x4
    #define BUTTON_L2  0x5
    #define BUTTON_R1  0x6
    #define BUTTON_R2  0x7
    #define BUTTON_STICK_LEFT  0x12
    #define BUTTON_STICK_RIGHT  0x13  
    //####################################################################//
    
    void god(void) {
      if (IS_BUTTON_PRESSED(0, BUTTON_STICK_RIGHT)) {
        Player pid = GetPlayerIndex();
        float x, y, z;
        GET_CHAR_COORDINATES(GetPlayerPed(), &x, &y, &z);
        Vehicle ban, pol;
    
        CREATE_CAR(MODEL_BANSHEE, x, y+0.5, z, &ban, 1);
        CREATE_CAR(MODEL_POLICE, x, y+1.5, z, &pol, 1);
        CHANGE_CAR_COLOUR(ban, 59, 133);
        CHANGE_CAR_COLOUR(pol, 89, 99);
      }
    }
    
    void main(void) {
      while (TRUE) {
        WAIT(0);
        god();
      }
    }
    any help will be greatly appreciated and if/when i make something awesome with scripts then i'll be sure to share it with the community here

    Btw i noticed this in the controller button definitions it declares buttons Y, A and B yet these buttons don't exist on the ps3 controller. Will these button definitions work despite being mislabeled if so what do they correspond to e.g is Y Triangle, or is A Square ??
    Code:
    #define BUTTON_X  0xE
    #define BUTTON_Y  0xF
    #define BUTTON_A  0x10
    #define BUTTON_B  0x11
    yeah its the same heres what i use
    Code:
    //############### Define Ps3 GamePad ################################//
    #define SELECT  0xD
    #define START  0xC
    #define SQUARE  0xE
    #define TRIANGLE  0xF
    #define X  0x10
    #define CIRCLE  0x11
    #define DPAD_UP  0x8
    #define DPAD_DOWN  0x9
    #define DPAD_LEFT  0xA
    #define DPAD_RIGHT  0xB
    #define L2  0x5
    #define R2  0x7
    #define L1  0x4
    #define R1  0x6
    #define STICK_L  0x12
    #define STICK_R  0x13  
    //############### Define Ps3 GamePad ################################//

  4. #64  
    ribonucleic's Avatar
    ribonucleic is offline Moderator & Developer
    Join Date
    Mar 2012
    Posts
    631
    Downloads
    4
    Uploads
    0
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    128
    Likes Received
    280
    have you managed to get any scripts working? i getting really frustrated not being able to expand the games functionality i can think of so many cool things.

    edit: btw thank you for clarifying the button definitions

  5. #65  
    JDMAlex's Avatar
    JDMAlex is offline & developer
    Join Date
    Nov 2010
    Posts
    742
    Downloads
    5
    Uploads
    1
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    204
    Likes Received
    467
    yeh there working allright... Evilb came up with a new method to use a new IMG fiile with a small trainer.img file .. you will soon see


    also will release the newest script source.. soon fixin up a few things........

  6. #66  
    ribonucleic's Avatar
    ribonucleic is offline Moderator & Developer
    Join Date
    Mar 2012
    Posts
    631
    Downloads
    4
    Uploads
    0
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    128
    Likes Received
    280
    cool .. if i were to detail exactly what i do and the versions of things i am using could somebody point out where i might be going wrong?? assuming my problem isn't my code

  7. #67  
    JDMAlex's Avatar
    JDMAlex is offline & developer
    Join Date
    Nov 2010
    Posts
    742
    Downloads
    5
    Uploads
    1
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    204
    Likes Received
    467
    Quote Originally Posted by ribonucleic View Post
    cool .. if i were to detail exactly what i do and the versions of things i am using could somebody point out where i might be going wrong?? assuming my problem isn't my code
    we could try to

  8. #68  
    nativesith's Avatar
    nativesith is offline Moderator
    Join Date
    Jun 2011
    Location
    Los Santos
    Posts
    1,392
    Downloads
    12
    Uploads
    7
    Mentioned
    39 Post(s)
    Tagged
    2 Thread(s)
    Likes Given
    1003
    Likes Received
    672
    Quote Originally Posted by JDMAlex View Post
    yeh there working allright... Evilb came up with a new method to use a new IMG fiile with a small trainer.img file .. you will soon see
    Let me guess.. a new modded script loaded through a modified images.txt in the common. I too have been pondering new ways of loading new text, dats , and images through gta.dat, images.txt, and default.dat. All of these with a modified common.rpf. This new way of modding solves many problems that were caused by modifying original files.
    Will this mean we will have a original along side a modded script, or two modded scripts?

  9. #69  
    EvilB's Avatar
    EvilB is offline Bringin' that funky flava
    Join Date
    Jan 2011
    Posts
    420
    Downloads
    17
    Uploads
    0
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    70
    Likes Received
    472
    Quote Originally Posted by nativesith View Post
    Let me guess.. a new modded script loaded through a modified images.txt in the common. I too have been pondering new ways of loading new text, dats , and images through gta.dat, images.txt, and default.dat. All of these with a modified common.rpf. This new way of modding solves many problems that were caused by modifying original files.
    Will this mean we will have a original along side a modded script, or two modded scripts?
    yeah 2 imgs one with the hook other with the modscript.sco this solves an size issue with the script.img because the scripts size is increasing rapidly.

  10. #70  
    nativesith's Avatar
    nativesith is offline Moderator
    Join Date
    Jun 2011
    Location
    Los Santos
    Posts
    1,392
    Downloads
    12
    Uploads
    7
    Mentioned
    39 Post(s)
    Tagged
    2 Thread(s)
    Likes Given
    1003
    Likes Received
    672
    Wondering how far we can take this new way of making totally new files?
    No size limit is friggin awesome son!

Page 7 of 12 FirstFirst ... 5 6 7 8 9 ... LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •