bandi94 Posted December 29, 2011 Share Posted December 29, 2011 i am trying to set an image file to ElementData (player) i have a script(resource) there are the image's aded to meta ..... and i wanna set the to ElementData(player) and from another resource to can use dxDrawImage i have made the script : setElementData(........,"img.png") but on the other resource i get dxDrawImage can't load file it is possible to store a image (file) on element data and can draw it in another resource thx i need this bk i don't wanna put the images in the same resource Link to comment
BinSlayer1 Posted December 29, 2011 Share Posted December 29, 2011 you need to store as element data and then use it in dxDrawImage -> :/img.png NOTICE the ":" , they are required. I am not 100% sure as I haven't tested it myself, BUT this is the explanation of filepath @ xmlLoadFile https://wiki.multitheftauto.com/wiki/XmlLoadFile I can only assume this filepath system is persistent across all MTA functions EDIT: Also, check the Note here about client-side paths : https://wiki.multitheftauto.com/wiki/Filepath Link to comment
bandi94 Posted December 29, 2011 Author Share Posted December 29, 2011 thx its working Link to comment
BinSlayer1 Posted December 29, 2011 Share Posted December 29, 2011 Great. Although somebody with wiki access should edit https://wiki.multitheftauto.com/wiki/Filepath because this is not described there. (Although you can find it in xmlLoadFile's page, it should be made clear) Link to comment
bandi94 Posted December 30, 2011 Author Share Posted December 30, 2011 hm i have again a problem i don't have experience whit file's so i need a litel help i noticed that admin panel return's some countryes for which he don't have image's so i used fileExists to check but my problem is that the flag (image names are ) us.png,tr.png,ro.png ..... and the admin panel return US,TR,RO and the fileExists return false bk he chek RO.png and the file is ro.png is a way to solwe this? to don't rename all flag's bk are over 150 EDIT: i tricked it i aded it on client side bk on window's RO=ro on server side it don't work bk on linux RO and ro are not equal Link to comment
BinSlayer1 Posted December 30, 2011 Share Posted December 30, 2011 if I understand correctly you want to convert RO to ro? str = 'RO' str = string.lower(str) > str = 'ro' 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