Jump to content

How do I put skins in my MTA server?


Altaïr

Recommended Posts

ok,

if you're planning to put skins/pics on a gui then you would need to use

guiCreateStaticImage 

else if you want to make others see the image that you see, then just use

for _,v in ipairs(getElementsByType("player"))do 
     local image=guiCreateStaticImage(x,y,width,height,"theimage.png",false) --create image 
     setElementData(v,"image",image) --this is if you want to delete it after 
end 

Link to comment
ok,

if you're planning to put skins/pics on a gui then you would need to use

guiCreateStaticImage 

else if you want to make others see the image that you see, then just use

for _,v in ipairs(getElementsByType("player"))do 
     local image=guiCreateStaticImage(x,y,width,height,"theimage.png",false) --create image 
     setElementData(v,"image",image) --this is if you want to delete it after 
end 

setElementData is doing nothing there, you can't delete the image by deleting element data.

Link to comment
I know,

If he brings down or close the image, then this code would come in:

for _,v in ipairs(getElementsByType("player"))do 
     If getElementData(v,"Image") then 
          destroyElement(getElementData(v,"Image")) 
     end 
end 

Pretty sure variables are not static, so image does not get deleted.

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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