PHP код:
publics: OnMySQL_LOAD(idx, playerid, str[])
{
new x;
new r;
cache_get_row_count(r);
new time = GetTickCount();
switch(idx)
{
case 0:
{
if(!r) printf("[Çàãðóçêà ñêëàäîâ] Äàííûå íå ïîëó÷åíû!");
cache_get_value_name_int(idx-1, "bank_lsnews", FracBank[0][fLsnews]);
cache_get_value_name_int(idx-1, "bank_sfnews", FracBank[0][fSfnews]);
cache_get_value_name_int(idx-1, "bank_lvnews", FracBank[0][fLvnews]);
cache_get_value_name_int(idx-1, "bank_ballas", FracBank[0][fBallas]);
cache_get_value_name_int(idx-1, "bank_vagos", FracBank[0][fVagos]);
cache_get_value_name_int(idx-1, "bank_grove", FracBank[0][fGrove]);
cache_get_value_name_int(idx-1, "bank_aztec", FracBank[0][fAztek]);
cache_get_value_name_int(idx-1, "bank_rifa", FracBank[0][fRifa]);
cache_get_value_name_int(idx-1, "bank_exchequer", FracBank[0][fKazna]);
cache_get_value_name_int(idx-1, "bank_ssmc", FracBank[0][fSsmc]);
cache_get_value_name_int(idx-1, "bank_hamc", FracBank[0][fHamc]);
cache_get_value_name_int(idx-1, "bank_omc", FracBank[0][fOmc]);
cache_get_value_name_int(idx-1, "bank_wmc", FracBank[0][fWmc]);
cache_get_value_name_int(idx-1, "bank_hwmc", FracBank[0][fHwmc]);
cache_get_value_name_int(idx-1, "bank_fsmc", FracBank[0][fFsmc]);
cache_get_value_name_int(idx-1, "bank_pmc", FracBank[0][fPmc]);
cache_get_value_name_int(idx-1, "bank_mmc", FracBank[0][fMmc]);
cache_get_value_name_int(idx-1, "bank_vmc", FracBank[0][fVmc]);
cache_get_value_name_int(idx-1, "bank_bmc", FracBank[0][fBmc]);
cache_get_value_name_int(idx-1, "heal_ballas", ballashel);
cache_get_value_name_int(idx-1, "heal_grove", groovhel);
cache_get_value_name_int(idx-1, "heal_vagos", vagoshel);
cache_get_value_name_int(idx-1, "heal_aztec", aztekhel);
cache_get_value_name_int(idx-1, "heal_rifa", rifahel);
cache_get_value_name_int(idx-1, "adprice_ls", addd[0]);
cache_get_value_name_int(idx-1, "adprice_sf", addd[1]);
cache_get_value_name_int(idx-1, "adprice_lv", addd[2]);
cache_get_value_name_int(idx-1, "healprice", healpric);
cache_get_value_name_int(idx-1, "heal_yakuza", yakuzahel);
cache_get_value_name_int(idx-1, "heal_lcn", lcnhel);
cache_get_value_name_int(idx-1, "heal_rm", rmhel);
cache_get_value_name_int(idx-1, "mats_lsa", lsamatbi);
cache_get_value_name_int(idx-1, "mats_lva", armmatbi);
cache_get_value_name_int(idx-1, "mats_sfa", armmatsf);
cache_get_value_name_int(idx-1, "mats_ssmc", ssmcmatbi);
cache_get_value_name_int(idx-1, "mats_hamc", hamcmatbi);
cache_get_value_name_int(idx-1, "mats_omc", omcmatbi);
cache_get_value_name_int(idx-1, "mats_wmc", wmcmatbi);
cache_get_value_name_int(idx-1, "mats_hwmc", hwmcmatbi);
cache_get_value_name_int(idx-1, "mats_fsmc", fsmcmatbi);
cache_get_value_name_int(idx-1, "mats_vmc", vmcmatbi);
cache_get_value_name_int(idx-1, "mats_pmc", pmcmatbi);
cache_get_value_name_int(idx-1, "mats_mmc", mmcmatbi);
cache_get_value_name_int(idx-1, "mats_bmc", bmcmatbi);
cache_get_value_name_int(idx-1, "mats_rifa", rifamatbi);
cache_get_value_name_int(idx-1, "mats_ballas", ballasmatbi);
cache_get_value_name_int(idx-1, "mats_aztec", aztekmatbi);
cache_get_value_name_int(idx-1, "mats_vagos", vagosmatbi);
cache_get_value_name_int(idx-1, "mats_grove", groovmatbi);
cache_get_value_name_int(idx-1, "mats_lspd", lspdmatbi);
cache_get_value_name_int(idx-1, "mats_fbi", fbimats);
cache_get_value_name_int(idx-1, "mats_yakuza", yakuzamats);
cache_get_value_name_int(idx-1, "mats_rm", rmmats);
cache_get_value_name_int(idx-1, "mats_lcn", lcnmats);
cache_get_value_name_int(idx-1, "mats_sfpd", sfpdmats);
cache_get_value_name_int(idx-1, "mats_lvpd", lvpdmats);
cache_get_value_name_int(idx-1, "bank_lcn", MafiaBank[0][nLcn]);
cache_get_value_name_int(idx-1, "bank_yakuza", MafiaBank[0][nYakuza]);
cache_get_value_name_int(idx-1, "bank_rm", MafiaBank[0][nRm]);
printf("[Çàãðóçêà ñêëàäîâ] Ïîòðà÷åíî: %i ìñ", GetTickCount()-time);
}
case 1:
{
if(!r) return printf("Text");
mysql_format(dbHandle, QUERY, 128, "UPDATE "TABLE_ACCOUNTS" SET pBank = pBank + %i WHERE Name = '%e'",BizzInfo[bizselect[playerid]][bLastStavka],BizzInfo[bizselect[playerid]][bNameStavka]);
mysql_pquery(dbHandle, QUERY, "", "");
}