14.11.2013, 18:46
Code:
And I spawn at the correct position, but the skin is wrong. Although it's printed correctly..
pawn Код:
format(query,sizeof(query),"SELECT X,Y,Z,Interior,VirtualWorld,Skin FROM users WHERE UserId = %d",pInfo[playerid][SqlId]);
mysql_tquery(DbHandle,query,"OnSpawnSetup","i",playerid);
forward OnSpawnSetup(playerid);
public OnSpawnSetup(playerid)
{
SetSpawnInfo(playerid,0,cache_get_row_int(0,5),cache_get_row_int(0,0),cache_get_row_int(0,1),cache_get_row_int(0,2),0.0,0,0,0,0,0,0);
SetPlayerInterior(playerid,cache_get_row_int(0,3));
SetPlayerVirtualWorld(playerid,cache_get_row_int(0,4));
printf("[%s]skin:%d, X:%f",pInfo[playerid][Username],cache_get_row_int(0,5),cache_get_row_float(0,0));
SpawnPlayer(playerid);
MainTimer[playerid] = SetTimerEx("MainTimerFunction",60000,true,"i",playerid);
return 1;
}