Jump to content

How do I put skins in my MTA server?


Altaïr

Recommended Posts

Posted

Hello,

I have a server with Hamachi, and I want to put public skins (everyone can see them). Because everytime I put one, I'm the onlyone than can see it. Why? If you can answer with pictures... I have Windows 7

Thanks!

Posted

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 

Posted
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.

Posted

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 

Posted
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.

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

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