-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
-- 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" />
-
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
-
And where's the XML part in that? I don't see it.
-
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.
-
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.
-
Now I'm lost, what are you trying to achieve? I don't understand.
-
There's no countdown like that, you'll have to create your own. https://wiki.multitheftauto.com/wiki/Main_Page
-
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.
-
I don't understand, isn't that resource link I gave you a countdown with images?
-
https://community.multitheftauto.com/index.php?p= ... ls&id=1362
-
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).
-
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
-
"Fix it"? who do you think you are? do you think we're your slaves or something similar?
-
Car mod: https://community.multitheftauto.com/index.php?p= ... ls&id=3093
-
First, we're not GAYS! Second, what do you mean?
-
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.
-
No, I guess he's just trying to increase the post count, or he's just stupid.
-
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.
-
Podes enseñarme el archivo .xml?
-
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.
-
Is texts.xml in the meta.xml? I don't get why should work here and not for you.
-
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.
-
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)
-
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 )
