SA-MP Forums Archive
I cant save custom skins - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I cant save custom skins (/showthread.php?tid=653811)



I cant save custom skins - dani18 - 13.05.2018

Can somehow save my custom skin in the database in SQL? Because i can not.
I have skins in textdraws, and i use this code to save the skins or at least update them in the database.
PHP код:
    new x=0;
    while(
!= SELECTION_ITEMS)
    {
        if(
playertextid == gSelectionItems[playerid][x])
        {
              if(
gSelectionItemsTag[playerid][x] >= 25001 && gSelectionItemsTag[playerid][x] < 25005)
                
SetPlayerSkin(playeridgSelectionItemsTag[playerid][x]);
            
PlayerPlaySound(playerid10830.00.00.0);
            
DestroySelectionMenu(playerid);
            
CancelSelectTextDraw(playerid);
            
SkinChangeer[playerid] = 0;
            
SkinUse[playerid] = GetPlayerSkinEx(playerid);
            
Saveaccount(playerid);
            return 
1;
        }
        
x++;
    } 
PD: The "GetPlayerSkinEx" i used from the RogueDrifter include.

And here where all the data is saved and updated.
PHP код:
GuardarCuenta(playerid)
{
    new 
str[64];
    
format(stringsizeof(string), "");
    
strcat(cadena"UPDATE PLAYERS SET ");
    
format(str64"skin = '%d'"GetPlayerSkinEx(playerid)); strcat(stringstr);
    
format(str64" WHERE name= '%s'"DB_Escape(PlayerName(playerid))); strcat(stringstr);
    
db_query(Databasestring);
    return 
1;




Re: I cant save custom skins - dani18 - 13.05.2018

fixed.