Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

MySql Skins

$
0
0
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).

Code:

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;
}

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].

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>