MySQL Bug(Skin)
#1

Hi, i have a bug with MySQL, whenever i try to create loading code for skin it just gives me CJ(0) it saves fine, but load bad :/

pawn Код:
stock LoadPlayerInfo( iPlayer )
{

new
Query[ 1024 ]
;

if( mysql_fetch_row( Query ) )
{
GLoad_From_Table( Query, "e

<|>s[24]s[35]dddddfffdddddd>"
, PVar[ iPlayer ] );
<|>
GivePlayerMoney ( iPlayer, PVar[ iPlayer ][ pMoney ] );
SetPlayerInterior ( iPlayer, PVar[ iPlayer ][ pInt ] );
SetPlayerSkin ( iPlayer, PVar[ iPlayer ][ pSkin ] );
mysql_free_result ( );
}
return true;
}
That last "d" is the skin
Reply
#2

Are they spawned BEFORE this function is called?
Reply
#3

no it's called when they login
Reply
#4

Well to my knowledge they have to be spawned to retain the skin value. I store mine to an enum variable

pawn Код:
Stats[playerid][Skin]
and use it

pawn Код:
OnPlayerRequestSpawn()
SetSpawnInfo(Stats[playerid][Skin]
Reply
#5

Tryed, not working, i tryed without setplayerskin, it's every time it loads it's zero
Reply
#6

well are you forcing SpawnPlayer(); without actually setting any info, tried OnPlayerSpawn aswell?

OH so the variable doesn't load at all, my bad I misunderstood the problem.

Well take the integer from the table, store it somewhere else, then print it, does it come up zero then?
Reply
#7

yap zero it saves fine, but not loads
Reply
#8

no MYSQL errors? weird.
Reply
#9

Nop : / Maybe query is too small?
Reply
#10

Could try 2056 but I doubt it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)