Jump to content

question about image


bandi94

Recommended Posts

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

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

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 8)

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...