I cant save custom skins
#1

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;

Reply
#2

fixed.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)