Jump to content

help skin


Resto

Recommended Posts

hi i have here this:

Skin: ID

guiSetText ( aTab1.Skin, "Skin: "..iif ( getElementModel ( player ), getElementModel ( player ), "N/A" ) ) 

and when i want to

if getPlayerSkin ( 70 ) == Good Skin

elseif getPlayerSkin ( 100 ) == Noob Skin

elseif getPlayerSkin ( 50 ) == Idiot Skin

Good Skin = Name

Noob Skin = Name

Idiot Skin = Name

example:

ID 0 = CJ == Good Skin

Skin: Good Skin

Please can anyone help me or get me example ?

Link to comment

local 70 = Good Skin

local 71 = Nice Skin

i want when i have skin ID 70 or 71 there will not Skin: 70 & 71 but Skin: Good Skin

Do you know, your words are not clear?

Are you trying to make for each skin id a custom name in the gridlist with these names , Good skin / Nice skin..?

Link to comment

If i understood you correctly you can use a table with skin ids as indexes

names = { 
    -- [sKINID] = "NAME", 
    [1] = "skin name 1", 
    [25] = "other name..", 
    [23] = "dsasdsadad" 
} 

... and to retrieve the 'skin name' you just use names[getElementModel(player)]

Link to comment
If i understood you correctly you can use a table with skin ids as indexes
names = { 
    -- [sKINID] = "NAME", 
    [1] = "skin name 1", 
    [25] = "other name..", 
    [23] = "dsasdsadad" 
} 

... and to retrieve the 'skin name' you just use names[getElementModel(player)]

thanks work.

Link to comment
getWeaponNameFromID -- This function is for getting player weapons ID. 
giveWeapon -- This is for giving player weapon 

Try by yourself, if you failed then post the code and explain the problem more clear than before, you can learn from your fails

i mean:

names = { 
    [31] = "1", 
    [29] = "2", 
    [28] = "3" 
} 

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