Skin not saving
#4

Quote:
Originally Posted by vassilis
Посмотреть сообщение
It saves it now ye forgot that function but i want to make it so when player registers he choose skin but when he logs in(as registered ofc)he get spawned how this could be implemented?
I think updating the player skin when they're spawning is not a good idea because it will keep on updating each time when they spawn, you can use a command or something to UPDATE the skin.

Here is the code that you asked for; this should be places under OnPlayerSpawn Callback.

pawn Код:
if((PlayerInfo[playerid][LoggedIn] == 1)) {
    new query[100];
    mysql_format(mysql, query, sizeof(query), "SELECT `pskin` FROM `accounts` WHERE `pid` = '%d'", pinfo[playerid][pMySQLID]);
    new Cache:result = mysql_query(mysql, query);
    if(cache_get_row_count() != 0)
    {
        pinfo[playerid][Skin] = cache_get_field_content_int(0, "pskin");
        SetPlayerSkin(playerid,pinfo[playerid][Skin]);
    }
    cache_delete(result);}
Reply


Messages In This Thread
Skin not saving - by vassilis - 18.01.2015, 17:59
Re: Skin not saving - by Ironboy - 18.01.2015, 18:07
Re: Skin not saving - by vassilis - 18.01.2015, 18:14
Re: Skin not saving - by Ironboy - 18.01.2015, 18:20
Re: Skin not saving - by vassilis - 18.01.2015, 18:26
Re: Skin not saving - by Ironboy - 18.01.2015, 18:32
Re: Skin not saving - by vassilis - 18.01.2015, 19:38

Forum Jump:


Users browsing this thread: 1 Guest(s)