Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===========================================//
- //======Admin Area scriptet by Michelle======//
- //===You may nothing change in this Script===//
- //Du darfst nichts ver�ndern in diesem Script//
- //==========================================//
- #include <a_samp>
- #define NAMELINES 20
- #define CLOSEGATEDELAY 6000
- #define GATESPEED 3
- #define COLOR_GATESYS 0xFF9900FF
- new biggate;
- new smallgate;
- new fileline[50];
- new filename[128];
- new master[NAMELINES][50];
- forward closegates(gatenumber);
- //----------------------------------------------------------------------------------------------------//
- IsPlayerMaster(plid)
- {
- new plname[50];
- GetPlayerName(plid, plname, sizeof(plname));
- new masterr;
- for(new i; i<NAMELINES; i++)
- {
- if(strlen(plname) > 0)
- {
- if(strcmp(plname, master[i], true) == 0)
- {
- masterr = 1;
- }
- }
- }
- return masterr;
- }
- public OnFilterScriptInit()
- {
- print("\n------------------------------------");
- print(" Admin Area by Michelle ");
- print("------------------------------------\n");
- //========================================gates========================================//
- smallgate = CreateObject(971, 2107.331299, 1383.021362, 12.352909, 0.0000, 0.0000, 0.0000);
- biggate = CreateObject(980, 2086.678467, 1433.240234, 12.445267, 0.0000, 0.0000, 90.0000);
- //=======================================objects=======================================//
- CreateObject(987, 2086.780762, 1450.963257, 9.820313, 0.0000, 0.0000, 270.0000);
- CreateObject(987, 2086.692383, 1427.284180, 9.820313, 0.0000, 0.0000, 270.0000);
- CreateObject(987, 2086.693848, 1415.296143, 9.820313, 0.0000, 0.0000, 270.0000);
- CreateObject(987, 2086.697754, 1403.308838, 9.820313, 0.0000, 0.0000, 270.0000);
- CreateObject(987, 2086.697754, 1397.286133, 9.820313, 0.0000, 0.0000, 270.0000);
- CreateObject(3550, 2089.094727, 1385.540649, 11.112338, 0.0000, 0.0000, 45.0000);
- CreateObject(1423, 2088.662842, 1384.622070, 10.531250, 0.0000, 0.0000, 315.0000);
- CreateObject(1282, 2086.631592, 1384.907227, 10.509129, 0.0000, 0.0000, 0.0000);
- CreateObject(1282, 2086.564941, 1383.782959, 10.509129, 0.0000, 0.0000, 0.0000);
- CreateObject(987, 2090.961670, 1383.264160, 9.820313, 0.0000, 0.0000, 0.0000);
- CreateObject(987, 2111.932373, 1383.190308, 9.820313, 0.0000, 0.0000, 0.0000);
- CreateObject(987, 2123.926758, 1383.203979, 9.820313, 0.0000, 0.0000, 0.0000);
- CreateObject(987, 2135.904297, 1383.207031, 9.820313, 0.0000, 0.0000, 0.0000);
- CreateObject(987, 2147.902832, 1383.219116, 9.820313, 0.0000, 0.0000, 0.0000);
- CreateObject(987, 2159.908936, 1383.197388, 9.820313, 0.0000, 0.0000, 0.0000);
- CreateObject(987, 2171.895020, 1383.203857, 9.820313, 0.0000, 0.0000, 0.0000);
- CreateObject(987, 2183.879883, 1383.216553, 9.820313, 0.0000, 0.0000, 0.0000);
- CreateObject(987, 2195.875732, 1383.216675, 9.820313, 0.0000, 0.0000, 0.0000);
- CreateObject(987, 2207.883545, 1383.221680, 9.820313, 0.0000, 0.0000, 0.0000);
- CreateObject(987, 2219.877441, 1383.204834, 9.820313, 0.0000, 0.0000, 0.0000);
- CreateObject(3550, 2234.314941, 1384.309326, 11.146424, 0.0000, 0.0000, 303.7500);
- CreateObject(987, 2238.221436, 1386.430298, 9.679672, 0.0000, 0.0000, 90.0000);
- CreateObject(1422, 2237.192383, 1386.413574, 11.405826, 0.0000, 88.5219, 0.0000);
- CreateObject(1423, 2236.387939, 1384.932861, 10.531250, 0.0000, 0.0000, 45.0000);
- CreateObject(1427, 2237.708496, 1384.189209, 10.367456, 0.0000, 0.0000, 90.0000);
- CreateObject(1427, 2237.805420, 1385.302124, 10.367456, 0.0000, 0.0000, 90.0000);
- CreateObject(987, 2238.240967, 1398.425781, 9.681561, 0.0000, 0.0000, 90.0000);
- CreateObject(987, 2238.244141, 1410.422363, 9.664052, 0.0000, 0.0000, 90.0000);
- CreateObject(987, 2238.522705, 1422.884766, 9.820313, 0.0000, 0.0000, 135.0000);
- CreateObject(987, 2230.060303, 1431.374634, 9.830930, 0.0000, 0.0000, 90.0000);
- CreateObject(987, 2198.700684, 1434.382813, 9.820313, 0.0000, 0.0000, 157.5000);
- CreateObject(987, 2187.612061, 1438.984253, 9.820313, 0.0000, 0.0000, 135.0000);
- CreateObject(987, 2179.123535, 1447.481567, 9.820313, 0.0000, 0.0000, 112.5001);
- CreateObject(987, 2153.647217, 1453.139893, 9.812516, 0.0000, 0.0000, 180.0000);
- CreateObject(987, 2141.671631, 1453.137573, 9.820313, 0.0000, 0.0000, 180.0000);
- CreateObject(987, 2129.705811, 1453.139648, 9.820313, 0.0000, 0.0000, 180.0000);
- CreateObject(620, 2091.080322, 1385.008545, 9.887470, 0.0000, 0.0000, 0.0000);
- CreateObject(620, 2236.612549, 1388.356445, 9.835648, 0.0000, 0.0000, 0.0000);
- CreateObject(620, 2233.239258, 1426.236938, 9.887470, 0.0000, 0.0000, 0.0000);
- CreateObject(640, 2095.895020, 1446.087036, 10.517346, 0.0000, 0.0000, 0.0000);
- CreateObject(2793, 2086.629883, 1438.309082, 15.599875, 0.0000, 0.0000, 90.0000);
- CreateObject(2794, 2111.286133, 1383.036377, 15.547868, 0.0000, 0.0000, 0.0000);
- CreateObject(3526, 2086.086426, 1442.799316, 9.888730, 0.0000, 0.0000, 0.0000);
- CreateObject(3526, 2085.997070, 1423.685913, 9.888730, 0.0000, 0.0000, 0.0000);
- CreateObject(14467, 2084.474854, 1446.907104, 12.554106, 0.0000, 0.0000, 270.0000);
- CreateObject(979, 2101.448730, 1423.962280, 10.660533, 0.0000, 0.0000, 0.0000);
- CreateObject(979, 2111.439697, 1424.043213, 10.660533, 0.0000, 0.0000, 0.0000);
- CreateObject(9241, 2196.161133, 1402.144165, 17.137541, 0.0000, 0.0000, 270.0000);
- CreateObject(5153, 2182.305908, 1430.078369, 10.843495, 0.0000, 356.5623, 270.0000);
- CreateObject(5153, 2182.302490, 1426.183838, 12.828473, 0.0000, 356.5623, 270.0000);
- CreateObject(5153, 2182.299805, 1422.476685, 14.732022, 0.0000, 356.5623, 270.0000);
- CreateObject(5153, 2182.296631, 1418.400635, 15.558593, 0.0000, 30.0803, 270.0000);
- CreateObject(978, 2154.625488, 1443.139404, 10.652737, 0.0000, 0.0000, 157.5000);
- CreateObject(978, 2162.411133, 1437.927368, 10.660533, 0.0000, 0.0000, 135.0000);
- CreateObject(978, 2167.934326, 1426.514893, 10.660533, 0.0000, 0.0000, 101.2500);
- CreateObject(978, 2169.021484, 1417.019653, 10.660533, 0.0000, 0.0000, 90.0000);
- CreateObject(978, 2145.244141, 1447.811646, 10.652738, 0.0000, 0.0000, 88.5133);
- CreateObject(628, 2193.915527, 1433.902344, 11.814221, 0.0000, 0.0000, 0.0000);
- CreateObject(639, 2174.258301, 1415.170166, 13.575472, 0.0000, 0.0000, 11.2500);
- CreateObject(647, 2168.152344, 1443.459839, 11.652228, 0.0000, 0.0000, 0.0000);
- CreateObject(640, 2157.327881, 1444.650879, 10.509552, 0.0000, 0.0000, 268.5938);
- CreateObject(971, 2089.861328, 1454.013428, 12.492661, 0.0000, 0.0000, 225.0000);
- CreateObject(2404, 2174.215820, 1410.749390, 11.312733, 0.0000, 0.0000, 270.0000);
- CreateObject(11665, 2161.348633, 1450.634521, 10.518976, 0.0000, 0.0000, 90.0000);
- CreateObject(978, 2124.995850, 1448.190430, 10.660533, 0.0000, 0.0000, 270.0000);
- CreateObject(1294, 2171.244385, 1450.517090, 14.338436, 0.0000, 359.2442, 48.5151);
- CreateObject(1294, 2158.723877, 1385.456665, 14.338436, 0.0000, 359.2442, 273.5151);
- CreateObject(1294, 2100.581787, 1385.083374, 14.338436, 0.0000, 359.2442, 273.5151);
- CreateObject(1248, 2086.650391, 1439.552246, 11.844243, 0.0000, 0.0000, 270.0000);
- CreateObject(1248, 2086.650391, 1439.525879, 11.198989, 0.0000, 0.0000, 270.0000);
- CreateObject(1248, 2101.881592, 1382.860718, 11.160935, 0.0000, 0.0000, 0.0000);
- CreateObject(1248, 2101.878906, 1382.860718, 11.677477, 0.0000, 0.0000, 0.0000);
- CreateObject(987, 2096.283203, 1470.937256, 26.751312, 0.0000, 0.0000, 270.0000);
- CreateObject(987, 2091.050293, 1486.082764, 23.140625, 0.0000, 0.0000, 270.0000);
- CreateObject(987, 2091.025391, 1493.227417, 23.140625, 0.0000, 0.0000, 270.0000);
- CreateObject(987, 2093.829346, 1508.784058, 24.279932, 0.0000, 0.0000, 270.0000);
- CreateObject(1225, 2091.191650, 1505.759399, 23.530872, 0.0000, 0.0000, 0.0000);
- CreateObject(1225, 2091.233643, 1504.022339, 23.533468, 0.0000, 0.0000, 0.0000);
- CreateObject(1225, 2091.283936, 1502.363525, 23.535959, 0.0000, 0.0000, 0.0000);
- CreateObject(1225, 2091.318115, 1500.323364, 23.538990, 0.0000, 0.0000, 0.0000);
- CreateObject(1225, 2090.236084, 1487.983643, 23.546379, 0.0000, 0.0000, 0.0000);
- CreateObject(1225, 2089.867676, 1485.071533, 23.546379, 0.0000, 0.0000, 0.0000);
- CreateObject(1225, 2090.050537, 1482.655518, 23.546379, 0.0000, 0.0000, 0.0000);
- CreateObject(1225, 2089.937744, 1479.281128, 23.546379, 0.0000, 0.0000, 0.0000);
- CreateObject(1225, 2093.046143, 1466.601074, 25.780754, 0.0000, 0.0000, 0.0000);
- CreateObject(1225, 2092.094238, 1460.899902, 23.538208, 0.0000, 0.0000, 0.0000);
- CreateObject(1225, 2090.051270, 1458.116943, 23.530045, 0.0000, 0.0000, 0.0000);
- CreateObject(1225, 2091.714111, 1465.377686, 23.544306, 0.0000, 0.0000, 0.0000);
- CreateObject(1225, 2091.849365, 1463.020630, 23.541018, 0.0000, 0.0000, 0.0000);
- //=======================================Vehicles=======================================//
- AddStaticVehicleEx(411, 2142.514648, 1409.062866, 10.547394, 179.475494, 0, 0, 30);
- AddStaticVehicleEx(411, 2135.961914, 1397.881713, 10.547394, 0.089974, 0, 0, 30);
- AddStaticVehicleEx(444, 2091.741943, 1419.280761, 11.191614, 271.185272, 0, 0, 30);
- AddStaticVehicleEx(409, 2168.549804, 1404.725463, 10.620307, 0.643048, 0, 0, 30);
- AddStaticVehicleEx(451, 2126.399414, 1409.059448, 10.527235, 179.787765, 0, 0, 30);
- AddStaticVehicleEx(451, 2119.861572, 1398.198364, 10.518886, 0.433038, 0, 0, 30);
- AddStaticVehicleEx(522, 2146.901367, 1422.384887, 10.390228, 90.997535, 0, 0, 30);
- AddStaticVehicleEx(522, 2140.714843, 1422.411132, 10.392187, 90.211975, 0, 0, 30);
- AddStaticVehicleEx(522, 2134.825195, 1422.332275, 10.376135, 90.718711, 0, 0, 30);
- AddStaticVehicleEx(522, 2128.936279, 1422.368408, 10.383916, 90.409225, 0, 0, 30);
- AddStaticVehicleEx(522, 2123.243164, 1422.449951, 10.381701, 91.241943, 0, 0, 30);
- AddStaticVehicleEx(520, 2144.358154, 1403.380004, 17.056406, 271.297729, 0, 0, 30);
- AddStaticVehicleEx(431, 2092.570800, 1403.926025, 10.922136, 178.294845, 0, 0, 30);
- AddStaticVehicleEx(506, 2116.875976, 1408.813232, 10.520777, 179.653518, 0, 0, 30);
- AddStaticVehicleEx(506, 2110.140136, 1398.518310, 10.523291, 1.818823, 0, 0, 30);
- AddStaticVehicleEx(487, 2196.459228, 1401.983520, 19.142223, 90.045516, 0, 2, 30);
- //=======================================master.txt=======================================//
- filename = "master.txt";
- new File:masterfile;
- masterfile = fopen(filename, io_read);
- for(new i; i<NAMELINES; i++)
- {
- fread(masterfile, fileline, sizeof(fileline));
- if(strlen(fileline) > 0)
- {
- strdel(fileline, strlen(fileline)-2, sizeof(fileline));
- master[i] = fileline;
- }
- }
- fclose(masterfile);
- return 1;
- }
- //========================================================================================//
- public OnFilterScriptExit()
- {
- DestroyObject(smallgate);
- DestroyObject(biggate);
- return 1;
- }
- //========================================================================================//
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/smallgate", true) == 0)
- {
- if(IsPlayerMaster(playerid))
- {
- MoveObject(smallgate, 2098.391113, 1383.057373, 12.347997, GATESPEED);
- new gatenumber = 1;
- SetTimerEx("closegates", CLOSEGATEDELAY, 0, "i", gatenumber);
- SendClientMessage(playerid, COLOR_GATESYS, "Gate is opening-->The Gate is closing self.");
- }
- else SendClientMessage(playerid, COLOR_GATESYS, "You are not an Admin.");
- return 1;
- }
- //========================================================================================//
- if(strcmp(cmdtext, "/biggate", true) == 0)
- {
- if(IsPlayerMaster(playerid))
- {
- MoveObject(biggate, 2086.695801, 1444.829468, 12.443707, GATESPEED);
- new gatenumber = 1;
- SetTimerEx("closegates", CLOSEGATEDELAY, 0, "i", gatenumber);
- SendClientMessage(playerid, COLOR_GATESYS, "Gate is opening-->The Gate is closing self.");
- }
- else SendClientMessage(playerid, COLOR_GATESYS, "You are not an Admin.");
- return 1;
- }
- //========================================================================================//
- if(strcmp(cmdtext, "/adminhelp", true) == 0)
- {
- if(IsPlayerMaster(playerid))
- {
- SendClientMessage(playerid, COLOR_GATESYS, "Commands for the Admin Area.");
- SendClientMessage(playerid, COLOR_GATESYS, "/biggate -> The Biggate is opening.");
- SendClientMessage(playerid, COLOR_GATESYS, "/smallgate -> The Smallgate is opening.");
- SendClientMessage(playerid, COLOR_GATESYS, "The Gate�s closing after 6 seconds");
- SendClientMessage(playerid, COLOR_GATESYS, "----------------------------------------");
- SendClientMessage(playerid, COLOR_GATESYS, "/adminskin -> Gives you the AdminSkin.");
- SendClientMessage(playerid, COLOR_GATESYS, "/adminarea -> Teleport you to the AdminArea.");
- SendClientMessage(playerid, COLOR_GATESYS, "Admin Area scriptet by Michelle");
- }
- else SendClientMessage(playerid, COLOR_GATESYS, "You are not an Admin.");
- return 1;
- }
- //========================================================================================//
- if (strcmp(cmdtext, "/adminarea", true) == 0)
- {
- if(IsPlayerMaster(playerid))
- {
- if (IsPlayerInAnyVehicle(playerid))
- {
- SetVehiclePos(GetPlayerVehicleID(playerid), 2108.967041, 1433.100585, 10.820312);
- SetVehicleZAngle(GetPlayerVehicleID(playerid), 274.830871);
- LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
- }
- if (!IsPlayerInAnyVehicle(playerid)) {
- SetPlayerPos(playerid, 2108.967041, 1433.100585, 10.820312);
- SetPlayerFacingAngle(playerid, 274.830871);
- }
- SetPlayerInterior(playerid, 0);
- SendClientMessage(playerid, COLOR_GATESYS, "You are now in the AdminArea");
- }
- else SendClientMessage(playerid, COLOR_GATESYS, "You are not an Admin.");
- return 1;
- }
- //========================================================================================//
- if(strcmp(cmdtext, "/adminskin", true) == 0)
- {
- if(IsPlayerMaster(playerid))
- {
- SetPlayerSkin(playerid, 164);
- SetPlayerPos(playerid, 2088.960693, 1433.221923, 10.820312);
- SetPlayerColor(playerid, COLOR_GATESYS);
- UsePlayerPedAnims();
- SendClientMessage(playerid, COLOR_GATESYS, "You have now the AdminSkin.");
- }
- else SendClientMessage(playerid, COLOR_GATESYS, "You are not an Admin.");
- return 1;
- }
- return 0;
- }
- //========================================================================================//
- public closegates(gatenumber)
- {
- switch(gatenumber)
- {
- case 1:
- {
- MoveObject(smallgate, 2107.331299, 1383.021362, 12.352909, GATESPEED);
- MoveObject(biggate, 2086.678467, 1433.240234, 12.445267, GATESPEED);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement