14.02.2010, 13:25
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:
But it sets not the skin of my rank, but 233.
Where's da problem?

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 );
Where's da problem?