Karuzo Posted January 17, 2014 Share Posted January 17, 2014 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. Link to comment
TAPL Posted January 17, 2014 Share Posted January 17, 2014 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) Link to comment
Karuzo Posted January 17, 2014 Author Share Posted January 17, 2014 Yes i've defined it. Well the meta is pretty long but ok , type="script" name="DL" version="1.1" description="Driving License" /> Link to comment
Karuzo Posted January 17, 2014 Author Share Posted January 17, 2014 I don't see an error.... Why doesn't this work ? Link to comment
TAPL Posted January 17, 2014 Share Posted January 17, 2014 I don't know, can you upload the resource on a website so i can test it? Link to comment
Karuzo Posted January 18, 2014 Author Share Posted January 18, 2014 Just fixed it. Typed guiSetVisible wrong But ive got another problem : If i change my Skin it isn't 'refreshed' on the license. How can i get it to refresh ? Link to comment
TAPL Posted January 18, 2014 Share Posted January 18, 2014 guiStaticImageLoadImage setTimer Link to comment
Karuzo Posted January 18, 2014 Author Share Posted January 18, 2014 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) Link to comment
TAPL Posted January 18, 2014 Share Posted January 18, 2014 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) Link to comment
Karuzo Posted January 18, 2014 Author Share Posted January 18, 2014 Thank you i will try it . 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