04.12.2017, 22:25
I'm not sure why the skin isn't being assigned. Everything gets assigned from the mysql data except the skin. The skin ID saves to mysql, but I always come back as CJ (Skin ID 0).
Any ideas? Please and thank you.
EDIT: NEVERMIND IM STUPID.
Those who are having trouble with this as well, go to your SetSpawnInfo. The 3rd parameter was set to "0" for me. I replaced that with Player[playerid][Skin].
Код:
AssignPlayerData(playerid) { cache_get_value_int(0, "ID", Player[playerid][ID]); cache_get_value_int(0, "Admin", Player[playerid][Admin]); cache_get_value_int(0, "Skin", Player[playerid][Skin]); cache_get_value_float(0, "Health", Player[playerid][Health]); cache_get_value_float(0, "Armor", Player[playerid][Armor]); cache_get_value_int(0, "Money", Player[playerid][Money]); cache_get_value_int(0, "BankMoney", Player[playerid][BankMoney]); cache_get_value_float(0, "X", Player[playerid][X_Pos]); cache_get_value_float(0, "Y", Player[playerid][Y_Pos]); cache_get_value_float(0, "Z", Player[playerid][Z_Pos]); cache_get_value_float(0, "Angle", Player[playerid][A_Pos]); cache_get_value_int(0, "Interior", Player[playerid][Interior]); SetMoney(playerid, Player[playerid][Money]); SetPlayerSkin(playerid, Player[playerid][Skin]); SetHealth(playerid, Player[playerid][Health]); SetArmor(playerid, Player[playerid][Armor]); return 1; }
EDIT: NEVERMIND IM STUPID.
Those who are having trouble with this as well, go to your SetSpawnInfo. The 3rd parameter was set to "0" for me. I replaced that with Player[playerid][Skin].