Jump to content

HELP not working this command


zaticsergiu

Recommended Posts

function addPickup ( playerSource ) 
    local playerX, playerY, playerZ = getElementPosition( playerSource ) 
    local playerR = getPedRotation ( playerSource ) 
    local locationID = #taxiLocations + 1 
    local XMLTaxiLocations = xmlLoadFile ( "XML\\taxi_locations.xml" ) 
    local addNode = xmlCreateChild(XMLTaxiLocations, "location") 
    xmlSaveFile(XMLTaxiLocations) 
    xmlNodeSetAttribute(addNode, "id", locationID) 
    xmlNodeSetAttribute(addNode, "posX", playerX) 
    xmlNodeSetAttribute(addNode, "posY", playerY) 
    xmlNodeSetAttribute(addNode, "posZ", playerZ) 
    xmlNodeSetAttribute(addNode, "rot", playerR) 
    xmlSaveFile(XMLTaxiLocations) 
    xmlUnloadFile ( XMLTaxiLocations ) 
    taxiLocations[locationID] = {} 
    taxiLocations[locationID]["x"] = playerX 
    taxiLocations[locationID]["y"] = playerY 
    taxiLocations[locationID]["z"] = playerZ 
    taxiLocations[locationID]["r"] = playerR 
    outputChatBox ( "Taxi location saved.", playerSource ); 
end 
addCommandHandler ("addPickup", addPickup, true) 

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