Código:
stock SavePlayer(playerid) {
new str[700];
mysql_format(mysql,str,sizeof(str),"UPDATE `users` SET `Skin` = %d, `Adm` = %d, `PM` = %d, `Language` = %d, `LanguageTD` = %d, `NickHead` = %d, `Radar` = %d, `Donate` = %d, `Coins` = %d, `Played` = %d, `Wins` = %d, `Rewards` = %d, `RewardsC` = %d, `Sex` = %d WHERE `Name` = '%e' LIMIT 1",
Player[playerid][pSkin], Player[playerid][pAdm], Player[playerid][pPM], Player[playerid][pLanguage], Player[playerid][pLanguageTD], Player[playerid][pBI], Player[playerid][pRadar], Player[playerid][pDonate], Player[playerid][pCoins], Player[playerid][pPlayed], Player[playerid][pWins], Player[playerid][pRewards], Player[playerid][pRewardsC], Player[playerid][pChristmasHat], Player[playerid][pName]);
mysql_function_query(mysql, str, false, "", "");
mysql_format(mysql,str,sizeof(str),"UPDATE `users` SET `MHands` = %d, `MDE` = %d, `M9mm` = %d, `MS9mm` = %d, `MSG` = %d, `MSS` = %d, `MM4` = %d, `MAK47` = %d, `MMP5` = %d, `MGrenade` = %d, `MMC` = %d, `MCR` = %d, `MSR` = %d WHERE `Name` = '%e' LIMIT 1",
Player[playerid][pMHands], Player[playerid][pMDE], Player[playerid][pM9mm], Player[playerid][pMS9mm], Player[playerid][pMSG], Player[playerid][pMSS], Player[playerid][pMM4], Player[playerid][pMAK47], Player[playerid][pMMP5], Player[playerid][pMGrenade], Player[playerid][pMMC], Player[playerid][pMCR], Player[playerid][pMSR], Player[playerid][pName]);
mysql_function_query(mysql, str, false, "", "");
mysql_format(mysql,str,sizeof(str),"UPDATE `users` SET `DHands` = %d, `DDE` = %d, `D9mm` = %d, `DS9mm` = %d, `DSG` = %d, `DSS` = %d, `DM4` = %d, `DAK47` = %d, `DMP5` = %d, `DGrenade` = %d, `DMC` = %d, `DCR` = %d, `DSR` = %d, `DOTHER` = %d WHERE `Name` = '%e' LIMIT 1",
Player[playerid][pDHands], Player[playerid][pDDE], Player[playerid][pD9mm], Player[playerid][pDS9mm], Player[playerid][pDSG], Player[playerid][pDSS], Player[playerid][pDM4], Player[playerid][pDAK47], Player[playerid][pDMP5], Player[playerid][pDGrenade], Player[playerid][pDMC], Player[playerid][pDCR], Player[playerid][pDSR], Player[playerid][pDOTHER], Player[playerid][pName]);
mysql_function_query(mysql, str, false, "", "");
new save[600];
format(save,600,"%d,",Player[playerid][pSkins][0]);
for(new i=1;i<282;i++) { format(save,600,"%s%d,",save, Player[playerid][pSkins][i]); }
mysql_format(mysql,str,sizeof(str),"UPDATE `users` SET `Skins` = '%d' WHERE `Name` = '%e' LIMIT 1", save, Player[playerid][pName]);
mysql_function_query(mysql, str, false, "", "");
return true;
}
Código:
CMD:saveme(playerid) SavePlayer(playerid);