Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- //Door
- new Door1;
- new Door2;
- //Forwards
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- // PRESSING(newkeys, keys)
- #define PRESSING(%0,%1) \
- (((%0) & (%1)) == (%1))
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- // Don't use these lines if it's a filterscript
- SetGameModeText("Blank Script");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- //----------------------[Bank Objs]--------------------------
- CreateObject(3997, 1989.555176, 308.669037, 3.816054, 0.0000, 0.0000, 0.0000);
- CreateObject(13007, 2044.595093, 260.997681, 5.863875, 0.0000, 0.0000, 268.8997);
- CreateObject(14576, 2037.848999, 265.887787, -0.319291, 0.0000, 0.0000, 0.0000);
- CreateObject(18553, 2052.441650, 267.986237, 5.366759, 0.0000, 0.0000, 357.4217);
- CreateObject(2395, 2037.617554, 251.057388, 4.094887, 0.0000, 0.0000, 0.0000);
- CreateObject(2395, 2040.489380, 251.059921, 6.153589, 0.0000, 0.0000, 0.0000);
- CreateObject(14592, 2052.075195, 231.292145, 6.823359, 0.0000, 0.0000, 180.3777);
- CreateObject(16773, 2043.223022, 214.320435, 3.889916, 0.0000, 0.0000, 270.6186);
- CreateObject(2025, 2066.053711, 243.225616, -0.106371, 0.0000, 0.0000, 181.2371);
- CreateObject(14651, 2046.059326, 244.582642, 2.148138, 0.0000, 0.0000, 272.3375);
- CreateObject(18070, 2054.164551, 241.114609, 0.407719, 0.0000, 0.0000, 270.6186);
- CreateObject(1670, 2052.541260, 239.019760, 0.953537, 0.0000, 0.0000, 0.0000);
- CreateObject(1716, 2050.742920, 238.504730, -0.097553, 0.0000, 0.0000, 0.0000);
- CreateObject(1716, 2050.831787, 240.421524, -0.095588, 0.0000, 0.0000, 0.0000);
- CreateObject(1716, 2050.865723, 242.472351, -0.092470, 0.0000, 0.0000, 0.0000);
- CreateObject(14455, 2044.725586, 247.495667, 1.575538, 0.0000, 0.0000, 0.0000);
- CreateObject(1726, 2044.988281, 241.707932, -0.105873, 0.0000, 0.0000, 0.0000);
- CreateObject(1726, 2047.553467, 239.715454, -0.129860, 0.0000, 0.0000, 271.4780);
- CreateObject(2193, 2044.358276, 254.830307, -1.110093, 0.0000, 0.0000, 0.0000);
- CreateObject(2193, 2044.339600, 257.891266, -1.110815, 0.0000, 0.0000, 0.0000);
- CreateObject(2193, 2044.325073, 261.030090, -1.110815, 0.0000, 0.0000, 0.0000);
- CreateObject(2182, 2044.251465, 265.843750, -1.110563, 0.0000, 0.0000, 0.0000);
- CreateObject(2181, 2040.987183, 266.773804, -1.110563, 0.0000, 0.0000, 0.0000);
- CreateObject(2207, 2036.854858, 254.356491, -1.112628, 0.0000, 0.0000, 142.6667);
- CreateObject(1714, 2034.747437, 253.100082, -1.109863, 0.0000, 0.0000, 141.8071);
- CreateObject(2737, 2036.071289, 252.356750, 0.866309, 0.0000, 0.0000, 179.5182);
- CreateObject(2608, 2038.938110, 267.486023, 0.996645, 0.0000, 0.0000, 0.0000);
- CreateObject(2604, 2038.611206, 267.040344, -0.311478, 0.0000, 0.0000, 0.0000);
- CreateObject(2576, 2033.704712, 266.705994, -1.095005, 0.0000, 0.0000, 0.0000);
- CreateObject(2200, 2033.991333, 263.553162, -1.109167, 0.0000, 0.0000, 88.5220);
- CreateObject(2199, 2034.026489, 261.241058, -1.111527, 0.0000, 0.0000, 87.6625);
- CreateObject(2191, 2044.941040, 263.009216, -1.110815, 0.0000, 0.0000, 179.5181);
- CreateObject(2164, 2039.727051, 252.323944, -1.111419, 0.0000, 0.0000, 180.3777);
- CreateObject(2007, 2034.447388, 257.894104, -1.108439, 0.0000, 0.0000, 94.5380);
- CreateObject(987, 2065.661865, 226.107651, -0.766953, 0.0000, 0.0000, 0.0000);
- CreateObject(987, 2054.454346, 225.972275, -0.766005, 0.0000, 0.0000, 0.0000);
- CreateObject(987, 2077.075928, 226.006500, -0.956544, 0.0000, 0.0000, 272.3374);
- CreateObject(987, 2077.387939, 219.311768, -0.949268, 0.0000, 0.0000, 272.3374);
- CreateObject(987, 2077.960938, 205.364334, -0.923791, 0.0000, 0.0000, 272.3374);
- CreateObject(987, 2077.879883, 207.331696, 2.894969, 0.0000, 0.0000, 271.4780);
- CreateObject(1499, 2051.496094, 247.332153, -0.096580, 0.0000, 0.0000, 0.0000);
- CreateObject(1499, 2043.505249, 248.716843, -0.096580, 0.0000, 0.0000, 90.2409);
- CreateObject(1499, 2066.251465, 247.452118, -0.090454, 0.0000, 0.0000, 181.3413);
- Door1 = CreateObject(2634, 2037.861938, 273.399597, -6.790209, 0.0000, 0.0000, 181.2371);
- Door2 = CreateObject(2634, 2071.608887, 229.182129, 1.328525, 0.0000, 0.0000, 0.0000);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- 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("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- return 1;
- }
- return 0;
- }
- public OnPlayerInfoChange(playerid)
- {
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (PRESSING(newkeys, KEY_ACTION))
- {
- if(PlayerToPoint(2.0,playerid,2037.7885,272.4348,-7.3889) || PlayerToPoint(2.0,playerid,2037.8192,274.6452,-7.5010))
- {
- MoveObject(Door1, 2039.837402, 273.399597, -6.790209,3);
- SetTimerEx("CloseGate", 2000, false, "i", playerid);
- }
- if(PlayerToPoint(2.0,playerid,2071.6594,227.9109,0.9116) || PlayerToPoint(2.0,playerid,2071.6550,230.5005,0.9159))
- {
- MoveObject(Door2, 2069.886719, 229.182007, 1.328525,3);
- SetTimerEx("CloseGate2", 2000, false, "i", playerid);
- }
- }
- if (PRESSING(newkeys, KEY_CROUCH))
- {
- SetPlayerPos(playerid, 2039.837402, 273.399597, -6.790209);
- SendClientMessage(playerid,0xFFFF00AA,".:: [BANK]: Welcome to the Bank!");
- }
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- return 0;
- }
- 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)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- forward CloseGate(playerid);
- public CloseGate(playerid)
- {
- MoveObject(Door1, 2037.861938, 273.399597, -6.790209,3);
- return 1;
- }
- forward CloseGate2(playerid);
- public CloseGate2(playerid)
- {
- MoveObject(Door2, 2071.608887, 229.182129, 1.328525,3);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement