Jump to content

Drakath

Members
  • Posts

    768
  • Joined

  • Last visited

Everything posted by Drakath

  1. You could use: setAccountData getAccountData
  2. getPlayerName getPlayerPing getElementData( player, group ) --Needs an additional script to set the group element data. getElementData( player, playtime ) --Needs an additional script to set the play time element data.
  3. There is 'setAccountPassword' so why not make 'setAccountUsername'.
  4. Drakath

    Car locking

    Never mind, I fixed it.
  5. Drakath

    Car locking

    ********** Almost works except that when I enter the car, I get network trouble.
  6. Drakath

    Car locking

    I can't do that. Are you telling me that the code I posted is correct?
  7. Drakath

    Car locking

    I can't do that. Are you telling me that the code I posted is correct?
  8. Drakath

    Car locking

    When a player enters a car, this happens: setElementID (vehicle, getAccountName (getPlayerAccount(p))) Vehicle is: local vehicle = createVehicle ( 436, 200.54362, 1821.50317, 17.64063 )
  9. Drakath

    Car locking

    If I remove: local acc = getAccountName (getPlayerAccount (player)) How do you suppose the script to check if it is player's car? if not (acc == id) then
  10. Drakath

    Car locking

    When someone enters 'vehicle' : setElementID (vehicle, getAccountName (getPlayerAccount(p))) *************** But other players can still hijack the vehicle. Why?
  11. Drakath

    Car locking

    I noticed that event handler 'onVehicleStartEnter' has an integer 'seat'. So I decided to make a script to lock only the driver's seat. But how do I define the seat? I can't use 'getPedOccupiedVehicleSeat' because the player would be already in the car. I guess this wouldn't work: if seat == 0 then
  12. I shut down the Server and the map editor started. Why? Should I still fix my database? I've fixed it several times in past few months.
  13. How do I know if it's locked or damaged? Could it be locked because I am running a Server?
  14. ================================================================== = Multi Theft Auto: San Andreas v1.3.4 ================================================================== = Server name : Map Editor Server = Server IP address: = Server port : 22010 = = Log file : ..rver/mods/deathmatch/logs/editor_server.log = Maximum players : 1 = HTTP port : 22011 = Voice Chat : Disabled = Bandwidth saving : Medium ================================================================== [00:38:04] ERROR: no such table: write_test [00:38:04] ERROR: Errors were encountered updating 'internal.db' database [00:38:04] ERROR: Database might be locked by another process, or damaged. [00:38:04] ERROR: See - https://wiki.multitheftauto.com/wiki/fixdb [00:38:04] ERROR: ************************ [00:38:04] Server stopped! Error: Could not start local server. [Error loading mod]
  15. How can this help? The error appeared when I made savePass function and I also noticed that it works if I change this: function savePass() local xmlFile = xmlLoadFile(xmlFileName) if guiCheckBoxGetSelected(PasswordSave) then xmlNodeSetAttribute(xmlFile,"password",tostring(guiGetText(editPassword))) xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) elseif not guiCheckBoxGetSelected(PasswordSave) then xmlNodeSetAttribute(xmlFile,"password","") xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) end end into this: function savePass() local xmlFile = xmlLoadFile(xmlFileName) if guiCheckBoxGetSelected(PasswordSave) then xmlNodeSetAttribute(xmlFile,"password",tostring(guiGetText(editPassword))) xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) end end However the password will always be saved if I do this. I need it to set the password to "" when checkbox is unchecked.
  16. When they join to check if they have a settings.xml file and when they click the login button.
  17. xmlFileHandler but it happened when I made savePass
  18. I'm getting stack overflow error. It happened when I made this function: function savePass() local xmlFile = xmlLoadFile(xmlFileName) if guiCheckBoxGetSelected(PasswordSave) then xmlNodeSetAttribute(xmlFile,"password",tostring(guiGetText(editPassword))) xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) elseif not guiCheckBoxGetSelected(PasswordSave) then xmlNodeSetAttribute(xmlFile,"password","") xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) end end addEventHandler("onClientGUIClick",btnLogin,savePass) It says that the error is on line 285 which is: xmlSaveFile(xmlFile) function xmlFileHandler(gReturn) local xmlFile = xmlLoadFile(xmlFileName) if not xmlFile then xmlFile = xmlCreateFile(xmlFileName,"settings") end xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) if (gReturn) then if (gReturn == true) then loginPanel() else return end end end
  19. Drakath

    Checkbox

    I'm making a login panel with a checkbox to save your password. Everything works fine except that when you save your password and reconnect, the checkbox is unchecked. Is there something like setCheckboxChecked? People can get confused.
  20. Oh, I used client0 and it was clientO. My bad. Thanks.
  21. Strange, it used to work before.
×
×
  • Create New...