Jump to content

Select Skin Models.


Karuzo

Recommended Posts

Posted

Hello ,

i've wanted to make something like a license , and wanted to use the Skin of the Player as a Picture.

I have found a Skin pack with every Skin on the internet , so i wanted to use them ..

But this doesn't work , why ?

guiCreateStaticImage((screenW - 150) / 2.9, (screenH - 150) / 1.25, 150, 150, "skins/"..getElementModel(localPlayer)..".png", false) 

No Errors.

Posted

You have screenW, screenH defined?

Can you show the meta?

Try this anyway.

guiCreateStaticImage((screenW - 150) / 2.9, (screenH - 150) / 1.25, 150, 150, "skins/"..tostring(getElementModel(localPlayer))..".png", false) 

Posted

Yes i've defined it.

Well the meta is pretty long but ok ,

    type="script" name="DL" version="1.1" description="Driving License" /> 
     
    

Posted

Just fixed it. Typed guiSetVisible wrong :P

But ive got another problem : If i change my Skin it isn't 'refreshed' on the license.

How can i get it to refresh ?

Posted

Just like that ?

local skinpic = guiCreateStaticImage((screenW - 150) / 2.9, (screenH - 150) / 1.35, 150, 150, "skins/"..tostring(getElementModel(localPlayer))..".png", false) 
setTimer ( guiStaticImageLoadImage, 1000, 1, skinpic) 

Posted

Try this:

setTimer(function() 
    modelID = getElementModel(localPlayer) 
    if not skinpic then 
        skinpic = guiCreateStaticImage((screenW - 150) / 2.9, (screenH - 150) / 1.35, 150, 150, "skins/"..tostring(modelID)..".png", false) 
        oModelID = modelID 
    else 
        if modelID ~= oModelID then 
            guiStaticImageLoadImage(skinpic, "skins/"..tostring(modelID)..".png") 
            oModelID = modelID 
        end 
    end 
end, 1000, 0) 

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