Jump to content

help skin


Resto

Recommended Posts

Posted

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 ?

Posted
lol chinese.

explain what you want

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

Posted

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

Posted

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)]

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

Posted

and what i must use when i want to weapons?

if ( getPedWeapon ( player ) ) then guiSetText ( aTab1.Weapon, "Weapon: "..getWeaponNameFromID ( getPedWeapon ( player ) ).." (ID: "..getPedWeapon ( player )..")" ) end 

Posted
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

Posted
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" 
} 

Posted

Use my other post as example, you have to create another table (with other name, obviously) and with it you can use the same 'method' to get weapon's name.

Posted
Use my other post as example, you have to create another table (with other name, obviously) and with it you can use the same 'method' to get weapon's name.

but i want to weapons not skins.

Posted
but i want to weapons not skins.

really? a table can be used to any thing, not only for skins.

othertable = { 
    [24] = "Eagle", 
    [26] = "sawn" 
} 

take a look at this (tables section).

Posted
but i want to weapons not skins.

really? a table can be used to any thing, not only for skins.

othertable = { 
    [24] = "Eagle", 
    [26] = "sawn" 
} 

take a look at this (tables section).

and where i must use "othertable" ? othertable[] ?

Posted
and where i must use "othertable" ? othertable[] ?

Nope, you have to pass an value inside the brackets (in this case the weapon id).

othertable[ getPedWeapon(player) ] 

Posted
and where i must use "othertable" ? othertable[] ?

Nope, you have to pass an value inside the brackets (in this case the weapon id).

othertable[ getPedWeapon(player) ] 

thanks work.

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