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 Tree228Likes

Thread: General Help
  

Page 42 of 102 FirstFirst ... 32 40 41 42 43 44 52 92 ... LastLast
Results 411 to 420 of 1016
  1. #411  
    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
    Quote Originally Posted by Raeralus View Post
    Yes, you can do that. Although, not the hexadecimal one.

    Code:
    #ifndef MODEL_M_O_HASID_01
    #define MODEL_M_O_HASID_01 2655607511
    #endif
    Place this before any references to MODEL_M_O_HASID_01 in the code.

    You can get a list of models here, along with their hashes (Hash decimals).
    why does decimal work any better than hex? wouldn't the number ultimately be the same in binary which is what the PS3 would read
    Reply With Quote  

  2. #412  
    Annihilator's Avatar
    Annihilator is offline Member
    Join Date
    Dec 2012
    Posts
    43
    Downloads
    2
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    11
    Likes Received
    5
    Quote Originally Posted by ribonucleic View Post
    it looks like it should run without any issues at all, have you tried running just this script to see if you still have problems??
    Thats what I thought, and yes I tried just running the script
    Reply With Quote  

  3. #413  
    Join Date
    May 2012
    Location
    Etats-Unis
    Posts
    53
    Downloads
    2
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    30
    Likes Received
    8
    Quote Originally Posted by ribonucleic View Post
    why does decimal work any better than hex? wouldn't the number ultimately be the same in binary which is what the PS3 would read

    what source code is good

    Code:
    ///////////////////////////////1///////////////////////////////////
    
    void ChangePlayerModel(uint model){
        REQUEST_MODEL(model);
        while(!HAS_MODEL_LOADED(model))
        WAIT(0);
        CHANGE_PLAYER_MODEL(GetPlayerIndex(), model);
        MARK_MODEL_AS_NO_LONGER_NEEDED(model);
    }
    
    #define MODEL_M_O_HASID_01 0x12345678
    
    
    ////////////////////////////////2/////////////////////////////////
    
    int changePlayerModel(uint hash) {
    
    Ped player = GetPlayerPed();
    CHANGE_PLAYER_MODEL(&player, hash);
    return 0;
    }
    
    ///////////////////////////3///////////////////////////////////
    
    /*void ChangePlayerModel(uint Pmodel){
        LoadModel(Pmodel);
        CHANGE_PLAYER_MODEL(GetPlayerIndex(), Pmodel);
        MARK_MODEL_AS_NO_LONGER_NEEDED(Pmodel);
    	WAIT(0);
    }*/
    Reply With Quote  

  4. #414  
    creighton is online now OhManMyBad
    Join Date
    Aug 2012
    Posts
    238
    Downloads
    2
    Uploads
    0
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    163
    Likes Received
    194
    Quote Originally Posted by W33D x F4STAND View Post
    what source code is good
    1. If you're trying to put that code inside of anything based on Muskel's base, don't bother as it will freeze you. It was already discussed here. I am interested in #3's LoadModel function (not present in the code) though.
    Reply With Quote  

  5. #415  
    Raeralus's Avatar
    Raeralus is online now Software Engineer
    Join Date
    Nov 2012
    Location
    0x456e676c616e64
    Posts
    189
    Downloads
    2
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    16
    Likes Received
    56
    Quote Originally Posted by ribonucleic View Post
    why does decimal work any better than hex? wouldn't the number ultimately be the same in binary which is what the PS3 would read
    No. When I used the hexadecimal format, it froze my script, so I use the decimal format.
    Reply With Quote  

  6. #416  
    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
    Quote Originally Posted by Raeralus View Post
    No. When I used the hexadecimal format, it froze my script, so I use the decimal format.
    interesting, i wonder what would cause that, seeing as they're just numbers that shouldn't happen unless theres a mismatch between the size of the data or something
    Reply With Quote  

  7. #417  
    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
    Quote Originally Posted by W33D x F4STAND View Post
    what source code is good

    Code:
    ///////////////////////////////1///////////////////////////////////
    
    void ChangePlayerModel(uint model){
        REQUEST_MODEL(model);
        while(!HAS_MODEL_LOADED(model))
        WAIT(0);
        CHANGE_PLAYER_MODEL(GetPlayerIndex(), model);
        MARK_MODEL_AS_NO_LONGER_NEEDED(model);
    }
    
    #define MODEL_M_O_HASID_01 0x12345678
    
    
    ////////////////////////////////2/////////////////////////////////
    
    int changePlayerModel(uint hash) {
    
    Ped player = GetPlayerPed();
    CHANGE_PLAYER_MODEL(&player, hash);
    return 0;
    }
    
    ///////////////////////////3///////////////////////////////////
    
    /*void ChangePlayerModel(uint Pmodel){
        LoadModel(Pmodel);
        CHANGE_PLAYER_MODEL(GetPlayerIndex(), Pmodel);
        MARK_MODEL_AS_NO_LONGER_NEEDED(Pmodel);
    	WAIT(0);
    }*/
    i wish you would read what i said more closely;

    i said change 0x12345678 to the real hash of the model.

    if we assume that the integer that Raeralus gave you is the correct then you should have put either:
    Code:
    #define MODEL_M_O_HASID_01 2655607511
    or
    Code:
    #define MODEL_M_O_HASID_01 0x9E495AD7
    OR if we take account Raeralus's use of "ifs" then you could put either:
    Code:
    #ifndef MODEL_M_O_HASID_01
    #define MODEL_M_O_HASID_01 2655607511
    #endif
    or
    Code:
    #ifndef MODEL_M_O_HASID_01
    #define MODEL_M_O_HASID_01 0x9E495AD7
    #endif
    Take your pick and if you happen to choose one that uses a Hex hash and the game crashes then try the one that uses an Integer hash instead and if the game still crashes then its almost definitely a different problem
    Last edited by ribonucleic; 01-09-2013 at 10:25 PM.
    Reply With Quote  

  8. #418  
    InTheSevens's Avatar
    InTheSevens is offline Member
    Join Date
    Oct 2012
    Posts
    136
    Downloads
    2
    Uploads
    0
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    56
    Likes Received
    67
    Quote Originally Posted by creighton View Post
    1. If you're trying to put that code inside of anything based on Muskel's base, don't bother as it will freeze you. It was already discussed here. I am interested in #3's LoadModel function (not present in the code) though.
    I'll bet I can guess.
    Reply With Quote  

  9. #419  
    Annihilator's Avatar
    Annihilator is offline Member
    Join Date
    Dec 2012
    Posts
    43
    Downloads
    2
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    11
    Likes Received
    5
    Ok, I got my carspawn thingy to not freeze on activation, but it still makes me lag a little bit.
    How do I stop this?
    Reply With Quote  

  10. #420  
    Raeralus's Avatar
    Raeralus is online now Software Engineer
    Join Date
    Nov 2012
    Location
    0x456e676c616e64
    Posts
    189
    Downloads
    2
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    16
    Likes Received
    56
    Quote Originally Posted by Annihilator View Post
    Ok, I got my carspawn thingy to not freeze on activation, but it still makes me lag a little bit.
    How do I stop this?
    Try slowing down the speed of execution in loops. Use WAIT() to halt execution temporarily for a certain amount of time, as opposed to letting the loops run as fast as possible. I believe you specify the delay in milliseconds.
    creighton likes this.
    Reply With Quote  

Page 42 of 102 FirstFirst ... 32 40 41 42 43 44 52 92 ... LastLast
Tags for this Thread

View Tag Cloud

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