Jump to content

Quick question, how to save player cordinades ingame?


tuuker

Recommended Posts

getElementPosition 
getElementInterior 
getElementDimension 
setAccountData 
getAccountData 
isGuestAccount 
spawnPlayer 
setElementPosition 
setElementInterior 
setElementDimension 

With all these functions, you can do a simple position saving system.

Link to comment
Tuuker,

This is not a valid way of asking. You can search it by yourself.

Go to the Wiki site and search for createPickup...

We won't script something for you.

I didnt ask to script something for me... I just tought there is some stock command like in SAMP if you run game and do /save then it will make to your Main san andreas folder playerpositsions.txt with saved cordinades.

I know the code how to make but i what i don't know is how to get easy cordinades on map...

Link to comment

server.lua:

function getCords(thePlayer) 
x, y, z = getElementPosition(thePlayer) 
outputChatBox("X: ".. tostring(x) .." Y: ".. tostring(y) .." Z: ".. tostring(z)) 
end 
addCommandHandler("get",getCords) 

meta.xml:

  
<meta> 
<info author="Castillo" type="script" version="1.0" /> 
<script src="server.lua" type="server"/> 
</meta> 

Link to comment
Tuuker,

This is not a valid way of asking. You can search it by yourself.

Go to the Wiki site and search for createPickup...

We won't script something for you.

I didnt ask to script something for me... I just tought there is some stock command like in SAMP if you run game and do /save then it will make to your Main san andreas folder playerpositsions.txt with saved cordinades.

I know the code how to make but i what i don't know is how to get easy cordinades on map...

Hmm you said you don't want a script but it is still scripted for you now. You could get this one by visiting https://wiki.multitheftauto.com/wiki/Main_Page.

Link to comment
Tuuker,

This is not a valid way of asking. You can search it by yourself.

Go to the Wiki site and search for createPickup...

We won't script something for you.

I didnt ask to script something for me... I just tought there is some stock command like in SAMP if you run game and do /save then it will make to your Main san andreas folder playerpositsions.txt with saved cordinades.

I know the code how to make but i what i don't know is how to get easy cordinades on map...

Hmm you said you don't want a script but it is still scripted for you now. You could get this one by visiting https://wiki.multitheftauto.com/wiki/Main_Page.

I tought there is some other way... Like in SA-MP, just run ingame and type /save, it will save positsion automatically...

Link to comment

It seems like an odd thing to include built-in doesn't it? MTA is generally engineered on the principle that as little as possible is built in to the client/server, allowing you as much flexibility as possible. Of course, the downside of this is you have to work a little harder and read the wiki :)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...