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 Tree2Likes
  • 2 Post By EvilB

Thread: C coding quick question
  

Results 1 to 3 of 3
  1. #1 C coding quick question 
    Datboijay53 is offline Registered User
    Join Date
    Sep 2012
    Posts
    5
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    2
    Likes Received
    0
    I am REALLY new to this, and ive been trying learn how to code in C/C++ , i have a little bit of a clue of what im doing,but not much. I just wanted to know if im doing this right. Ive been reading tutorials on how to do C/C++ so yes i am most def. a beginner, and i was just messing around with stuff, just to see if it was correct, so yeah. All i did was copy the "otmp" and all that and put in the DELETE_OBJECT and change the object hash(its a car now). Thats all, and i wanted to know if it was correct. If not, can you please show me.
    Thanks

    PHP Code:
    if(DOES_CHAR_EXIST(players[index].ped)){
                
    Object otmp;
                
    CREATE_OBJECT(0x2560B2FC,0.0,0.0,0.0,&otmp,true);
                
    ATTACH_OBJECT_TO_PED(otmp,players[index].ped,0,0.0,0.0,-0.11,0.0,0.0,3.0,false);
                
    // IS THE CODE BELOW THIS EVEN CLOSE TO BEING CORRECT??????????
                
    DELETE_OBJECT_FROM_PED(otmp,players[index].ped,0,0.0,0.0,-0.11,0.0,0.0,3.0,true);
                
    WAIT(10); 
    Reply With Quote  

  2. #2  
    creighton is online now OhManMyBad
    Join Date
    Aug 2012
    Posts
    206
    Downloads
    2
    Uploads
    0
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    151
    Likes Received
    172
    Not quite. You're also not attaching a vehicle, you're attaching a vehicle model as an object...which is bad. What are you trying to accomplish with this?

    DELETE_OBJECT_FROM_PED is not a valid GTA native function. See all of them here: List of native functions - GTAModding

    Instead you would do: DELETE_OBJECT(&otmp);
    Reply With Quote  

  3. #3  
    EvilB's Avatar
    EvilB is offline Bringin' that funky flava
    Join Date
    Jan 2011
    Posts
    405
    Downloads
    16
    Uploads
    0
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    68
    Likes Received
    456
    Quote Originally Posted by creighton View Post
    Not quite. You're also not attaching a vehicle, you're attaching a vehicle model as an object...which is bad. What are you trying to accomplish with this?

    DELETE_OBJECT_FROM_PED is not a valid GTA native function. See all of them here: List of native functions - GTAModding

    Instead you would do: DELETE_OBJECT(&otmp);
    This options only bad for ps3 it doesn't happen on xbox which is kinda strange plus he posted this on xbox forum which i answered the same so im assuming its for xbox.
    Colt and creighton like this.
    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
  •