IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Post mod/code requests in the Mod Requests topic

Post mod releases in the Mod Showroom

Read the Modding Rules BEFORE posting!

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 Save to .txt file

 
Fantaseb  
Posted: Friday, Apr 13 2012, 21:59
Quote Post


One Nation, One Love, But Who? ;)
Group Icon
Group: BUSTED!
Joined: Oct 17, 2011

uk.gif

XXXXX



How can I make my saved object save there X, Y, Z Co-ordinates in C++? So say I place a object on the map how can I save the X, Y, Z co-ordinates to a another file like simple native trainer does. I have tried a few things but they are not right, so I scrapped the idea, and came and asked on here....

I know C++ and I am lost, it's just weird trying to save it.

This post has been edited by Fantaseb on Friday, Apr 13 2012, 22:23
PM
  Top
 

 
Bad.boy!  
Posted: Saturday, Apr 14 2012, 11:20
Quote Post


SA modder
Group Icon
Group: Members
Joined: Jun 20, 2010

nl.gif

XXXXX



uhm
PM
  Top
 

 
Fantaseb  
Posted: Saturday, Apr 14 2012, 11:25
Quote Post


One Nation, One Love, But Who? ;)
Group Icon
Group: BUSTED!
Joined: Oct 17, 2011

uk.gif

XXXXX



QUOTE (Bad.boy! @ Saturday, Apr 14 2012, 11:20)
uhm

I tried that, and it never worked.
PM
  Top
 

 
Bad.boy!  
Posted: Saturday, Apr 14 2012, 12:03
Quote Post


SA modder
Group Icon
Group: Members
Joined: Jun 20, 2010

nl.gif

XXXXX



Try this (sorry if it's wrong I only do C#)
CODE
float objectx, objecty, objectz; // Store coords to these values
myfile.open ("coords.txt"); // You'll have to create one if it doesn't exist
buffer << objectx;
string sobjectx = buffer.str();
buffer << objecty;
string sobjecty = buffer.str();
buffer << objecty;
string sobjectz = buffer.str();
sobjectx += "\n";
sobjecty += "\n";
sobjectz += "\n";
myfile << sobjectx;
myfile << sobjecty;
myfile << sobjectz;
myfile.close();
PM
  Top
 

 
Fantaseb  
Posted: Saturday, Apr 14 2012, 14:20
Quote Post


One Nation, One Love, But Who? ;)
Group Icon
Group: BUSTED!
Joined: Oct 17, 2011

uk.gif

XXXXX



QUOTE (Bad.boy! @ Saturday, Apr 14 2012, 12:03)
Try this (sorry if it's wrong I only do C#)
CODE
float objectx, objecty, objectz; // Store coords to these values
myfile.open ("coords.txt"); // You'll have to create one if it doesn't exist
buffer << objectx;
string sobjectx = buffer.str();
buffer << objecty;
string sobjecty = buffer.str();
buffer << objecty;
string sobjectz = buffer.str();
sobjectx += "\n";
sobjecty += "\n";
sobjectz += "\n";
myfile << sobjectx;
myfile << sobjecty;
myfile << sobjectz;
myfile.close();

Thanks I re-done that code and it worked biggrin.gif Cheers buddy smile.gif
PM
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG