Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**//**//**//**//**//**//**//**//**/
- /*+--------------------------------+*/
- /*| |*/
- /*| iBump |*/
- /*| FILTERSCRIPT |*/
- /*| bY PSPgamer/FoxHound |*/
- /*| 2 0 1 0 |*/
- /*| |*/
- /*+--------------------------------+*/
- /*| 14 AUGUST 2010 |*/
- /*+--------------------------------+*/
- /**//**//**//**//**//**//**//**//**/
- #include <a_samp>
- #define CostProChip 100 // Standartly, ONE Chip Costs 100$
- #define RoundTime 2 // Standartly: ONE Round = 2 Minutes (TIME AS MINUTES)
- #define RoundWaitTime 60 // Standartly: Waiting for the Round=60 Sec (1 Minute)
- #define ENABLE_BUMPERCAR_INVULNERABLITY //Comment this, if you want that the BumperCars should get damages
- #define ChipBuyPickupPos 230.7943,-1921.2220,7.4070
- #define xD 7
- new vortex[17],map[118],pickup[9],
- pPickupCreated[MAX_PLAYERS],pChip[MAX_PLAYERS],
- bRoundStarted=0,bRoundNextStatus;
- #define RoundStartTimer(); bRoundNextStatus=1;SetTimer("RoundStatusChange",RoundWaitTime*1000,0);
- #define RoundWaitTimer(); bRoundNextStatus=0;SetTimer("RoundStatusChange",RoundTime*60000,0);
- public OnFilterScriptInit()
- {
- pickup[1] = CreatePickup(354, 23, 256.558044, -1971.587769, 17.531267, -1);
- pickup[2] = CreatePickup(354, 23, 237.466705, -1973.062622, 17.729715, -1);
- pickup[3] = CreatePickup(354, 23, 224.514618, -1973.132690, 18.044230, -1);
- pickup[4] = CreatePickup(354, 23, 202.781738, -1971.958374, 17.248663, -1);
- pickup[5] = CreatePickup(354, 23, 202.688568, -1939.581543, 17.274645, -1);
- pickup[6] = CreatePickup(354, 23, 223.743042, -1937.108154, 17.880533, -1);
- pickup[7] = CreatePickup(354, 23, 237.231216, -1937.441650, 17.872381, -1);
- pickup[8] = CreatePickup(354, 23, 256.416229, -1938.911377, 17.170809, -1);
- //Map
- map[0] = CreateObject(7020, 218.842209, -1972.776611, 3.432788, 0.0000, 0.0000, 0.0000,500.0);
- map[1] = CreateObject(7020, 240.280426, -1972.490112, -3.377496, 0.0000, 179.5182, 360.0000,500.0);
- map[2] = CreateObject(3886, 226.162476, -1892.088135, -1.137368, 354.8434, 0.0000, 180.0000,500.0);
- map[3] = CreateObject(3886, 233.811157, -1891.736938, -1.079310, 355.7028, 0.0000, 180.0000,500.0);
- map[4] = CreateObject(982, 202.394470, -1951.575195, 7.090132, 0.0000, 0.0000, 0.0000,500.0);
- map[5] = CreateObject(982, 202.352554, -1959.156006, 7.090132, 0.0000, 0.0000, 0.0000,500.0);
- map[6] = CreateObject(982, 256.770081, -1959.131226, 7.090132, 0.0000, 0.0000, 0.0000,500.0);
- map[7] = CreateObject(982, 256.769775, -1951.530762, 7.090132, 0.0000, 0.0000, 0.0000,500.0);
- map[8] = CreateObject(982, 244.029633, -1938.827515, 7.090132, 0.0000, 0.0000, 270.0000,500.0);
- map[9] = CreateObject(982, 215.196167, -1938.773315, 7.065132, 0.0000, 0.0000, 270.0000,500.0);
- map[10] = CreateObject(983, 229.612961, -1938.762207, 7.069036, 0.0000, 0.0000, 270.0000,500.0);
- map[11] = CreateObject(982, 243.998215, -1971.950562, 7.090132, 0.0000, 0.0000, 270.0000,500.0);
- map[12] = CreateObject(982, 215.184219, -1971.953857, 7.090132, 0.0000, 0.0000, 270.0000,500.0);
- map[13] = CreateObject(983, 229.593399, -1971.951172, 7.090132, 0.0000, 0.0000, 270.0000,500.0);
- map[14] = CreateObject(13667, 230.097839, -1923.580566, 21.907694, 0.0000, 1.7189, 101.2500,500.0);
- map[15] = CreateObject(14387, 233.204788, -1937.303467, 7.040854, 0.0000, 348.8273, 90.0000,500.0);
- map[16] = CreateObject(14387, 228.597473, -1937.292725, 7.040559, 0.0000, 348.8273, 90.0000,500.0);
- map[17] = CreateObject(3877, 202.911514, -1939.477417, 8.064395, 0.0000, 0.0000, 0.0000,500.0);
- map[18] = CreateObject(3877, 220.980530, -1939.412598, 8.064395, 0.0000, 0.0000, 0.0000,500.0);
- map[19] = CreateObject(3877, 240.236588, -1939.654907, 8.064395, 0.0000, 0.0000, 0.0000,500.0);
- map[20] = CreateObject(3877, 256.273560, -1939.150269, 8.064395, 0.0000, 0.0000, 0.0000,500.0);
- map[21] = CreateObject(3877, 256.395905, -1971.598267, 8.064395, 0.0000, 0.0000, 0.0000,500.0);
- map[22] = CreateObject(3877, 202.674850, -1971.703247, 8.064395, 0.0000, 0.0000, 0.0000,500.0);
- map[23] = CreateObject(3864, 237.403336, -1937.018311, 12.507852, 0.0000, 0.0000, 90.0000,500.0);
- map[24] = CreateObject(3864, 223.720703, -1936.684814, 12.507554, 0.0000, 0.0000, 90.0000,500.0);
- map[25] = CreateObject(3472, 229.856552, -1899.549316, -3.378106, 0.0000, 0.0000, 269.9999,500.0);
- map[26] = CreateObject(974, 271.682800, -1918.963989, 3.610756, 0.0000, 0.0000, 180.0000,500.0);
- map[27] = CreateObject(974, 271.655090, -1918.937622, -1.866224, 0.0000, 0.0000, 180.0000,500.0);
- map[28] = CreateObject(974, 271.643219, -1918.935791, -1.873265, 0.0000, 0.0000, 180.0000,500.0);
- map[29] = CreateObject(974, 265.106201, -1919.007690, 3.632051, 0.0000, 0.0000, 180.0000,500.0);
- map[30] = CreateObject(974, 265.121613, -1918.984741, -1.835307, 0.0000, 0.0000, 180.0000,500.0);
- map[31] = CreateObject(974, 258.528198, -1919.030151, 3.640152, 0.0000, 0.0000, 180.0000,500.0);
- map[32] = CreateObject(974, 258.534637, -1919.027466, -1.839334, 0.0000, 0.0000, 180.0000,500.0);
- map[33] = CreateObject(974, 251.862930, -1919.035278, 3.632217, 0.0000, 0.0000, 180.0000,500.0);
- map[34] = CreateObject(974, 251.873871, -1919.037720, -1.821839, 0.0000, 0.0000, 180.0000,500.0);
- map[35] = CreateObject(974, 245.256180, -1919.045532, 3.607688, 0.0000, 0.0000, 180.0000,500.0);
- map[36] = CreateObject(974, 245.250626, -1919.067627, -1.783203, 0.0000, 0.0000, 180.0000,500.0);
- map[37] = CreateObject(974, 238.752457, -1919.028320, 3.604942, 0.0000, 0.0000, 180.0000,500.0);
- map[38] = CreateObject(974, 238.731277, -1919.021362, -1.843206, 0.0000, 0.0000, 180.0000,500.0);
- map[39] = CreateObject(974, 240.584564, -1922.356812, 3.761045, 0.0000, 0.0000, 270.0000,500.0);
- map[40] = CreateObject(974, 240.597549, -1927.582153, 3.680803, 0.0000, 0.0000, 270.0000,500.0);
- map[41] = CreateObject(974, 240.610291, -1934.250244, 3.702232, 0.0000, 0.0000, 270.0000,500.0);
- map[42] = CreateObject(974, 240.618103, -1940.930420, 3.618938, 0.0000, 0.0000, 270.0000,500.0);
- map[43] = CreateObject(974, 240.588074, -1922.353882, -1.703655, 0.0000, 0.0000, 270.0000,500.0);
- map[44] = CreateObject(974, 240.599213, -1928.985840, -1.737350, 0.0000, 0.0000, 270.0000,500.0);
- map[45] = CreateObject(974, 240.618134, -1935.565186, -1.769412, 0.0000, 0.0000, 270.0000,500.0);
- map[46] = CreateObject(974, 274.964813, -1915.563599, 0.727134, 0.0000, 0.0000, 90.0000,500.0);
- map[47] = CreateObject(974, 274.963562, -1908.884766, 0.716044, 0.0000, 0.0000, 90.0000,500.0);
- map[48] = CreateObject(974, 274.982697, -1912.223267, -4.702021, 0.0000, 0.0000, 90.0000,500.0);
- map[49] = CreateObject(974, 274.981995, -1915.586182, -4.674996, 0.0000, 0.0000, 90.0000,500.0);
- map[50] = CreateObject(974, 199.267731, -1915.691040, 0.742507, 0.0000, 0.0000, 90.0000,500.0);
- map[51] = CreateObject(974, 199.287079, -1915.693604, -4.717402, 0.0000, 0.0000, 90.0000,500.0);
- map[52] = CreateObject(974, 202.512985, -1919.030151, 3.612507, 0.0000, 0.0000, 360.0000,500.0);
- map[53] = CreateObject(974, 202.484055, -1919.052856, -1.802067, 0.0000, 0.0000, 360.0000,500.0);
- map[54] = CreateObject(974, 209.189270, -1919.052734, -1.815940, 0.0000, 0.0000, 360.0000,500.0);
- map[55] = CreateObject(974, 209.213120, -1919.069946, 3.632793, 0.0000, 0.0000, 360.0000,500.0);
- map[56] = CreateObject(974, 215.862793, -1919.029541, -1.825749, 0.0000, 0.0000, 360.0000,500.0);
- map[57] = CreateObject(974, 215.863068, -1919.021729, 3.597453, 0.0000, 0.0000, 360.0000,500.0);
- map[58] = CreateObject(974, 222.373779, -1919.085693, -1.775777, 0.0000, 0.0000, 360.0000,500.0);
- map[59] = CreateObject(974, 222.425705, -1919.027832, 3.633120, 0.0000, 0.0000, 360.0000,500.0);
- map[60] = CreateObject(974, 220.667679, -1922.408691, -1.821517, 0.0000, 0.0000, 269.9999,500.0);
- map[61] = CreateObject(974, 220.675552, -1922.392334, 3.672257, 0.0000, 0.0000, 269.9999,500.0);
- map[62] = CreateObject(974, 220.671478, -1929.068481, -1.808703, 0.0000, 0.0000, 269.9999,500.0);
- map[63] = CreateObject(974, 220.676941, -1929.080811, 3.647152, 0.0000, 0.0000, 269.9999,500.0);
- map[64] = CreateObject(974, 220.654633, -1935.740356, 3.624292, 0.0000, 0.0000, 269.9999,500.0);
- map[65] = CreateObject(974, 220.681030, -1935.688110, -1.864830, 0.0000, 0.0000, 269.9999,500.0);
- map[66] = CreateObject(967, 230.808746, -1922.973267, 6.410826, 0.0000, 0.0000, 0.0000,500.0);
- map[67] = CreateObject(3010, 231.021790, -1923.288574, 6.901157, 30.0803, 0.0000, 334.8443,500.0);
- map[68] = CreateObject(3007, 231.022995, -1923.184204, 7.031453, 317.0282, 358.2811, 9.2992,500.0);
- map[69] = CreateObject(3008, 230.833130, -1922.967041, 7.155719, 312.7310, 69.6143, 357.4217,500.0);
- map[70] = CreateObject(3009, 231.015137, -1923.271729, 7.079129, 310.1527, 58.4416, 101.0180,500.0);
- map[71] = CreateObject(1663, 230.830139, -1923.144287, 6.871040, 0.0000, 0.0000, 168.7500,500.0);
- map[72] = CreateObject(3010, 230.801773, -1923.212402, 6.898202, 30.0803, 0.0000, 348.7500,500.0);
- map[73] = CreateObject(3012, 231.100937, -1922.791504, 7.124330, 343.6707, 338.5141, 15.4699,500.0);
- map[74] = CreateObject(8373, 237.109375, -1905.491821, -24.382109, 0.0000, 0.0000, 180.0000,500.0);
- map[75] = CreateObject(1270, 230.521271, -1922.814697, 6.779050, 0.0000, 0.0000, 0.0000,500.0);
- map[76] = CreateObject(1471, 230.788330, -1921.866821, 6.047118, 91.9597, 0.0000, 0.0000,500.0);
- map[77] = CreateObject(1252, 231.430084, -1923.249512, 7.355108, 0.0000, 0.0000, 270.0000,500.0);
- map[78] = CreateObject(3522, 259.043304, -1913.745850, 3.446308, 0.0000, 0.0000, 90.0000,500.0);
- map[79] = CreateObject(3522, 211.615616, -1913.795044, 3.446308, 0.0000, 0.0000, 90.0000,500.0);
- map[80] = CreateObject(744, 221.867218, -1892.431763, -0.291512, 5.1566, 0.0000, 0.0000,500.0);
- map[81] = CreateObject(744, 239.816315, -1892.004272, -0.113833, 6.8755, 0.0000, 56.2500,500.0);
- map[82] = CreateObject(3660, 264.954102, -1915.030762, 9.061969, 0.0000, 0.0000, 0.0000,500.0);
- map[83] = CreateObject(3660, 251.043732, -1915.602905, 9.061969, 0.0000, 0.0000, 180.0000,500.0);
- map[84] = CreateObject(3660, 210.204041, -1916.019165, 9.061971, 0.0000, 0.0000, 180.0000,500.0);
- map[88] = CreateObject(3802, 226.241898, -1900.761475, 3.859141, 0.0000, 0.0000, 92.6556,500.0);
- map[89] = CreateObject(3802, 224.919540, -1900.761230, 3.772731, 0.0000, 0.0000, 92.6556,500.0);
- map[90] = CreateObject(3802, 233.603409, -1900.769165, 3.774775, 0.0000, 0.0000, 92.6556,500.0);
- map[91] = CreateObject(3802, 234.878113, -1900.766968, 3.747672, 0.0000, 0.0000, 92.6556,500.0);
- map[92] = CreateObject(15038, 229.481323, -1922.742310, 7.024141, 0.0000, 0.0000, 0.0000,500.0);
- map[93] = CreateObject(15038, 232.224731, -1922.609863, 7.024141, 0.0000, 0.0000, 0.0000,500.0);
- map[94] = CreateObject(718, 272.465820, -1912.896729, 3.317765, 0.0000, 0.0000, 0.0000,500.0);
- map[95] = CreateObject(718, 272.149261, -1908.432617, 3.316726, 0.0000, 0.0000, 0.0000,500.0);
- map[96] = CreateObject(718, 272.238495, -1903.713501, 3.316728, 0.0000, 0.0000, 0.0000,500.0);
- map[97] = CreateObject(718, 272.230804, -1899.253540, 3.316728, 0.0000, 0.0000, 0.0000,500.0);
- map[98] = CreateObject(718, 202.856857, -1899.359375, 3.317765, 0.0000, 0.0000, 0.0000,500.0);
- map[99] = CreateObject(718, 202.915985, -1903.805664, 3.317765, 0.0000, 0.0000, 0.0000,500.0);
- map[100] = CreateObject(718, 202.824036, -1908.236206, 3.317765, 0.0000, 0.0000, 0.0000,500.0);
- map[101] = CreateObject(718, 202.832779, -1912.545166, 3.317765, 0.0000, 0.0000, 0.0000,500.0);
- map[102] = CreateObject(717, 260.920105, -1899.133911, 3.615000, 0.0000, 0.0000, 0.0000,500.0);
- map[103] = CreateObject(717, 248.308807, -1898.823364, 3.613962, 0.0000, 0.0000, 0.0000,500.0);
- map[104] = CreateObject(717, 209.047852, -1898.912598, 3.615000, 0.0000, 0.0000, 0.0000,500.0);
- map[105] = CreateObject(717, 217.793259, -1899.156250, 3.615000, 0.0000, 0.0000, 0.0000,500.0);
- map[106] = CreateObject(1210, 231.407455, -1922.812378, 6.555391, 0.0000, 0.0000, 90.0000,500.0);
- map[107] = CreateObject(982, 230.637238, -1924.932373, 18.040514, 93.6785, 0.0000, 272.3375,500.0);
- map[108] = CreateObject(2222, 230.277252, -1923.228760, 6.451786, 0.0000, 0.0000, 33.7500,500.0);
- map[109] = CreateObject(2044, 231.507416, -1923.268555, 7.706479, 1.7189, 126.3373, 0.0000,500.0);
- map[110] = CreateObject(3864, 224.550598, -1973.556030, 12.495680, 0.0000, 0.0000, 270.0000,500.0);
- map[111] = CreateObject(3864, 237.283020, -1973.485962, 12.294857, 0.0000, 0.0000, 270.0000,500.0);
- map[112] = CreateObject(1412, 237.448532, -1973.891724, 6.295784, 89.3814, 359.1406, 0.0000,500.0);
- map[113] = CreateObject(1412, 224.406921, -1973.935425, 6.317168, 89.3814, 359.1406, 0.0000,500.0);
- map[114] = CreateObject(3864, 256.831238, -1938.770630, 11.929991, 0.0000, 0.0000, 33.7499,500.0);
- map[115] = CreateObject(3864, 202.475433, -1939.196045, 11.924023, 0.0000, 0.0000, 135.0000,500.0);
- map[116] = CreateObject(3864, 202.305923, -1972.149536, 11.907219, 0.0000, 0.0000, 236.2500,500.0);
- map[117] = CreateObject(3864, 256.772278, -1971.972168, 11.895689, 0.0000, 0.0000, 315.0000,500.0);
- //Vehicles
- vortex[0] = AddStaticVehicle(539,205.6203,-1970.1381,6.7588,269.7800,-1,-1); // vortex 1
- vortex[1] = AddStaticVehicle(539,205.7458,-1966.9297,6.7588,270.2076,-1,-1); // vortex 2
- vortex[2] = AddStaticVehicle(539,205.8162,-1963.8309,6.7588,266.3605,-1,-1); // vortex 3
- vortex[3] = AddStaticVehicle(539,205.9396,-1960.5295,6.7588,267.6601,-1,-1); // vortex 4
- vortex[4] = AddStaticVehicle(539,205.7356,-1957.1178,6.7588,268.6284,-1,-1); // vortex 5
- vortex[5] = AddStaticVehicle(539,205.7949,-1953.8346,6.7532,270.5078,-1,-1); // vortex 6
- vortex[6] = AddStaticVehicle(539,205.7412,-1950.2079,6.7588,273.3279,-1,-1); // vortex 7
- vortex[7] = AddStaticVehicle(539,205.8260,-1946.6357,6.7590,266.7478,-1,-1); // vortex 8
- vortex[8] = AddStaticVehicle(539,205.9477,-1943.0087,6.7589,269.8812,-1,-1); // vortex 9
- vortex[9] = AddStaticVehicle(539,253.3609,-1941.7269,6.7587,89.1423,-1,-1); // vortex 9
- vortex[10] = AddStaticVehicle(539,253.2638,-1945.5585,6.7633,86.3223,-1,-1); // vortex 10
- vortex[11] = AddStaticVehicle(539,252.9221,-1949.2660,6.7587,86.3222,-1,-1); // vortex 11
- vortex[12] = AddStaticVehicle(539,253.0848,-1953.0674,6.7588,87.8890,-1,-1); // vortex 12
- vortex[13] = AddStaticVehicle(539,252.9968,-1956.7673,6.7588,87.7032,-1,-1); // vortex 13
- vortex[14] = AddStaticVehicle(539,253.0719,-1960.3640,6.7584,88.3299,-1,-1); // vortex 14
- vortex[15] = AddStaticVehicle(539,253.0696,-1964.2434,6.7588,88.1933,-1,-1); // vortex 15
- vortex[16] = AddStaticVehicle(539,253.1736,-1968.0837,6.7588,88.2475,-1,-1); // vortex 16
- RoundStartTimer();
- return 1;
- }
- public OnFilterScriptExit()
- {
- for(new CurrentVortex=0;CurrentVortex<sizeof(vortex);CurrentVortex++) { DestroyVehicle(vortex[CurrentVortex]); } // Destroy's all created Vortex's on Filterscript unload
- for(new CurrentObject=0;CurrentObject<sizeof(map);CurrentObject++) { DestroyObject(map[CurrentObject]); } // Destroy's all created Objects on Filterscript unload
- for(new CurrentPickup=0;CurrentPickup<sizeof(pickup);CurrentPickup++) { DestroyPickup(pickup[CurrentPickup]); } // Destroy's all created Pickups on Filterscript unload
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid,100.0,ChipBuyPickupPos) && (!pPickupCreated[playerid]) && (!bRoundStarted) && (pChip[playerid]<=0))
- {
- pickup[0] = CreatePickup(1935,2,ChipBuyPickupPos,-1);
- pPickupCreated[playerid]=1;
- }
- else if((!IsPlayerInRangeOfPoint(playerid,100.0,ChipBuyPickupPos) && pPickupCreated[playerid]))
- {
- DestroyPickup(pickup[0]);
- pPickupCreated[playerid]=0;
- }
- #if defined ENABLE_BUMPERCAR_INVULNERABLITY
- if(IsPlayerInBumperCar(playerid)) { SetVehicleHealth(GetPlayerVehicleID(playerid),1000); }
- #endif
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid==pickup[0])
- {
- if(pPickupCreated[playerid] && !IsPlayerInAnyVehicle(playerid) && !bRoundStarted)
- {
- new c_str_[128];
- SetPlayerCameraPos(playerid, 230.819687, -1922.545776, 7.701454);
- SetPlayerCameraLookAt(playerid, 230.848038, -1923.123657, 7.718326);
- format(c_str_,sizeof(c_str_),"Willkommen.\nWolltest du etwa einen Fahrchip für die Autscooter kaufen ?\nEin Fahrchip kostet %d$, und eine Runde dauert 2 Minuten.",CostProChip,RoundTime);
- ShowPlayerDialog(playerid, xD, DIALOG_STYLE_MSGBOX,"Chips",c_str_,"Fahrchip kaufen","Schließen");
- }
- }
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid)
- {
- if(IsABumperCar(vehicleid))
- {
- new string[128];
- if(!pChip[playerid])
- {
- format(string,sizeof(string),"* Du hast keinen Fahrchip !");
- TogglePlayerControllable(playerid,0);
- ClearAnimations(playerid);
- TogglePlayerControllable(playerid,1);
- SendClientMessage(playerid,0xFFFFFFAA,string);
- }
- if(IsVehicleOccupied(vehicleid))
- {
- format(string,sizeof(string),"* Dieser Autoscooter ist besetzt, nimm einen anderen.");
- TogglePlayerControllable(playerid,0);
- ClearAnimations(playerid);
- TogglePlayerControllable(playerid,1);
- SendClientMessage(playerid,0xFFFFFFAA,string);
- }
- }
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if((newstate == PLAYER_STATE_DRIVER) && IsABumperCar(GetPlayerVehicleID(playerid)))
- {
- if(!pChip[playerid] || bRoundStarted) { RemovePlayerFromVehicle(playerid); }
- else
- {
- SendClientMessage(playerid,0xFFFFFFAA,"* Du hast deinen Fahrchip eingeworfen.");
- SendClientMessage(playerid,0xFFFFFFAA,"* Bitte warte auf die naechste Runde.");
- pChip[playerid]=0;
- TogglePlayerControllable(playerid,0);
- }
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid==xD)
- {
- new c_str_[128];
- if(response==0) { format(c_str_,sizeof(c_str_),"Verkäufer: Schönen Tag noch, was ohne diese Autoscooter eigentlich nicht möglich ist!"); }
- if(response==1)
- {
- if(GetPlayerMoney(playerid) < CostProChip) {format(c_str_,sizeof(c_str_),"Verkäufer: Ein Fahrchip kostet %d$! Du hast nicht genug, und jetzt weg hier!",CostProChip); }
- else
- {
- GivePlayerMoney(playerid,-CostProChip);
- pChip[playerid]=1;
- format(c_str_,sizeof(c_str_),"Verkäufer: Du hast dir einen Fahrchip für %d$ gekauft. Steige nun in einen Autoscooter. Viel Spaß!",CostProChip);
- }
- }
- SendClientMessage(playerid,0xFFFFFFAA,c_str_);
- SetCameraBehindPlayer(playerid);
- }
- return 1;
- }
- forward RoundStatusChange();
- public RoundStatusChange()
- {
- if(bRoundNextStatus) //Round START
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerInBumperCar(i))
- {
- GameTextForPlayer(i,"~>~Autoscooter~<~~n~~w~Runde ~g~getartet",3000,3);
- TogglePlayerControllable(i,1);
- }
- }
- RoundWaitTimer();
- }
- else if(!bRoundNextStatus)
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerInBumperCar(i))
- {
- GameTextForPlayer(i,"~>~Autoscooter~<~~n~~w~Runde ~r~beendet",3000,3);
- RemovePlayerFromVehicle(i);
- RespawnAllBumperCars();
- TogglePlayerControllable(i,1);
- }
- }
- RoundStartTimer();
- }
- return 1;
- }
- forward IsPlayerInBumperCar(playerid);
- public IsPlayerInBumperCar(playerid)
- {
- if((GetPlayerState(playerid)==PLAYER_STATE_DRIVER) && IsABumperCar(GetPlayerVehicleID(playerid))) { return 1; }
- return 0;
- }
- forward IsABumperCar(vehicleid);
- public IsABumperCar(vehicleid)
- {
- if(GetVehicleModel(vehicleid) == 539) { return 1; }
- return 0;
- }
- forward IsVehicleOccupied(vehicleid);
- public IsVehicleOccupied(vehicleid)
- {
- for(new p=0;p<MAX_PLAYERS;p++) { if(IsPlayerInVehicle(p,vehicleid)) { return 1; } }
- return 0;
- }
- stock RespawnAllBumperCars()
- {
- for(new bCar;bCar<sizeof(vortex);bCar++) { DestroyVehicle(vortex[bCar]); }
- vortex[0] = AddStaticVehicle(539,205.6203,-1970.1381,6.7588,269.7800,-1,-1); // vortex 1
- vortex[1] = AddStaticVehicle(539,205.7458,-1966.9297,6.7588,270.2076,-1,-1); // vortex 2
- vortex[2] = AddStaticVehicle(539,205.8162,-1963.8309,6.7588,266.3605,-1,-1); // vortex 3
- vortex[3] = AddStaticVehicle(539,205.9396,-1960.5295,6.7588,267.6601,-1,-1); // vortex 4
- vortex[4] = AddStaticVehicle(539,205.7356,-1957.1178,6.7588,268.6284,-1,-1); // vortex 5
- vortex[5] = AddStaticVehicle(539,205.7949,-1953.8346,6.7532,270.5078,-1,-1); // vortex 6
- vortex[6] = AddStaticVehicle(539,205.7412,-1950.2079,6.7588,273.3279,-1,-1); // vortex 7
- vortex[7] = AddStaticVehicle(539,205.8260,-1946.6357,6.7590,266.7478,-1,-1); // vortex 8
- vortex[8] = AddStaticVehicle(539,205.9477,-1943.0087,6.7589,269.8812,-1,-1); // vortex 9
- vortex[9] = AddStaticVehicle(539,253.3609,-1941.7269,6.7587,89.1423,-1,-1); // vortex 9
- vortex[10] = AddStaticVehicle(539,253.2638,-1945.5585,6.7633,86.3223,-1,-1); // vortex 10
- vortex[11] = AddStaticVehicle(539,252.9221,-1949.2660,6.7587,86.3222,-1,-1); // vortex 11
- vortex[12] = AddStaticVehicle(539,253.0848,-1953.0674,6.7588,87.8890,-1,-1); // vortex 12
- vortex[13] = AddStaticVehicle(539,252.9968,-1956.7673,6.7588,87.7032,-1,-1); // vortex 13
- vortex[14] = AddStaticVehicle(539,253.0719,-1960.3640,6.7584,88.3299,-1,-1); // vortex 14
- vortex[15] = AddStaticVehicle(539,253.0696,-1964.2434,6.7588,88.1933,-1,-1); // vortex 15
- vortex[16] = AddStaticVehicle(539,253.1736,-1968.0837,6.7588,88.2475,-1,-1); // vortex 16
- }
Add Comment
Please, Sign In to add comment