Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #define FILTERSCRIPT
- #include <a_samp>
- #include <foreach>
- #include <zcmd>
- #if !defined isnull
- #define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
- #endif
- #define DONOVAN_HESLO "1358"
- #define DIALOG_DONOVAN_PASS 900
- #define SOUND_RADIUS 15.0
- new DonovanObj[50], bool:DonovanDoor;
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- DonovanDoor = false;
- //DONOVAN
- DonovanObj[0] = CreateObject(1726, 1817.97644, -1299.59570, 119.24284, 0.00000, 0.00000, -139.56000);
- DonovanObj[1] = CreateObject(2370, 1815.87537, -1299.09790, 119.13321, 0.00000, 0.00000, 40.19999);
- DonovanObj[2] = CreateObject(1727, 1814.37537, -1300.51196, 119.25663, 0.00000, 0.00000, 130.13995);
- DonovanObj[3] = CreateObject(1727, 1817.22876, -1296.76917, 119.25660, 0.00000, 0.00000, -49.47998);
- DonovanObj[4] = CreateObject(19362, 1793.86792, -1296.40173, 120.98759, 0.00000, 0.00000, -36.42000);
- DonovanObj[5] = CreateObject(19362, 1793.87585, -1296.40564, 122.97260, 0.00000, 0.00000, -36.42000);
- DonovanObj[6] = CreateObject(19391, 1791.96375, -1298.98193, 120.97546, 0.00000, 0.00000, -36.42000);
- DonovanObj[7] = CreateObject(19435, 1792.05298, -1298.87402, 122.85730, 90.00000, 0.00000, -36.36000);
- DonovanObj[8] = CreateObject(19435, 1792.05103, -1298.87195, 123.91940, 90.00000, 0.00000, -36.42000);
- DonovanObj[9] = CreateObject(19435, 1790.54712, -1300.90063, 120.94728, 0.00000, 0.00000, -36.42000);
- DonovanObj[10] = CreateObject(19435, 1790.54907, -1300.90259, 122.57080, 0.00000, 0.00000, -36.42000);
- DonovanObj[11] = CreateObject(19435, 1790.47705, -1301.00061, 120.94730, 0.00000, 0.00000, -36.42000);
- DonovanObj[12] = CreateObject(19435, 1790.47913, -1301.00061, 122.55170, 0.00000, 0.00000, -36.42000);
- DonovanObj[13] = CreateObject(19999, 1823.29028, -1282.60022, 119.26730, 0.00000, 0.00000, -90.00000);
- DonovanObj[14] = CreateObject(11691, 1821.37988, -1281.63562, 119.26630, 0.00000, 0.00000, -90.00000);
- DonovanObj[15] = CreateObject(19999, 1823.29028, -1280.96814, 119.26730, 0.00000, 0.00000, -87.33100);
- DonovanObj[16] = CreateObject(19999, 1823.29028, -1279.33618, 119.26730, 0.00000, 0.00000, -91.71600);
- DonovanObj[17] = CreateObject(11691, 1821.37988, -1278.64355, 119.26630, 0.00000, 0.00000, -90.00000);
- DonovanObj[18] = CreateObject(19999, 1823.29028, -1277.77222, 119.26730, 0.00000, 0.00000, -75.01100);
- DonovanObj[19] = CreateObject(19999, 1821.36401, -1275.99939, 119.26730, 0.00000, 0.00000, 3.00000);
- DonovanObj[20] = CreateObject(19999, 1819.56677, -1277.80847, 119.26730, 0.00000, 0.00000, 90.00000);
- DonovanObj[21] = CreateObject(19999, 1819.56677, -1279.23645, 119.26730, 0.00000, 0.00000, 77.86770);
- DonovanObj[22] = CreateObject(19999, 1819.56677, -1280.93652, 119.26730, 0.00000, 0.00000, 100.82070);
- DonovanObj[23] = CreateObject(19999, 1819.56677, -1282.50049, 119.26730, 0.00000, 0.00000, 94.91850);
- DonovanObj[24] = CreateObject(19893, 1821.35388, -1277.61548, 120.04390, 0.00000, 0.00000, -180.18010);
- DonovanObj[25] = CreateObject(11724, 1816.66479, -1273.01135, 119.78560, 0.00000, 0.00000, 30.00000);
- DonovanObj[26] = CreateObject(11725, 1816.72559, -1273.10840, 119.67650, 0.00000, 0.00000, 30.00000);
- DonovanObj[27] = CreateObject(19173, 1816.52417, -1272.77795, 121.48611, 0.00000, 0.00000, 30.00000);
- DonovanObj[28] = CreateObject(1536, 1792.43005, -1298.35974, 119.26010, 0.00000, 0.00000, 233.52000); //DVERE
- DonovanObj[29] = CreateObject(2198, 1795.55432, -1298.30566, 119.26662, 0.00000, 0.00000, 163.86011);
- DonovanObj[30] = CreateObject(1811, 1795.27441, -1296.66895, 119.86260, 0.00000, 0.00000, 86.64001);
- DonovanObj[31] = CreateObject(2193, 1809.30188, -1299.98914, 119.26650, 0.00000, 0.00000, -90.15999);
- DonovanObj[32] = CreateObject(2172, 1806.90588, -1301.04138, 119.26790, 0.00000, 0.00000, 90.16000);
- DonovanObj[33] = CreateObject(1811, 1809.23682, -1301.10828, 119.84504, 0.00000, 0.00000, -130.49997);
- DonovanObj[34] = CreateObject(1811, 1807.63953, -1300.07422, 119.84504, 0.00000, 0.00000, 71.82000);
- DonovanObj[35] = CreateObject(2187, 1795.84460, -1297.13550, 119.26674, 0.00000, 0.00000, 166.08002);
- DonovanObj[36] = CreateObject(2773, 1792.49670, -1300.58582, 119.78265, 0.00000, 0.00000, -105.06004);
- DonovanObj[37] = CreateObject(2773, 1795.01392, -1301.19421, 119.78265, 0.00000, 0.00000, -105.06004);
- DonovanObj[38] = CreateObject(2773, 1797.78662, -1300.71289, 119.78265, 0.00000, 0.00000, -11.28003);
- DonovanObj[39] = CreateObject(2773, 1797.11267, -1299.04285, 119.78265, 0.00000, 0.00000, -103.92002);
- DonovanObj[40] = CreateObject(19362, 1782.86255, -1307.23230, 120.98759, 0.00000, 0.00000, -31.08001);
- DonovanObj[41] = CreateObject(19362, 1781.20557, -1309.97961, 120.98760, 0.00000, 0.00000, -31.08000);
- DonovanObj[42] = CreateObject(19362, 1781.20361, -1309.97754, 122.60740, 0.00000, 0.00000, -31.08000);
- DonovanObj[43] = CreateObject(19362, 1782.86047, -1307.22827, 122.80960, 0.00000, 0.00000, -31.08000);
- DonovanObj[44] = CreateObject(19305, 1791.36902, -1299.83423, 120.37894, 0.00000, 0.00000, 53.57999);
- DonovanObj[45] = CreateObject(19305, 1791.33472, -1299.79968, 120.37890, 0.00000, 0.00000, -126.19997);
- DonovanObj[46] = CreateObject(1727, 1781.19653, -1305.66919, 119.25660, 0.00000, 0.00000, 180.00000);
- DonovanObj[47] = CreateObject(2370, 1780.35046, -1303.99292, 119.13320, 0.00000, 0.00000, 0.00000);
- DonovanObj[48] = CreateObject(1726, 1782.47180, -1302.60022, 119.24280, 0.00000, 0.00000, -90.00000);
- DonovanObj[49] = CreateObject(1726, 1778.86182, -1304.61621, 119.24280, 0.00000, 0.00000, 90.00000);
- /////////
- return 1;
- }
- public OnFilterScriptExit()
- {
- for(new i=0; i < 51; i++)
- {
- DestroyObject(DonovanObj[i]);
- }
- return 1;
- }
- #endif
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys == KEY_SECONDARY_ATTACK)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3, 1792.5344, -1298.9337, 120.2656))
- {
- if(DonovanDoor == true)
- {
- print("DONOVANDOOR TRUE");
- SendClientMessageToAll(-1,"DONOVANDOOR TRUE");
- PlaySound(playerid, 21001, SOUND_RADIUS);
- ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 10.0, 0, 0, 0, 0, 0);
- MoveObject(DonovanObj[28], 1792.43005, -1298.35974, 119.26010, 2.00, 0.00000, 0.00000, 233.52000);
- DonovanDoor = false;
- } else {
- ShowPlayerDialog(playerid, DIALOG_DONOVAN_PASS, DIALOG_STYLE_INPUT, "Kódový zámek", "Tyto dveře jsou na kódový zámek, zadej kód:", "Potvrdit", "Zrušit");
- }
- }
- }
- return 1;
- }
- stock PlaySound(playerid, sound, Float:range)
- {
- new Float:pX, Float:pY, Float:pZ;
- GetPlayerPos(playerid, pX, pY, pZ);
- print("Stock PlaySound");
- SendClientMessageToAll(-1,"Stock PlaySound");
- foreach(new i : Player)
- {
- if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
- {
- if(IsPlayerInRangeOfPoint(i, range, pX, pY, pZ))
- {
- PlayerPlaySound(i, sound, pX, pY, pZ);
- }
- }
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_DONOVAN_PASS)
- {
- print("Nad PlaySound");
- SendClientMessageToAll(-1,"Nad PlaySound");
- PlaySound(playerid, 21001, SOUND_RADIUS);
- ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 10.0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid, 0x0797f7FF, "> Zadaný kód byl správný.");
- MoveObject(DonovanObj[28], 1792.43005, -1298.35974, 119.26010, 2.00, 0.00000, 0.00000, 338.93991);
- DonovanDoor = true;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement