My Sql Saving (URGENT) Thank you!
#1

I know, it's wrong cuz it doesn't save. But when i compile it's fine. Anyone help me. I need to make it in double way

PHP код:
forward OnPlayerSave(playerid);
public 
OnPlayerSave(playerid)
{
    new 
query[500];
    
pInfo[playerid][pSkinID] = GetPlayerSkin(playerid);
    if(
IsLoggedIn[playerid] == && playerid != INVALID_PLAYER_ID && !IsPlayerNPC(playerid))
    {
        
mysql_format(MySQLConquerysizeof(query), "UPDATE `players` SET `Admin`=%d, `Vip`=%d, `Money`=%d, `BankMoney`=%d, `Score`=%d, `Deaths`=%d, `Kills`=%d, `SkinID`=%d, `WantedLevel`=%d, `Bounty`=%d, `BountyHour`=%d, `BountyMinute`=%d, `BountyPlacedOn`=%d, `BountyPlacedBy`=%d WHERE `ID`=%d AND `user`='%e'",
        
pInfo[playerid][pAdmin],
        
pInfo[playerid][pVip],
        
GetPlayerMoney(playerid),
        
pInfo[playerid][pBankMoney],
        
GetPlayerScore(playerid),
        
pInfo[playerid][pDeaths],
        
pInfo[playerid][pKills],
        
GetPlayerSkin(playerid),
        
pInfo[playerid][pWantedLevel],
        
pInfo[playerid][pBounty],
        
pInfo[playerid][pBountyHour],
        
pInfo[playerid][pBountyMinute],
        
pInfo[playerid][pBountyPlacedOn],
        
pInfo[playerid][pBountyPlacedBy],
        
pInfo[playerid][pID],
        
PlayerName(playerid));
        
mysql_format(MySQLConquerysizeof(query), "UPDATE `players` `Robbed`=%d, `RobbedMoney`=%d, `GotRobbed`=%d, `GotRobbedMoney`=%d, `StoreRobbed`=%d, `StoreRobbedMoney`=%d, `FoodPurchased`=%d, `FoodPurchasedMoney`=%d, `WeaponsPurchased`=%d, `WeaponsPurchasedMoney`=%d WHERE `ID`=%d AND `user`='%e'",
        
pInfo[playerid][pRobbed],
        
pInfo[playerid][pRobbedMoney],
        
pInfo[playerid][pGotRobbed],
        
pInfo[playerid][pGotRobbedMoney],
        
pInfo[playerid][pStoreRobbed],
        
pInfo[playerid][pStoreRobbedMoney],
        
pInfo[playerid][pFoodPurchased],
        
pInfo[playerid][pFoodPurchasedMoney],
        
pInfo[playerid][pWeaponsPurchased],
        
pInfo[playerid][pWeaponsPurchasedMoney],
        
pInfo[playerid][pID],
        
PlayerName(playerid));
        
mysql_tquery(MySQLConquery"""");
        print(
query); 
Reply


Messages In This Thread
My Sql Saving (URGENT) Thank you! - by STONEGOLD - 14.06.2015, 04:36
Re: My Sql Saving (URGENT) Thank you! - by FplayerGR - 14.06.2015, 05:06
Re: My Sql Saving (URGENT) Thank you! - by STONEGOLD - 14.06.2015, 05:14
Re: My Sql Saving (URGENT) Thank you! - by FplayerGR - 14.06.2015, 05:22
Re: My Sql Saving (URGENT) Thank you! - by ]Rafaellos[ - 14.06.2015, 05:26
Re: My Sql Saving (URGENT) Thank you! - by STONEGOLD - 14.06.2015, 05:45
Re: My Sql Saving (URGENT) Thank you! - by FplayerGR - 14.06.2015, 06:05

Forum Jump:


Users browsing this thread: 1 Guest(s)