Skins and ranks - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Skins and ranks (
/showthread.php?tid=127676)
Skins and ranks -
kLx - 14.02.2010
Hi people

I'm working on a mysql based fractions script, and I have one problem, hm.. two exactly

I'm storing skin id's and names in mysql table.
Like this:
Skin1: 1
Skin2: 46
Skin3: 98...
etc..
And rank names like:
Rank1: sergeant
Rank2: cadet and so on.
And in enum of fractions i have: Fractions[ police_id ][ fSkin1 ] will return 1, Fractions[ police_id ][ fSkin2 ] will return 46 and so on.
When player joins server, i try to do this:
pawn Код:
new skin[ 64 ];
new memb = Info[ playerid ][ zMemb ];
format( skinas, 64, "Fractions[ %d ][ fSkin%d ]", memb, Info[ playerid ][ zRank ] );
SetPlayerSkin( playerid, skin );
But it sets not the skin of my rank, but 233.
Where's da problem?
Re: Skins and ranks -
kLx - 15.02.2010
Ten hours passed..
Bump
Re: Skins and ranks -
kLx - 16.02.2010
Bumpy
Re: Skins and ranks -
wafffllesss - 16.02.2010
You're setting player skin as a string.
pawn Код:
new skin[ 64 ];
...
SetPlayerSkin( playerid, skin );
...
Skins are ints not strings.