Advertisement
Guest User

Untitled

a guest
Aug 9th, 2014
249
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public DBSave(client)
  2. {
  3. if (InQuery)
  4. {
  5. CreateTimer(1.0, DBSave_ReDo, client);
  6. }
  7.  
  8. if (Loaded[client])
  9. {
  10. new GameTime = GetTime();
  11.  
  12. decl String:error[256];
  13. new Handle:database = SQL_Connect("roleplay", true, error, sizeof(error));
  14.  
  15. new String:SteamId[32], String:query[999];
  16. GetClientAuthString(client, SteamId, sizeof(SteamId));
  17.  
  18. totalmoney[client] = money[client] + bank[client];
  19.  
  20. Format(query, sizeof(query), "UPDATE rp_account SET TYPE = '%i', VIP = '%i' WHERE STEAMID = '%s'", TypeAccount[client], VipUsed[client], SteamId);
  21. SQL_FastQuery(database, query);
  22.  
  23. Format(query, sizeof(query), "UPDATE rp_players SET MONEY = '%i', BANK = '%i', TOTAL = '%i', JOBID = '%i', RANKID = '%i', GROUPE = '%i', JAILTIME = '%i', ISINJAIL = '%i', RIB = '%i', CB = '%i', COMPTE = '%i', EMBAUCHEEXPIRE = '%i', LASTONTIME = '%i', PERMISPROJECTILES = '%i', PERMISLOURD = '%i', PERMISLEGER = '%i', LOCATION = '%i', LOCATIONEND = '%i', SKIN = '%i' WHERE STEAMID = '%s'", money[client], bank[client], totalmoney[client], jobid[client], rankid[client], groupe[client], jailtime[client], IsInJail[client], rib[client], cb[client], compte[client], EmbaucheExpire[client], GameTime, ITEM_PERMISPROJECTILES[client], ITEM_PERMISLOURD[client], ITEM_PERMISLEGER[client], Location[client], LocationEnd[client], skin[client], SteamId);
  24. SQL_FastQuery(database, query);
  25.  
  26. Format(query, sizeof(query), "UPDATE rp_items SET KITCROCHETAGE = '%i', GLOCK = '%i', USP = '%i', P228 = '%i', DEAGLE = '%i', ELITES = '%i', FIVESEVEN = '%i', M3 = '%i', XM1014 = '%i', GALIL = '%i', AK47 = '%i', SCOUT = '%i', SG552 = '%i', AWP = '%i', G3SG1 = '%i', FAMAS = '%i', M4A1 = '%i', AUG = '%i', SG550 = '%i', MAC10 = '%i', TMP = '%i', MP5 = '%i', UMP45 = '%i', P90 = '%i', M249 = '%i', CARTOUCHE = '%i', ECSTAZY = '%i', COCAINE = '%i', HEROINE = '%i', SHIT = '%i', WEED = '%i', CHAMPIGNONS = '%i' WHERE STEAMID = '%s'", ITEM_KITCROCHETAGE[client], ITEM_GLOCK[client], ITEM_USP[client], ITEM_P228[client], ITEM_DEAGLE[client], ITEM_ELITES[client], ITEM_FIVESEVEN[client], ITEM_M3[client], ITEM_XM1014[client], ITEM_GALIL[client], ITEM_AK47[client], ITEM_SCOUT[client], ITEM_SG552[client], ITEM_AWP[client], ITEM_G3SG1[client], ITEM_FAMAS[client], ITEM_M4A1[client], ITEM_AUG[client], ITEM_SG550[client], ITEM_MAC10[client], ITEM_TMP[client], ITEM_MP5[client], ITEM_UMP45[client], ITEM_P90[client], ITEM_M249[client], ITEM_CARTOUCHE[client], ITEM_ECSTAZY[client], ITEM_COCAINE[client], ITEM_HEROINE[client], ITEM_SHIT[client], ITEM_WEED[client], ITEM_CHAMPIGNONS[client], SteamId);
  27. SQL_FastQuery(database, query);
  28.  
  29. Format(query, sizeof(query), "UPDATE rp_items SET LEVELCUT = '%i', CUTBURN = '%i', CUTFREEZE = '%i', CUTFLASH = '%i', CUTSMALL = '%i', CUTBIG = '%i', GRENADE = '%i', FLASH = '%i', FUMIGENE = '%i', GILET = '%i', KEVLAR = '%i', DIPLOME = '%i', TICKET10 = '%i', TICKET50 = '%i', TICKET100 = '%i', TICKET500 = '%i', TICKET1000 = '%i', TROUSSE = '%i', KIT = '%i', SAC = '%i', IMPRIMANTE = '%i', HAMBURGER = '%i', HAMBURGERFAT = '%i', BIGMAC = '%i', HAPPYMEAL = '%i' WHERE STEAMID = '%s'", ITEM_LEVELCUT[client], ITEM_CUTBURN[client], ITEM_CUTFREEZE[client], ITEM_CUTFLASH[client], ITEM_CUTSMALL[client], ITEM_CUTBIG[client], ITEM_GRENADE[client], ITEM_FLASH[client], ITEM_FUMIGENE[client], ITEM_GILET[client], ITEM_KEVLAR[client], ITEM_DIPLOME[client], ITEM_TICKET10[client], ITEM_TICKET50[client], ITEM_TICKET100[client], ITEM_TICKET500[client], ITEM_TICKET1000[client], ITEM_TROUSSE[client], ITEM_KIT[client], ITEM_SAC[client], ITEM_IMPRIMANTE[client], ITEM_HAMBURGER[client], ITEM_HAMBURGERFAT[client], ITEM_BIGMAC[client], ITEM_HAPPYMEAL[client], SteamId);
  30. SQL_FastQuery(database, query);
  31.  
  32. Format(query, sizeof(query), "UPDATE rp_skins SET POLIZEI = '%i', CHRISTMAS = '%i', PINK = '%i', TASKFORCE = '%i', URBAN = '%i', UMBRELLA = '%i', FISHER = '%i', NIKO = '%i', CHEF = '%i', KIRBYT = '%i' WHERE STEAMID = '%s'", ITEM_SKINPOLIZEI[client], ITEM_SKINCHRISTMAS[client], ITEM_SKINPINK[client], ITEM_SKINTASKFORCE[client], ITEM_SKINURBAN[client], ITEM_SKINUMBRELLA[client], ITEM_SKINFISHER[client], ITEM_SKINNIKO[client], ITEM_SKINCHEF[client], ITEM_SKINKIRBYT[client], SteamId);
  33. SQL_FastQuery(database, query);
  34.  
  35. Format(query, sizeof(query), "UPDATE rp_vehicles SET COLOR = '%i', BMW = '%i', AUDIR8 = '%i' WHERE STEAMID = '%s'", ColorVehicle[client], CAR_BMW[client], CAR_AUDIR8[client], SteamId);
  36. SQL_FastQuery(database, query);
  37.  
  38. CloseHandle(database);
  39. }
  40. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement