Jump to content

[HELP] Saving markers


lolman

Recommended Posts

Hello,

I've made an in-game marker adder but when I restart the source, all the markers are gone which I made. If someone could help me out?

  
policee = {} 
  
function policeMarker(thePlayer, commandName) 
    accountname = getAccountName (getPlayerAccount(thePlayer)) 
    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then 
    local x, y, z = getElementPosition(thePlayer) 
    police = createMarker(x+2, y, z-1, "cylinder", 1.5, 0, 0, 255) 
    if (police) then 
    table.insert(policee, markerPolice) 
    outputChatBox("Marker for the team 'Police' has been created!", thePlayer, 0, 255, 0) 
    else 
    outputChatBox("Creating marker failed.", thePlayer, 255, 0, 0) 
end 
end 
end 
addCommandHandler("cmp", policeMarker) 
  

Link to comment

Can you explain me this XML thing? I want to save it on that. I don't have any experience with XML. And can you help me a little bit on that part when I've accidentally placed a marker and I enter that marker and I do /deletemarker so I deletes the marker and removes it from the XML file?

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