Piorun Posted November 5, 2011 Share Posted November 5, 2011 Why function xmlLoadFile doesn't work in Client Side ???? Link to comment
Charlie_Jefferson Posted November 5, 2011 Share Posted November 5, 2011 Because it's a server-side only function. The client doesn't have access to it. If it would, it could copy the file, as client-side scripts are downloaded when you join a server. Link to comment
TAPL Posted November 5, 2011 Share Posted November 5, 2011 xmlLoadFile is work Client and server side https://wiki.multitheftauto.com/wiki/XmlLoadFile Link to comment
arezu Posted November 5, 2011 Share Posted November 5, 2011 it does work client sided.. type in meta i think its like that, and then you can use it client sided. Link to comment
FatalTerror Posted November 5, 2011 Share Posted November 5, 2011 o_O... If it's only server-side the wiki must be fixed... Clientxmlnode xmlLoadFile ( string filePath ) Required Arguments filePath: The filepath of the file in the following format: ":resourceName/path". 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file. For example, if there is a file named 'settings.xml' in the resource 'ctf', it can be accessed from another resource this way: xmlLoadFile(":ctf/settings.xml"). If the file is in the current resource, only the file path is necessary, e.g. xmlLoadFile("settings.xml"). Link to comment
Piorun Posted November 5, 2011 Author Share Posted November 5, 2011 Ok this function start working after when i add Link to comment
bandi94 Posted November 5, 2011 Share Posted November 5, 2011 (edited) its working you joke whit only Server Side? i have Autologin on XML base Edited November 5, 2011 by Guest Link to comment
Charlie_Jefferson Posted November 5, 2011 Share Posted November 5, 2011 Server-side only... If it would be client-side, then people already have your xml files... Edit: It might be client-side too. Don't use it unless you want people to get your .xml files. Link to comment
bandi94 Posted November 5, 2011 Share Posted November 5, 2011 omg man on a client side script the client download the xml file from server and then every client can edit that file ... Link to comment
Jaysds1 Posted November 5, 2011 Share Posted November 5, 2011 you should make it a private file then, when creating a file, put @ in front of it and when you open a private file, put @ in front of it. i got this from here: https://wiki.multitheftauto.com/wiki/Filepath Link to comment
JR10 Posted November 5, 2011 Share Posted November 5, 2011 xml, file functions client side will look in the resource client side, the one you downloaded. MTA San Andreas 1.1.1\mods\deathmatch\resources xmlLoadFile ( ":resource/config.xml" ) Will look for config.xml in: MTA San Andreas 1.1.1\mods\deathmatch\resources\resource\config.xml The reason it didn't work in the first place, because the config.xml wasn't client side, when you specified it in the meta.xml, the client downloads it. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now