Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- /*
- =========Nebenjob Los Santos Bahnhof+Neuer Bahnhof=========
- =========Version 1.0 von Sampi=========
- DAS NICHT ENTFERNEN!!!
- =========|||>BEFEHLE<|||=========
- =/onduty - In Dienst gehen
- =/offduty - Ausser Dienst gehen
- =/cam1 - Kamera 1 ansehen
- =/cam2 - Kamera 2 ansehen
- =/back - Kamera 1 oder 2 ausschalten
- =========|||>FUNKIONEN<|||=========
- =Dienstkleidung
- =Zwei Kameras
- =Gehalt
- */
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- new lse;
- new lsa;
- new cam1;
- new cam2;
- new OldSkin[MAX_PLAYERS] = -1;
- new gehalt;
- forward gehalt2(playerid);
- public OnGameModeInit()
- {
- // Pickups
- lse = CreatePickup(1239, 23, 1733.5177,-1929.0050,13.5711); // LS Bahnhof Eingang
- lsa = CreatePickup(1239, 23, 2540.5537,-1671.6218,-87.7424); // LS Bahnhof Ausgang
- cam1 = CreatePickup(1239, 23, 2508.8137,-1670.8013,-87.7359); // Kamera 1
- cam2 = CreatePickup(1239, 23, 2508.4312,-1672.9854,-87.7424); // Kamera 2
- // Objecte
- CreateObject(638, 1777.262085, -1949.639648, 13.806588, 0.0000, 0.0000, 270.0000);
- CreateObject(638, 1774.586670, -1949.632324, 13.806588, 0.0000, 0.0000, 270.0000);
- CreateObject(638, 1765.231323, -1949.784912, 13.806588, 0.0000, 0.0000, 270.0000);
- CreateObject(638, 1762.626953, -1949.786133, 13.806588, 0.0000, 0.0000, 270.0000);
- CreateObject(638, 1741.922241, -1949.799927, 13.814221, 0.0000, 0.0000, 270.0000);
- CreateObject(638, 1739.244507, -1949.792725, 13.814221, 0.0000, 0.0000, 270.0000);
- CreateObject(638, 1730.272339, -1949.693726, 13.814221, 0.0000, 0.0000, 270.0000);
- CreateObject(638, 1727.614014, -1949.688110, 13.814221, 0.0000, 0.0000, 270.0000);
- CreateObject(638, 1712.119751, -1949.826538, 13.814221, 0.0000, 0.0000, 270.0000);
- CreateObject(638, 1709.437378, -1949.833740, 13.814221, 0.0000, 0.0000, 270.0000);
- CreateObject(638, 1698.235718, -1949.742188, 13.814221, 0.0000, 0.0000, 270.0000);
- CreateObject(638, 1695.541382, -1949.713745, 13.814221, 0.0000, 0.0000, 270.0000);
- CreateObject(982, 1774.747314, -1955.762939, 13.230430, 0.0000, 0.0000, 270.0000);
- CreateObject(982, 1749.121094, -1955.756958, 13.230430, 0.0000, 0.0000, 270.0000);
- CreateObject(982, 1723.529785, -1955.742432, 13.222657, 0.0000, 0.0000, 270.0000);
- CreateObject(982, 1697.890259, -1955.747192, 13.230430, 0.0000, 0.0000, 270.0000);
- CreateObject(983, 1681.867554, -1955.766235, 13.230430, 0.0000, 0.0000, 270.0000);
- CreateObject(1231, 1735.711182, -1949.755859, 15.847580, 0.0000, 0.0000, 270.0000);
- CreateObject(1231, 1705.001831, -1949.803345, 15.847580, 0.0000, 0.0000, 270.0000);
- CreateObject(1231, 1769.679443, -1949.716675, 15.839947, 0.0000, 0.0000, 270.0000);
- CreateObject(1232, 1751.778442, -1951.151123, 15.753830, 0.0000, 0.0000, 0.0000);
- CreateObject(1232, 1719.763062, -1951.209229, 15.753830, 0.0000, 0.0000, 0.0000);
- CreateObject(850, 1692.526245, -1958.350098, 7.361493, 0.0000, 0.0000, 0.0000);
- CreateObject(850, 1716.174438, -1945.740479, 12.667857, 0.0000, 0.0000, 0.0000);
- CreateObject(853, 1693.397949, -1955.518311, 7.649912, 0.0000, 0.0000, 56.2500);
- CreateObject(1264, 1693.256470, -1958.433228, 7.721244, 0.0000, 0.0000, 0.0000);
- CreateObject(1265, 1692.869629, -1956.694702, 7.717765, 0.0000, 0.0000, 0.0000);
- CreateObject(1328, 1693.797363, -1958.929688, 7.764764, 0.0000, 0.0000, 0.0000);
- CreateObject(1349, 1693.096802, -1960.596680, 7.820385, 0.0000, 0.0000, 45.0000);
- CreateObject(1349, 1684.308228, -1962.546509, 13.662573, 0.0000, 352.2651, 33.7500);
- CreateObject(1359, 1770.552979, -1949.526855, 13.808111, 0.0000, 0.0000, 0.0000);
- CreateObject(1359, 1736.416992, -1949.717896, 13.815744, 0.0000, 0.0000, 0.0000);
- CreateObject(1359, 1705.856812, -1949.906616, 13.815744, 0.0000, 0.0000, 0.0000);
- CreateObject(1369, 1693.350098, -1952.844360, 7.871065, 0.0000, 0.0000, 326.2500);
- CreateObject(1358, 1813.111572, -1962.704956, 13.750422, 0.0000, 0.0000, 0.0000);
- CreateObject(1429, 1691.654785, -1956.092529, 7.502806, 0.0000, 0.0000, 33.7500);
- CreateObject(1462, 1694.031128, -1949.033203, 7.314497, 0.0000, 0.0000, 270.0000);
- CreateObject(1549, 1694.944092, -1932.111572, 12.557828, 0.0000, 0.0000, 180.0000);
- CreateObject(1549, 1733.104614, -1949.792603, 13.117992, 0.0000, 0.0000, 180.0000);
- CreateObject(1549, 1759.046265, -1949.804810, 13.110359, 0.0000, 0.0000, 180.0000);
- CreateObject(1572, 1760.521606, -1936.487183, 13.154594, 0.0000, 0.0000, 0.0000);
- CreateObject(1572, 1760.584717, -1937.038818, 13.263676, 0.0000, 0.0000, 0.0000);
- CreateObject(1572, 1760.598389, -1937.490356, 13.285769, 0.0000, 0.0000, 0.0000);
- CreateObject(2670, 1761.367065, -1936.989624, 12.674360, 0.0000, 0.0000, 78.7500);
- CreateObject(2670, 1691.116211, -1957.224731, 7.342052, 0.0000, 0.0000, 90.0000);
- CreateObject(2671, 1691.926636, -1954.034668, 7.252551, 0.0000, 0.0000, 67.5000);
- CreateObject(2672, 1692.667969, -1959.004517, 7.529462, 0.0000, 0.0000, 45.0000);
- CreateObject(2673, 1742.493774, -1954.244019, 12.634703, 0.0000, 0.0000, 45.0000);
- CreateObject(2674, 1732.635742, -1950.042114, 13.138927, 0.0000, 0.0000, 0.0000);
- CreateObject(2670, 1735.541870, -1949.612671, 13.197410, 0.0000, 0.0000, 270.0000);
- CreateObject(2672, 1736.742798, -1949.410645, 13.396649, 0.0000, 0.0000, 45.0000);
- CreateObject(2676, 1772.518433, -1949.705688, 13.212878, 0.0000, 0.0000, 0.0000);
- CreateObject(2677, 1706.118530, -1950.206787, 13.389205, 0.0000, 0.0000, 0.0000);
- CreateObject(2676, 1708.054565, -1953.958984, 12.650199, 0.0000, 0.0000, 33.7500);
- CreateObject(2673, 1760.027100, -1953.823975, 12.634703, 0.0000, 0.0000, 45.0000);
- CreateObject(2671, 1773.998779, -1953.909912, 12.549426, 0.0000, 0.0000, 0.0000);
- CreateObject(3594, 1828.783203, -1947.727417, 13.178052, 0.0000, 0.0000, 236.2501);
- CreateObject(12957, 1799.285400, -1986.206909, 13.403619, 0.0000, 0.0000, 315.0000);
- // Interior
- CreateObject(18553, 2517.442871, -1655.865479, -87.450432, 179.5183, 359.1406, 91.7189);
- CreateObject(14602, 2526.675781, -1671.642090, -83.375191, 0.0000, 0.0000, 0.0000);
- CreateObject(18553, 2522.952148, -1678.866821, -87.450432, 179.5183, 359.1406, 91.7189);
- CreateObject(1522, 2541.370605, -1672.370605, -88.760590, 0.0000, 0.0000, 90.0000);
- CreateObject(1663, 2509.104004, -1671.966797, -88.275658, 0.0000, 0.0000, 90.0000);
- CreateObject(14772, 2509.214844, -1674.295532, -87.825294, 0.0000, 0.0000, 202.5000);
- CreateObject(14772, 2509.829590, -1673.835815, -87.825294, 0.0000, 0.0000, 225.0000);
- CreateObject(14772, 2510.305908, -1673.246338, -87.825294, 0.0000, 0.0000, 236.2501);
- CreateObject(14772, 2510.619385, -1672.589722, -87.818611, 0.0000, 0.0000, 247.5000);
- CreateObject(14772, 2510.762451, -1671.814941, -87.825294, 0.0000, 0.0000, 270.0000);
- CreateObject(14772, 2510.643555, -1671.035889, -87.825294, 0.0000, 0.0000, 292.5000);
- CreateObject(14772, 2510.295654, -1670.333740, -87.825294, 0.0000, 0.0000, 303.7500);
- CreateObject(14772, 2509.711426, -1669.763794, -87.825294, 0.0000, 0.0000, 326.2500);
- CreateObject(14772, 2509.088135, -1669.419678, -87.825294, 0.0000, 0.0000, 337.5000);
- CreateObject(14772, 2508.416260, -1669.295532, -87.818611, 0.0000, 0.0000, 0.0000);
- CreateObject(14772, 2508.402100, -1674.451416, -87.825294, 0.0000, 0.0000, 180.0000);
- CreateObject(955, 2525.776123, -1656.365356, -88.332832, 0.0000, 0.0000, 0.0000);
- CreateObject(956, 2522.089355, -1678.608276, -88.338364, 0.0000, 0.0000, 180.0000);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerPrivmsg(playerid, recieverid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/onduty", true) == 0 || strcmp(cmdtext, "/indienst", true) == 0)
- {
- if(PlayerToPoint(3, playerid, 1733.5177,-1929.0050,13.5711))
- {
- if(OldSkin[playerid] == -1)
- {
- SetPlayerPos(playerid,2537.9233,-1671.5131,-87.7424);
- GameTextForPlayer(playerid, "Du bist nun in ~g~Dienst~n~~w~Beachte nun bitte den Bahnverkehr.", 5000, 5);
- OldSkin[playerid] = GetPlayerSkin(playerid);
- SetPlayerSkin(playerid, 166);
- gehalt = SetTimer("gehalt2", 600000, 1);
- return 1;
- }
- }
- }
- if(strcmp(cmdtext, "/offduty", true) == 0 || strcmp(cmdtext, "/ausserdienst", true) == 0)
- {
- if(PlayerToPoint(3, playerid, 2540.5537,-1671.6218,-87.7424))
- {
- GameTextForPlayer(playerid, "Du bist nun ausser ~r~Dienst.", 5000, 5);
- SetPlayerPos(playerid,1730.8274,-1928.8726,13.5703);
- SetPlayerSkin(playerid, OldSkin[playerid]);
- OldSkin[playerid] = -1;
- KillTimer(gehalt);
- return 1;
- }
- }
- if(strcmp(cmdtext, "/cam1", true) == 0 || strcmp(cmdtext, "/kamera1", true) == 0)
- {
- if(PlayerToPoint(1, playerid, 2508.8137,-1670.8013,-87.7359))
- {
- SetPlayerCameraPos(playerid, 1706.4597,-1954.2412,13.5469);
- SetPlayerCameraLookAt(playerid, 1679.2902,-1953.9602,13.5469);
- GameTextForPlayer(playerid, "Kamera ~r~1.", 3000, 5);
- TogglePlayerControllable(playerid,0);
- SendClientMessage(playerid, COLOR_GREY, "***Benutze /back um die Kamera auszuschalten.");
- return 1;
- }
- }
- if(strcmp(cmdtext, "/cam2", true) == 0 || strcmp(cmdtext, "/kamera2", true) == 0)
- {
- if(PlayerToPoint(1, playerid, 2508.4312,-1672.9854,-87.7424))
- {
- SetPlayerCameraPos(playerid, 1846.5137,-1954.2433,13.5547);
- SetPlayerCameraLookAt(playerid, 1846.5137,-1954.2433,13.5547);
- GameTextForPlayer(playerid, "Kamera ~r~2.", 3000, 5);
- TogglePlayerControllable(playerid,0);
- SendClientMessage(playerid, COLOR_GREY, "***Benutze /back um die Kamera auszuschalten.");
- return 1;
- }
- }
- if(strcmp(cmdtext, "/back", true) == 0 || strcmp(cmdtext, "/zurueck", true) == 0)
- {
- if(PlayerToPoint(3, playerid, 2508.8137,-1670.8013,-87.7359))
- {
- GameTextForPlayer(playerid, "Kamera ~b~1~w~ ~r~ausgeschaltet.", 5000, 5);
- SetPlayerPos(playerid,2508.8137,-1670.8013,-87.7359);
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllable(playerid,1);
- return 1;
- }
- else if(PlayerToPoint(3, playerid, 2508.4312,-1672.9854,-87.7424))
- {
- GameTextForPlayer(playerid, "Kamera ~b~2~w~ ~r~ausgeschaltet.", 5000, 5);
- SetPlayerPos(playerid,2508.4312,-1672.9854,-87.7424);
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllable(playerid,1);
- return 1;
- }
- }
- return 0;
- }
- public OnPlayerInfoChange(playerid)
- {
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == lse)
- {
- GameTextForPlayer(playerid, "Benutze ~g~/onduty~w~ um in Dienst zugehen.", 5000, 5);
- }
- if(pickupid == lsa)
- {
- GameTextForPlayer(playerid, "Benutze ~r~/offduty~w~ um ausser Dienst zugehen.", 5000, 5);
- }
- if(pickupid == cam1)
- {
- GameTextForPlayer(playerid, "Benutze ~g~/cam1~w~ um Kamera 1 einzuschalten.", 5000, 5);
- }
- if(pickupid == cam2)
- {
- GameTextForPlayer(playerid, "Benutze ~g~/cam2~w~ um Kamera 2 einzuschalten.", 5000, 5);
- }
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public gehalt2(playerid)
- {
- for (new i = 0; i < MAX_PLAYERS; i++) {
- SendClientMessage(i,COLOR_LIGHTBLUE,"Gehalt: 1000$");
- GivePlayerMoney(playerid, 1000); // Gehalt
- }
- return 1;
- }
- PlayerToPoint(Float:radius, playerid, Float:X, Float:Y, Float:Z)
- {
- new Float:oldpos[3], Float:temppos[3];
- GetPlayerPos(playerid, oldpos[0], oldpos[1], oldpos[2]);
- temppos[0] = (oldpos[0] -X);
- temppos[1] = (oldpos[1] -Y);
- temppos[2] = (oldpos[2] -Z);
- if(((temppos[0] < radius) && (temppos[0] > -radius)) && ((temppos[1] < radius) && (temppos[1] > -radius)) && ((temppos[2] < radius) && (temppos[2] > -radius)))
- {
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement