Hammer3394 | Дата: Воскресенье, 22.12.2013, 12:38 | Сообщение # 1 |
Рядовой
Группа: Администраторы
Сообщений: 13
Репутация: 2013
Статус: Offline
| Здравствуйте, уважаемые пользователи Pawno-School Выкладываю мануал салона сотовой связи:
В переменую добавим: Код: Код new mts;new mts2; new bmts; В public OnPlayerPickUpPickup(playerid, pickupid) добавим: Код: //=======ìòñ====== else if(pickupid == mts) { SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid, 0); SetPlayerPos(playerid,1409.27,-1668.16,18.62); SetPlayerFacingAngle(playerid, 270.0); } else if(pickupid == mts2) { SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid, 0); SetPlayerPos(playerid,1419.44,-1665.36,13.54); SetPlayerFacingAngle(playerid, 252.0021); } else if(pickupid == bmts) { format(string,sizeof(string), "{FFFFFF}Íà ñ÷åòó òåëåôîíà: {33CCFF}$%d\n{FFFFFF}Ââåäèòå ñóììó",PlayerInfo[playerid][pMobile]); ShowPlayerDialog(playerid,9522,DIALOG_STYLE_INPUT,"Áàíêîìàò",string,"Äàëåå","Îòìåíà"); } В public OnGameModeInit() добавим: Код: Код bmts = CreatePickup(19134,23,1406.88,-1658.97,18.62); Create3DTextLabel("Ïîïîëíåíèå ìîáèëüíîãî ñ÷åòà",0x87FF00FF,1406.88,-1658.97,18.62,10.0,0,1); mts = CreatePickup(1318,23,1416.16,-1665.47,13.55); Create3DTextLabel("Ñàëîí\n ñîòîâîé ñâÿçè",0x00FDFDFF,1416.16,-1665.47,13.55,30.0,0,1); mts2 = CreatePickup(1318,23,1409.36,-1670.98,18.63); К 3d text добавим: Код: Код Create3DTextLabel("Ïîêóïêà òåëåôîíà\n/buyphone",0x87FF00FF,1404.67,-1663.92,18.63,20.0,0,1); Create3DTextLabel("/tariph\nÂûáîð òàðèôíîãî ïëàíà",0x87FF00FF,1404.66,-1660.79,18.62,20.0,0,1); К public OnPlayerCommandText(playerid, cmdtext[]) добавим: Код: Код if(strcmp(cmd, "/tariph", true) == 0){ if (PlayerInfo [playerid][pTeleph]== 0) return SendClientMessage(playerid, COLOR_GREY,"Êóïèòå ñåáå òåëåôîí, ó êàññû ñ ëåâà!"); if(PlayerToPoint(5,playerid,1404.66,-1660.79,18.62)){ SPD(playerid,7090,DIALOG_STYLE_LIST,"{FFFFFF}Âûáîð òàðèôíîãî ïëàíà","SMSêà\nRED ENERGY\nSMART\nMAXI","Âûáðàòü","Çàêðûòü");}} if(strcmp(cmd, "/buyphone", true) == 0){ if(PlayerToPoint(5,playerid,1404.67,-1663.92,18.63)){ new string3[255]; if(PlayerInfo [playerid][pTeleph]>= 1) return SendClientMessage(playerid,COLOR_REPORT,"Ó âàñ óæå åñòü òåëåôîí!"); format(string3,sizeof(string3),"{E6E6E6}Íà âàøåì ñ÷åòó {FAFAFA}%d {E6E6E6}ðóá\n\n\t{E6E6E6}Âûáåðèòå ìîäåëü âàøåãî íîâîãî òåëåôîíà\t\n\n{E6E6E6}1.Alcatel\t1000$\n{E6E6E6}2.Nokia Supreme\t35000$\n{E6E6E6}3.Samsung Galaxy S4\t45000$\n{E6E6E6}4.Iphone 5\t55000$\n{E6E6E6}5.Vertu Diamond\t65000$",PlayerInfo[playerid][pCash]); ShowPlayerDialog(playerid,7712,DIALOG_STYLE_INPUT,"{1e90ff}Àçáóêà Ñâÿçè",string3,"Êóïèòü","Çàêðûòü"); return true;}} К dialoga'm добавим: Код: Код case 7712:{ if(response){ if(!strcmp(inputtext,"1",true)){ PlayerInfo [playerid][pTeleph]= 1; PlayerInfo [playerid][pCash]-= 1000; SendClientMessage(playerid,COLOR_REPORT,"Âû êóïèëè Alcatel");} if(!strcmp(inputtext,"2",true)){ PlayerInfo [playerid][pTeleph]= 2; PlayerInfo [playerid][pCash]-= 35000; SendClientMessage(playerid,COLOR_REPORT,"Âû êóïèëè Nokia Supreme");} if(!strcmp(inputtext,"3",true)){ PlayerInfo [playerid][pTeleph]= 3; PlayerInfo [playerid][pCash]-= 45000; SendClientMessage(playerid,COLOR_REPORT,"Âû êóïèëè Samsung Galaxy S4");} if(!strcmp(inputtext,"4",true)){ PlayerInfo [playerid][pTeleph]= 4; PlayerInfo [playerid][pCash]-= 55000; SendClientMessage(playerid,COLOR_REPORT,"Âû êóïèëè Iphone 5");} if(!strcmp(inputtext,"5",true)){ PlayerInfo [playerid][pTeleph]= 5; PlayerInfo [playerid][pCash]-= 65000; SendClientMessage(playerid,COLOR_REPORT,"Âû êóïèëè Vertu Diamond");}}} case 7090:{ if(response){ switch(listitem){ case 0:{ PlayerInfo [playerid][pTariph]= 1; SendClientMessage(playerid,COLOR_REPORT,"Âû ïîäêëþ÷èëè òàðèô SMSêà"); PlayerInfo [playerid][pCash]-= 100; } case 1:{ PlayerInfo [playerid][pTariph]= 2; SendClientMessage(playerid,COLOR_REPORT,"Âû ïîäêëþ÷èëè òàðèô RED ENERGY"); PlayerInfo [playerid][pCash]-= 200; } case 2:{ PlayerInfo [playerid][pTariph]= 3; SendClientMessage(playerid,COLOR_REPORT,"Âû ïîäêëþ÷èëè òàðèô SMART"); PlayerInfo [playerid][pCash]-= 300; } case 3:{ PlayerInfo [playerid][pTariph]= 4; SendClientMessage(playerid,COLOR_REPORT,"Âû ïîäêëþ÷èëè òàðèô MAXI"); PlayerInfo [playerid][pCash]-= 400; }}}} В enum pInfo добавим: Код: В public OnPlayerConnect(playerid) добавим: Код: Код PlayerInfo [playerid][pTeleph]= 0; К public OnPlayerRegister(playerid, password[]) добавим: Код: Код ini_setInteger(File,"Telephon",PlayerInfo[playerid][pTeleph];); К public OnPlayerSave(playerid) добавим: Код: Код ini_setInteger(File,"Telephon",PlayerInfo[playerid][pTeleph];); К public OnPlayerUpdateRL(playerid) добавим: Код: Код ini_setInteger(File,"Telephon",PlayerInfo[playerid][pTeleph];); К public OnPlayerLogin(playerid,password[]) добавим: Код: Код ini_getInteger(File,"Telephon",PlayerInfo[playerid][pTeleph];); К #define добавим: Код: Код #define COLOR_REPORT 0xFFF700FF К обьектам добавим: Код: Код //==========================MTC======================================= CreateDynamicObject(12844, 1406.30872, -1664.73669, 19.59500, 0.00000, 0.00000, 91.00000); CreateDynamicObject(1557, 1407.88782, -1671.52856, 17.55500, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1557, 1410.90759, -1671.52856, 17.55500, 0.00000, 0.00000, 180.00000); CreateDynamicObject(1649, 1410.84717, -1664.36658, 18.89720, 0.00000, 0.00000, 271.00000); CreateDynamicObject(1649, 1410.93103, -1668.55139, 18.89720, 0.00000, 0.00000, 271.00000); CreateDynamicObject(1649, 1410.94763, -1669.04260, 18.89720, 0.00000, 0.00000, 271.00000); CreateDynamicObject(1557, 1410.81458, -1661.49646, 17.46070, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1557, 1410.80725, -1658.47803, 17.46070, 0.00000, 0.00000, 270.00000); CreateDynamicObject(2942, 1408.99524, -1658.21704, 18.24370, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2942, 1406.83752, -1658.29700, 18.24370, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2946, 1415.73926, -1664.63733, 12.53760, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2948, 1401.63000, -1669.97644, 17.44880, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2008, 1403.81860, -1663.39282, 17.60920, 0.00000, 0.00000, 270.00000); CreateDynamicObject(2198, 1403.81860, -1666.57690, 17.63350, 0.00000, 0.00000, 270.00000); CreateDynamicObject(2165, 1403.81860, -1660.22363, 17.62350, 0.00000, 0.00000, 270.00000); CreateDynamicObject(1806, 1402.96594, -1660.76196, 17.62690, 0.00000, 0.00000, 229.00000); CreateDynamicObject(1806, 1402.98425, -1664.33496, 17.62690, 0.00000, 0.00000, 265.00000); CreateDynamicObject(1806, 1402.95874, -1667.34412, 17.62690, 0.00000, 0.00000, 309.00000); CreateDynamicObject(2162, 1401.69519, -1659.26367, 17.60350, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2167, 1401.64856, -1660.30908, 17.60350, 0.00000, 0.00000, 90.00000); By Pawno-School
|
|
| |