31.08.2015, 23:52
Good, you're actually already getting the skin from the database, just messing setting the skin to the player, here you go
pawn Код:
forward OnAccountLoad(playerid);
public OnAccountLoad(playerid)
{
Player[playerid][Admin] = cache_get_field_content_int(0, "Admin");
Player[playerid][VIP] = cache_get_field_content_int(0, "VIP");
Player[playerid][Money] = cache_get_field_content_int(0, "Money");
Player[playerid][PosX] = cache_get_field_content_float(0, "PosX");
Player[playerid][PosY] = cache_get_field_content_float(0, "PosY");
Player[playerid][PosZ] = cache_get_field_content_float(0, "PosZ");
Player[playerid][PosA] = cache_get_field_content_float(0, "PosA");
Player[playerid][SkinID] = cache_get_field_content_float(0, "SkinID");//This gets the skin and saves it in "Player[playerid][SkinID]"
TogglePlayerSpectating(playerid, false);
GivePlayerMoney(playerid, Player[playerid][Money]);
SetSpawnInfo(playerid, 0, 23, Player[playerid][PosX], Player[playerid][PosY], Player[playerid][PosZ], Player[playerid][PosA], 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
SetPlayerSkin(playerid, Player[playerid][SkinID]);//Set his skin to the saved variable.
SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}Welcome to {FFBB00}Placeholder.");
return 1;
}