Jump to content

Automatic Saving pos HELP!


Weser

Recommended Posts

Hello im trying to do auto save with event but it doesnt work

im trying to use this

function getPosition(player) 
local x,y,z = getElementPosition(player) 
local rx,ry,rz = getElementRotation(player) 
outputChatBox(x..","..y..","..z..","..rx..","..ry..","..rz,player,155,155,155) 
end 

but it doesnt work

 

 

 

but when i do with this it works but i dont need with command i need with auto save which saves automaticly maybe someone can help ?

function getPosition(player) 
local x,y,z = getElementPosition(player) 
local rx,ry,rz = getElementRotation(player) 
outputChatBox(x..","..y..","..z..","..rx..","..ry..","..rz,player,155,155,155) 
end 
addCommandHandler("pos", getPosition)

Link to comment
17 hours ago, Weser said:

Hello im trying to do auto save with event but it doesnt work

im trying to use this

function getPosition(player) 
local x,y,z = getElementPosition(player) 
local rx,ry,rz = getElementRotation(player) 
outputChatBox(x..","..y..","..z..","..rx..","..ry..","..rz,player,155,155,155) 
end 

but it doesnt work

 

 

 

but when i do with this it works but i dont need with command i need with auto save which saves automaticly maybe someone can help ?

function getPosition(player) 
local x,y,z = getElementPosition(player) 
local rx,ry,rz = getElementRotation(player) 
outputChatBox(x..","..y..","..z..","..rx..","..ry..","..rz,player,155,155,155) 
end 
addCommandHandler("pos", getPosition)

To save the position you have to use setAccountData and getAccountData or SQL queries, or if you meant to text file you can do XML.

All the information on how to do this is available on wiki.multitheftauto.com.

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...