Grahc 5 Опубликовано 15 декабря, 2016 Добрый день.У меня такая проблема.У меня не сохраняется владелец номера в отеле. mysql r39-5 HostelRoomBuy(playerid,room) { if(Account[playerid][Money] < 1500) return SendClientMessage(playerid,COLOR_RED,"У тебя не хватает денег на покупку номера."); if(Account[playerid][QuestTree] == 1 && Account[playerid][Q1Lvl] == 4) { if(PlayerInfo[playerid][QuestDone] == 0) { PlayerInfo[playerid][QuestDone] = 1; SendClientMessage(playerid,COLOR_LIGHTGREEN,"Вы успешно выполнили задание 'Частый посетитель'."); } } Account[playerid][Money] -=1500; GivePlayerMoney(playerid,-1500); PlayerInfo[playerid][HostelEnterRoom] = room; Account[playerid][HRR] = room; Account[playerid]<span class="bbc_hr"> </span> = PlayerInfo[playerid][HostelEnter]; SetPlayerPosEx(playerid,2327.8306, -1968.1580 ,26.1434,294.2942,2,playerid+1); switch(room) { case 1: { Hostel[PlayerInfo[playerid][HostelEnter]][hoBank][0] = 1000; strmid(Hostel[PlayerInfo[playerid][HostelEnter]][hoOwner0], PlayerInfo[playerid][Nickname], 0, strlen(PlayerInfo[playerid][Nickname]), 32); format(PlayerInfo[playerid][mymessage],144,"{ffffff}Комната #{00FF00}1\n{ffffff}Владелец: {FFFF00}%s", Hostel[PlayerInfo[playerid][HostelEnter]][hoOwner0]); UpdateDynamic3DTextLabelText(Hostel[PlayerInfo[playerid][HostelEnter]][hoLabel0][0], 0xC4DAADFF, PlayerInfo[playerid][mymessage]); } Hostel[PlayerInfo[playerid][HostelEnter]][hoUpdate] = 1; SendClientMessage(playerid,COLOR_GREEN,"Вы купили номер в отеле за 1 500 $"); SendClientMessage(playerid,COLOR_ORANGE,"На счету Вашего номера в отеле: 1 000 $"); SendClientMessage(playerid,COLOR_ORANGE,"За час снимается по 40 $"); Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
#Pawno 306 Опубликовано 16 декабря, 2016 Сохранение само есть? если да покажи. Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Grahc 5 Опубликовано 16 декабря, 2016 (изменено) , SaveAccount(playerid) { strdel(fordiag[playerid], 0, 3000); if(Account[playerid][Health] < 0) Account[playerid][Health] = 10; format(PlayerInfo[playerid][mymessage],144,"UPDATE "accounts" SET "); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); mysql_escape_string(Account[playerid][Password], escape[playerid]); format(PlayerInfo[playerid][mymessage],144,"pss='%s',",escape[playerid]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); mysql_escape_string(Account[playerid][Mail], escape[playerid]); format(PlayerInfo[playerid][mymessage],144,"ml='%s',",escape[playerid]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"pml='%i',",Account[playerid][PodEm]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"chck='%i',",Account[playerid][Check]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"lip='%s',",Account[playerid][LastIP]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"sk='%i',",Account[playerid][Skin]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"rsk='%i',",Account[playerid][RabSkin]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"al='%i',",Account[playerid][AdminLVL]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Job='%i',",Account[playerid][Job]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Frac='%i',",Account[playerid][Frac]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Rank='%i',",Account[playerid][Rank]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Dom='%i',",Account[playerid][Dom]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"SoDom='%i',",Account[playerid][SoDom]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Bizz='%i',",Account[playerid][Bizz]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"SBizz='%i',",Account[playerid][SBizz]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"cca='%i',",Account[playerid][Money]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Pol='%i',",Account[playerid][Pol]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"pds='%i',",Account[playerid][Pdstars]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"jld='%i',",Account[playerid][Jailed]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Bank='%i',",Account[playerid][Bank]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"pdy='%i',",Account[playerid][Payday]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"HR='%i',",Account[playerid]<span class="bbc_hr"> </span>); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"HRR='%i',",Account[playerid][HRR]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Health='%f',",Account[playerid][Health]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"gli='%i',",Account[playerid][GruzLic]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"bli='%i',",Account[playerid][BusLic]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"mli='%i',",Account[playerid][MotoLic]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"cli='%i',",Account[playerid][CarLic]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"zak='%i',",Account[playerid][Rukzak]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"tno='%i',",Account[playerid][Tnomer]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"WB='%s',",Account[playerid][WB]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Reason='%s',",Account[playerid][Reason]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"BanDay='%i',",Account[playerid][BanDay]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Muted='%i',",Account[playerid][Muted]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Sig='%i',",Account[playerid][Sig]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Otmq='%i',",Account[playerid][Otmq]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Mats='%i',",Account[playerid][Mats]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Drugs='%i',",Account[playerid][Drugs]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Zavis='%i',",Account[playerid][Zavis]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"Mesto='%i',",Account[playerid][Mesto]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"gs0='%i',",Account[playerid][GunSlot][0]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"gs1='%i',",Account[playerid][GunSlot][1]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"gs2='%i',",Account[playerid][GunSlot][2]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"gs3='%i',",Account[playerid][GunSlot][3]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"gs4='%i',",Account[playerid][GunSlot][4]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"gs5='%i',",Account[playerid][GunSlot][5]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"gs6='%i',",Account[playerid][GunSlot][6]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"gs7='%i',",Account[playerid][GunSlot][7]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"ga0='%i',",Account[playerid][GunAmmo][0]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"ga1='%i',",Account[playerid][GunAmmo][1]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"ga2='%i',",Account[playerid][GunAmmo][2]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"ga3='%i',",Account[playerid][GunAmmo][3]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"ga4='%i',",Account[playerid][GunAmmo][4]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"ga5='%i',",Account[playerid][GunAmmo][5]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"ga6='%i',",Account[playerid][GunAmmo][6]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"ga7='%i',",Account[playerid][GunAmmo][7]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"dask='%i',",Account[playerid][DalnoSkill]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"di1='%i',",Account[playerid][Diploms][0]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"di2='%i',",Account[playerid][Diploms][1]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"di3='%i',",Account[playerid][Diploms][2]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"di4='%i',",Account[playerid][Diploms][3]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"di5='%i',",Account[playerid][Diploms][4]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"nrza='%i',",Account[playerid][NrZala]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"stud='%i',",Account[playerid][Student]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"war='%i',",Account[playerid][Warns]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"wartime='%i',",Account[playerid][TimeWarn]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"sdpist='%i',",Account[playerid][SDPistol]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"deagl='%i',",Account[playerid][Deagle]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"mp5='%i',",Account[playerid][Mp5]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"shotg='%i',",Account[playerid][Shotgun]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"ak47='%i',",Account[playerid][Ak47]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"m4a='%i',",Account[playerid][M4a1]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"snip='%i',",Account[playerid][Sniper]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"tir='%i',",Account[playerid][Kachalsa]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"qtr='%i',",Account[playerid][QuestTree]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"q1lvl='%i',",Account[playerid][Q1Lvl]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"q2lvl='%i',",Account[playerid][Q2Lvl]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"q3lvl='%i',",Account[playerid][Q3Lvl]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"sum='%i',",Account[playerid][Donate]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"ohh='%i',",Account[playerid][OnlineHours]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"pcode='%i',",Account[playerid][PCode]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"spwn='%i',",Account[playerid][spawning]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"bday='%i',",Account[playerid][beforeday]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"nday='%i',",Account[playerid][nowday]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"nh='%i',",Account[playerid][nowhour]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144,"noh='%i'",Account[playerid][nowonlinehour]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); format(PlayerInfo[playerid][mymessage],144," WHERE nc='%s'",PlayerInfo[playerid][Nickname]); strcat(fordiag[playerid],PlayerInfo[playerid][mymessage]); Account[playerid][Data] = mysql_query(server, fordiag[playerid]); cache_delete(Account[playerid][Data]); strdel(fordiag[playerid], 0, 3000); mysql_format(server, fordiag[playerid],3000, "UPDATE "vehicles" SET vModel='%i',vLocked='%i',vColor1='%i',vColor2='%i',vCost='%i',vFuel='%f',vMilleage='%f',vAptek='%i',vProc='%i',vPokraska='%i',vSpoiler='%i',vJubka='%i',vJubka2='%i',vTruba='%i',vKrisha='%i',vBamper1='%i',vBamper2='%i',vTop='%i',vWheels='%i',vNitro='%i',vGidra='%i',vRadio='%i',vRURL='%e',vBag='%i',bs0='%i',bs1='%i',bs2='%i',bs3='%i',bs4='%i',ba0='%i',ba1='%i',ba2='%i',ba3='%i',ba4='%i' WHERE vOwner='%e'", HCar[playerid][vModel], HCar[playerid][vLocked], HCar[playerid][vColor1], HCar[playerid][vColor2], HCar[playerid][vCost], HCar[playerid][vFuel], HCar[playerid][vMilleage], HCar[playerid][vAptek], HCar[playerid][vProc], HCar[playerid][vPokraska], HCar[playerid][vSpoiler], HCar[playerid][vJubka], HCar[playerid][vJubka2], HCar[playerid][vTruba], HCar[playerid][vKrisha], HCar[playerid][vBamper1], HCar[playerid][vBamper2], HCar[playerid][vTop], HCar[playerid][vWheels], HCar[playerid][vNitro], HCar[playerid][vGidra], HCar[playerid][vRadio], HCar[playerid][vRURL], HCar[playerid][vBag], HCar[playerid][vBagSlot][0], HCar[playerid][vBagSlot][1], HCar[playerid][vBagSlot][2], HCar[playerid][vBagSlot][3], HCar[playerid][vBagSlot][4], HCar[playerid][vBagAmmo][0], HCar[playerid][vBagAmmo][1], HCar[playerid][vBagAmmo][2], HCar[playerid][vBagAmmo][3], HCar[playerid][vBagAmmo][4], Account[playerid][Nick]); Account[playerid][Data] = mysql_query(server, fordiag[playerid]); cache_delete(Account[playerid][Data]); strdel(fordiag[playerid], 0, 3000); return 1; } Изменено 16 декабря, 2016 пользователем Grahc Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты