Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define BIJELA "{FFFFFF}"
- #define SVJETLO_PLAVA "{00C0FF}"
- #define ZELENA "{6EF83C}"
- #define CRVENA "{F81414}"
- // ONGAMEMODEINIT
- Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1514.7094,-1170.0706,24.0781,15,0);
- AddStaticPickup(1239,1,1514.7094,-1170.0706,24.0781,-1);
- Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1211.3483,-1294.0812,13.5460,15,0);
- AddStaticPickup(1239,1,1211.3483,-1294.0812,13.5460,-1);
- Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1693.9229,-1873.2701,13.5433,15,0);
- AddStaticPickup(1239,1,1693.9229,-1873.2701,13.5433,-1);
- Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1585.9122,-2298.0071,13.5396,15,0);
- AddStaticPickup(1239,1,1585.9122,-2298.0071,13.5396,-1);
- Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1523.6334,-1717.7678,13.5469,15,0);
- AddStaticPickup(1239,1,1523.6334,-1717.7678,13.5469,-1);
- Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1150.7058,-929.0897,42.8324,15,0);
- AddStaticPickup(1239,1,1150.7058,-929.0897,42.8324,-1);
- Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1693.9229,-1873.2701,13.5433,15,0);
- AddStaticPickup(1239,1,1693.9229,-1873.2701,13.5433,-1);
- Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1468.5887,-1042.8698,23.4549,15,0);
- AddStaticPickup(1239,1,1468.5887,-1042.8698,23.4549,-1);
- Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,2163.5742,-1112.4379,25.0856,15,0);
- AddStaticPickup(1239,1,2163.5742,-1112.4379,25.0856,-1);
- // 8 KIOSKA
- CreateDynamicObject(1571, 1468.3203125, -1045.326171875, 24, 0, 0, 179.99450683594);
- CreateDynamicObject(1570, 1509.4069824219, -1172.248046875, 24.409250259399, 0, 0, 180);
- CreateDynamicObject(955, 1517.716796875, -1171.8753662109, 23.378124237061, 0, 0, 180);
- CreateDynamicObject(1533, 1466.2846679688, -1044.8905029297, 22.828125, 0, 0, 270);
- CreateDynamicObject(1533, 1466.3171386719, -1046.4632568359, 22.828125, 0, 0, 89.25);
- CreateDynamicObject(1981, 1466.9229736328, -1046.3980712891, 22.828125, 0, 0, 180);
- CreateDynamicObject(1981, 1467.9019775391, -1046.4058837891, 22.828125, 0, 0, 179.99450683594);
- CreateDynamicObject(1981, 1468.8773193359, -1046.4100341797, 22.828125, 0, 0, 179.99450683594);
- CreateDynamicObject(1981, 1516.0887451172, -1173.3592529297, 23.078125, 0, 0, 179.99450683594);
- CreateDynamicObject(1984, 1467.2470703125, -1044.767578125, 22.828125, 0, 0, 0);
- CreateDynamicObject(1356, 1463.1632080078, -1045.2580566406, 23.839370727539, 337.001953125, 0, 0);
- CreateDynamicObject(1356, 1462.0357666016, -1045.2010498047, 23.839370727539, 337.00012207031, 0, 0);
- CreateDynamicObject(1571, 1515.0174560547, -1172.251953125, 24.258941650391, 0, 0, 179.99450683594);
- CreateDynamicObject(955, 1471.044921875, -1044.689453125, 23.22812461853, 0, 0, 179.99450683594);
- CreateDynamicObject(1981, 1515.1079101563, -1173.3630371094, 23.078125, 0, 0, 179.99450683594);
- CreateDynamicObject(1981, 1514.126953125, -1173.3662109375, 23.078125, 0, 0, 179.99450683594);
- CreateDynamicObject(1981, 1513.5751953125, -1173.3751220703, 23.078125, 0, 0, 179.99450683594);
- CreateDynamicObject(955, 1471.044921875, -1044.689453125, 23.22812461853, 0, 0, 179.99450683594);
- CreateDynamicObject(1570, 1462.1142578125, -1045.4794921875, 24.159250259399, 0, 0, 179.99450683594);
- CreateDynamicObject(1356, 1510.3294677734, -1171.9111328125, 24.026641845703, 337.00012207031, 0, 0);
- CreateDynamicObject(1356, 1509.265625, -1171.884765625, 24.012317657471, 337.00012207031, 0, 0);
- CreateDynamicObject(1533, 1512.9910888672, -1171.8447265625, 23.078125, 0, 0, 270);
- CreateDynamicObject(1533, 1513.1044921875, -1173.3472900391, 23.078125, 0, 0, 90);
- CreateDynamicObject(1984, 1514.0222167969, -1171.7028808594, 23.078125, 0, 0, 0);
- CreateDynamicObject(1571, 1146.8364257813, -929.68994140625, 43.381008148193, 0, 0, 89.994506835938);
- CreateDynamicObject(1570, 1146.4875488281, -923.43737792969, 43.483295440674, 0, 0, 89.994506835938);
- CreateDynamicObject(1356, 1146.8952636719, -924.52557373047, 43.062164306641, 337.00012207031, 0, 270);
- CreateDynamicObject(1356, 1146.9067382813, -923.46179199219, 43.055995941162, 337.00012207031, 0, 270);
- CreateDynamicObject(955, 1147.5620117188, -932.11376953125, 42.391181945801, 0, 0, 89.994506835938);
- CreateDynamicObject(1533, 1147.2408447266, -927.64654541016, 42.184326171875, 0, 0, 180);
- CreateDynamicObject(1533, 1145.7781982422, -927.81573486328, 42.184326171875, 0, 0, 359.99450683594);
- CreateDynamicObject(1981, 1145.6768798828, -928.29205322266, 42.203125, 0, 0, 89.994506835938);
- CreateDynamicObject(1981, 1145.6680908203, -929.24401855469, 42.203125, 0, 0, 89.994506835938);
- CreateDynamicObject(1981, 1145.6654052734, -930.17095947266, 42.203125, 0, 0, 89.994506835938);
- CreateDynamicObject(1981, 1145.6639404297, -930.68634033203, 42.203125, 0, 0, 89.994506835938);
- CreateDynamicObject(1984, 1147.3947753906, -928.47650146484, 42.203125, 0, 0, 270);
- CreateDynamicObject(1571, 1693.7998046875, -1876.0087890625, 13.733626365662, 0, 0, 179.99450683594);
- CreateDynamicObject(1571, 1589.126953125, -2298.662109375, 13.724383354187, 0, 0, 269.98901367188);
- CreateDynamicObject(1571, 1213.6357421875, -1294.068359375, 13.736805915833, 0, 0, 269.98901367188);
- CreateDynamicObject(1571, 2164.2658691406, -1109.6489257813, 25.736030578613, 0, 0, 351.98901367188);
- CreateDynamicObject(1571, 1521.4453125, -1718.0234375, 13.727691650391, 0, 0, 89.901123046875);
- CreateDynamicObject(955, 1696.2534179688, -1875.3365478516, 12.85179901123, 0, 0, 180);
- CreateDynamicObject(955, 1522.1318359375, -1720.5078125, 12.796875, 0, 0, 90);
- CreateDynamicObject(955, 1588.4459228516, -2296.1579589844, 12.834250450134, 0, 0, 269.99450683594);
- CreateDynamicObject(955, 1213.3110351563, -1291.494140625, 12.844104766846, 0, 0, 269.98901367188);
- CreateDynamicObject(1570, 1212.6434326172, -1301.2108154297, 13.882349014282, 0, 0, 89.994506835938);
- CreateDynamicObject(955, 2161.5544433594, -1110.0541992188, 24.849815368652, 0, 0, 0);
- CreateDynamicObject(1570, 2172.236328125, -1111.2177734375, 25.836847305298, 0, 0, 349.99145507813);
- CreateDynamicObject(1570, 1521.83203125, -1710.833984375, 13.878001213074, 0, 0, 89.994506835938);
- CreateDynamicObject(1570, 1687.6436767578, -1875.6416015625, 13.866619110107, 0, 0, 179.99450683594);
- CreateDynamicObject(1533, 1521.9309082031, -1715.9841308594, 12.546875, 0, 0, 180.75);
- CreateDynamicObject(1533, 1691.7434082031, -1875.6878662109, 12.528702735901, 0, 0, 270.7470703125);
- CreateDynamicObject(1533, 1520.3447265625, -1716.1162109375, 12.546875, 0, 0, 0.7415771484375);
- CreateDynamicObject(1533, 1213.2788085938, -1296.06640625, 12.54775428772, 0, 0, 358.7470703125);
- CreateDynamicObject(1533, 1588.8056640625, -2300.697265625, 12.534555435181, 0, 0, 358.74206542969);
- CreateDynamicObject(1533, 2166.21875, -1110.3232421875, 24.397556304932, 0, 0, 80.491333007813);
- CreateDynamicObject(1984, 1588.6403808594, -2299.763671875, 12.535584449768, 0, 0, 90.5);
- CreateDynamicObject(1984, 2165.2880859375, -1110.33984375, 24.500991821289, 0, 0, 171.99645996094);
- CreateDynamicObject(1984, 1213.0703125, -1295.4052734375, 12.381391525269, 0, 0, 90.499877929688);
- CreateDynamicObject(1984, 1692.8979492188, -1875.4554443359, 12.537113189697, 0, 0, 0.4998779296875);
- CreateDynamicObject(1984, 1521.9731445313, -1716.9700927734, 12.546875, 0, 0, 270.49987792969);
- CreateDynamicObject(1981, 1520.2756347656, -1716.5832519531, 12.3828125, 0, 0, 89.994506835938);
- CreateDynamicObject(1981, 1520.2836914063, -1717.5255126953, 12.3828125, 0, 0, 89.994506835938);
- CreateDynamicObject(1981, 1520.2877197266, -1718.4284667969, 12.3828125, 0, 0, 89.994506835938);
- CreateDynamicObject(1981, 1520.2946777344, -1719.2088623047, 12.3828125, 0, 0, 89.994506835938);
- CreateDynamicObject(1981, 1694.8264160156, -1877.1359863281, 12.54524230957, 0, 0, 179.99450683594);
- CreateDynamicObject(1981, 1693.9222412109, -1877.1379394531, 12.54524230957, 0, 0, 179.99450683594);
- CreateDynamicObject(1981, 1693.0607910156, -1877.1369628906, 12.54524230957, 0, 0, 179.99450683594);
- CreateDynamicObject(1981, 1692.3558349609, -1877.1419677734, 12.54524230957, 0, 0, 179.99450683594);
- CreateDynamicObject(1981, 1590.2489013672, -2297.5295410156, 12.539621353149, 0, 0, 269.99450683594);
- CreateDynamicObject(1981, 1590.2464599609, -2298.388671875, 12.539621353149, 0, 0, 269.98901367188);
- CreateDynamicObject(1981, 1590.248046875, -2298.9467773438, 12.539621353149, 0, 0, 269.98901367188);
- CreateDynamicObject(1981, 1590.2379150391, -2300.1037597656, 12.539621353149, 0, 0, 269.98901367188);
- CreateDynamicObject(1981, 2163.2412109375, -1108.4040527344, 24.50722694397, 0, 0, 350.48901367188);
- CreateDynamicObject(1981, 1590.2395019531, -2299.5739746094, 12.539621353149, 0, 0, 269.98901367188);
- CreateDynamicObject(1981, 2164.2143554688, -1108.5603027344, 24.50722694397, 0, 0, 350.48583984375);
- CreateDynamicObject(1981, 2165.1899414063, -1108.7214355469, 24.50722694397, 0, 0, 350.48583984375);
- CreateDynamicObject(1981, 2165.8852539063, -1108.83984375, 24.50722694397, 0, 0, 350.48583984375);
- /// ondialogresponse
- new playercash = GetPlayerMoney(playerid);
- if(dialogid == 1231)
- {
- switch(listitem)
- {
- case 0: // UPALJAC
- {
- if(PlayerInfo[playerid][pUpaljac] == 1) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Vec imate jedan upaljac!");
- if(playercash < 10 ) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Nemate dovoljno novca!");
- PlayerInfo[playerid][pUpaljac] = 1;
- SendClientMessage(playerid,-1,""CRVENA"KIOSK: "ZELENA"Kupili ste upaljac sada mozete pusiti cigare!");
- GivePlayerMoney(playerid, -10);
- }
- case 1: // CIGARE
- {
- if(playercash < 20 ) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Nemate dovoljno novca!");
- PlayerInfo[playerid][pCigare] += 20;
- SendClientMessage(playerid,-1,""CRVENA"KIOSK: "ZELENA"Kupili ste kutiju cigareta u kojoj ima 20 komada! (/smoke)");
- GivePlayerMoney(playerid, -20);
- }
- case 2: // KONDOMI
- {
- if(playercash < 10 ) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Nemate dovoljno novca!");
- PlayerInfo[playerid][pKondom] += 3;
- SendClientMessage(playerid,-1,""CRVENA"KIOSK: "ZELENA"Kupili ste kondome sada mozete imati siguran seks /safesex!");
- GivePlayerMoney(playerid, -10);
- }
- case 3: // GRICKALICE
- {
- if(playercash < 15 ) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Nemate dovoljno novca!");
- new Float:helti;
- GetPlayerHealth(playerid,helti);
- SetPlayerHealth(playerid, helti + 30);
- SendClientMessage(playerid,-1,""CRVENA"KIOSK: "ZELENA"Kupili ste grickalice!");
- GivePlayerMoney(playerid, -15);
- }
- case 4: // SOK
- {
- new Float:health;
- new daj = GetPlayerHealth(playerid,health);
- if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, 0xFFFFFF, ""CRVENA"ERROR: "ZELENA"Nemate dovoljno novca!");
- GivePlayerMoney(playerid, -10);
- SendClientMessage(playerid,-1,""CRVENA"KIOSK: "ZELENA"Kupili ste sok!");
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- new Float:helti;
- GetPlayerHealth(playerid,helti);
- SetPlayerHealth(playerid, helti + 15);
- }
- case 5: // BON OD 50
- {
- if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFFFFFF, ""CRVENA"ERROR: "ZELENA"Nemate dovoljno novca!");
- GivePlayerMoney(playerid, -50);
- SendClientMessage(playerid,-1,""CRVENA"KIOSK: "ZELENA"Kupili ste bon od 50$!");
- PlayerInfo[playerid][pBon] += 50;
- }
- case 6: // BON OD 100
- {
- if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFFFFFF, ""CRVENA"ERROR: "ZELENA"Nemate dovoljno novca!");
- GivePlayerMoney(playerid, -100);
- SendClientMessage(playerid,-1,""CRVENA"KIOSK: "ZELENA"Kupili ste bon od 100$!");
- PlayerInfo[playerid][pBon] += 100;
- }
- }
- return 1;
- }
- CMD:kiosk(playerid,params[])
- {
- if(UBliziniKioska(playerid) && IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Niste u blizini kioska ili ste u autu.");
- ShowPlayerDialog(playerid, 1231, DIALOG_STYLE_LIST, "Kiosk", "Upaljac(10$)\nCigarte(20$)\nKondomi(10$)\nGrickalice(15$)\nSok(10$)\nBon od 50$(50$)\nBon od 100$(100$)", "Kupi", "Odustani");
- return true;
- }
- CMD:smoke(playerid, params[])
- {
- if(PlayerInfo[playerid][pUpaljac] < 1) return SendClientMessage(playerid, -1, ""CRVENA"ERROR: "ZELENA"Nemate upaljac!");
- if(PlayerInfo[playerid][pCigare] < 1) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Nemate vise cigareta");
- if(PlayerInfo[playerid][pPusenje] == 1) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Vec pusite cigaretu!");
- PlayerInfo[playerid][pCigare] -= 1;
- PlayerInfo[playerid][pPusenje] = 1;
- SetPlayerSpecialAction(playerid,21);
- SendClientMessage(playerid, -1, ""ZELENA"Zapalili ste cigaretu ! "ZUTA"| Bacite je sa /ugasi");
- return true;
- }
- CMD:ugasi(playerid, params[])
- {
- if(PlayerInfo[playerid][pPusenje] == 1)
- {
- PlayerInfo[playerid][pPusenje] = 0;
- SendClientMessage(playerid, -1, ""CRVENA"Bacili ste cigaretu!");
- SetPlayerSpecialAction(playerid,0);
- }
- return 1;
- }
- // i na kraju callback
- forward UBliziniKioska(playerid);
- public UBliziniKioska(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2,1523.6334,-1717.7678,13.5469) || IsPlayerInRangeOfPoint(playerid, 2,1585.9122,-2298.0071,13.5396))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 2,1150.7058,-929.0897,42.8324) || IsPlayerInRangeOfPoint(playerid, 2,1211.2782,-1293.8723,13.5458))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 2,1693.9229,-1873.2701,13.5433) || IsPlayerInRangeOfPoint(playerid, 2,1468.5887,-1042.8698,23.4549))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 2,2163.5742,-1112.4379,25.0856) || IsPlayerInRangeOfPoint(playerid, 2,1514.7094,-1170.0706,24.0781))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 2,1211.3483,-1294.0812,13.5460))
- {
- return 1;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment