Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. -- client side: addEventHandler("onClientResourceStart",resourceRoot, function () txd = engineLoadTXD ( "66.txd" ) engineImportTXD ( txd, 66 ) dff = engineLoadDFF ( "66.dff", 0 ) engineReplaceModel ( dff, 66 ) triggerServerEvent ("doFixSkin", localPlayer, getElementModel(localPlayer)) end) -- server side: addEvent("doFixSkin", true) addEventHandler("doFixSkin", root, function(oldSkin) setElementModel(source, 0) setTimer(setElementModel,200,1,source,oldSkin) end ) -- meta.xml: type="misc" name="Skin" author="adward" description="" version="1" />
  2. Recuerda que para remplazar un arma no usas el modelo como en giveWeapon etc. M4 = 31, pero esto no te sirve para remplazarla. El ID para remplazar es el del objeto del arma. M4 = 356. Aca tienes los ID's: https://wiki.multitheftauto.com/wiki/Weapons
  3. And where's the XML part in that? I don't see it.
  4. Castillo

    Help help

    At least I know how to do it. P.S: That's not the right way to ask for help, that's the most stupid way.
  5. But, why do you need that? I suposed you wanted to save the login details for the next time you join the server. P.S: If the reinstalls MTA, these files will be lost.
  6. Now I'm lost, what are you trying to achieve? I don't understand.
  7. There's no countdown like that, you'll have to create your own. https://wiki.multitheftauto.com/wiki/Main_Page
  8. No existe tal cosa (aun). Que yo sepa, en una futura version del MTA se podra cambiar cuantas balas puede llevar el arma, llevar dos M4's etc.
  9. I don't understand, isn't that resource link I gave you a countdown with images?
  10. https://community.multitheftauto.com/index.php?p= ... ls&id=1362
  11. These two functions should be used like this: On login button clicked -> saveLoginToXML(username, password) When player joins(onClientResourceStart) -> loadLoginFromXML() which returns two values (username and password).
  12. function saveLoginToXML(username, password) xmlFile = xmlLoadFile ("userdata.xml") if not xmlFile then xmlFile = xmlCreateFile("userdata.xml", "login") end local usernameNode = xmlFindChild (xmlFile, "username", 0) local passwordNode = xmlFindChild (xmlFile, "password", 0) local success = xmlNodeSetValue (usernameNode, tostring(username)) local success2 = xmlNodeSetValue (passwordNode, tostring(password)) if success and success2 then xmlSaveFile(xmlFile) end xmlUnloadFile (xmlFile) end function loadLoginFromXML() xmlFile = xmlLoadFile ("userdata.xml") if not xmlFile then xmlFile = xmlCreateFile("userdata.xml", "login") end local usernameNode = xmlFindChild (xmlFile, "username", 0) local passwordNode = xmlFindChild (xmlFile, "password", 0) if usernameNode and passwordNode then return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode) else return "", "" end xmlUnloadFile (xmlFile) end
  13. Castillo

    Help help

    "Fix it"? who do you think you are? do you think we're your slaves or something similar?
  14. Car mod: https://community.multitheftauto.com/index.php?p= ... ls&id=3093
  15. First, we're not GAYS! Second, what do you mean?
  16. He's trying to save the USERNAME and PASSWORD so when he joins again, he doesn't have to type it AGAIN AND AGAIN. What you say makes no sense.
  17. No, I guess he's just trying to increase the post count, or he's just stupid.
  18. kimmis, you didn't get what he's trying to do. If I'm right, he's trying to save and load the account details from a CLIENT SIDE XML fiel called "acl.xml", but that doesn't mean is the access control list.
  19. Podes enseñarme el archivo .xml?
  20. This is how I got it working: Resource: 1 with the script to load the files. Resource: 2 with texts.xml file. It works with no problems.
  21. Is texts.xml in the meta.xml? I don't get why should work here and not for you.
  22. Is the resource where you call that script from in the acl? and has access to this function: ModifyOtherObjects? Because, I've loaded a texts.xml in a resource and works perfectly.
  23. createBlip ( -2083.7319335938, -189.05606079102, 35.3203125, 6 ) local Arena = createColCircle ( -2083.7319335938, -189.05606079102, 50 ) function ArenaHit ( thePlayer ) outputChatBox ( getPlayerName ( thePlayer ) .. " Is In The Field" ) -- to everyone right? end addEventHandler ( "onColShapeHit", Arena, ArenaHit ) function ArenaLeave ( thePlayer ) if getElementType ( thePlayer ) == "player" then takeAllWeapons ( thePlayer ) outputChatBox ( "Your Weapon Has Been Taken", 255, 25, 0, true, thePlayer ) end end addEventHandler ( "onColShapeLeave", Arena, ArenaLeave)
  24. createBlip ( 6 , 0 , 0 , 37 ) local arena = createColCircle ( 1024, 1024, 15 ) function filedLeave ( thePlayer ) if getElementType ( thePlayer ) == "player" then takeAllWeapons ( thePlayer ) outputChatBox ( "Your Weapon Has Been Taken", 255, 25, 0, true, thePlayer ) end end addEventHandler ( "onColShapeLeave", arena, filedLeave )
×
×
  • Create New...