All pastes #720766 Raw Edit

Unnamed

public text v1 · immutable
#720766 ·published 2007-09-30 17:56 UTC
rendered paste body
/*
 _      _ _   _ _ _   _ _ _   _ _ _   _     _     _       _ _ _ _      _
| |   / /| | |  _ _| |	_ _| |  _ _| | |  /	/    / \	 |	_ _ _| _ _| |_ _
| |  / / | | | |_ _	 | |	 | |_ _	 | | / /    / O \    | |_ _ _ |_ _   _ _|
| |	/ /	 | | |  _ _| | |	 |  _ _| |	/ /	   / _ _ \	 |_ _ _  |	  | |
| |\ \	 | | | |_ _  | |	 | |_ _	 | |\ \	  /	/	\ \	  _ _ _| |	  | |
|_| \_\  |_| |_ _ _| |_|	 |_ _ _| |_| \_\ /_/	 \_\ |_ _ _ _|	  |_|
 _ _ _ _   _ _ _   _ _ _ _   _   _   _             _        _      _
|  _ _ _| |  _ _| |  _ _  | | | | | | |_ _ _   _ _| |_ _   \ \   / /     2.0
| |       | |     | |   | | | | | | |  _ _  | |_ _   _ _|   \ \/ /
| |       | |     | |   | | | | | | | |   | |     | |        \  /
| | _ _   | |     | | _ | | | |_| | | |   | |     | |        / /
|_ _ _ _| |_|     |_ _ _ _| |_ _ _| |_|   |_|     |_|       /_/
WWW.KLEREKASTCOUNTRY.CO.NR <- KLEREEKAST COUNTRY WEBSITE!
*/

#include <a_samp>

#define COLOR_GREEN 	0x33AA33AA
#define COLOR_RED 		0xAA3333AA
#define COLOR_PINK 		0xFF66FFAA
#define COLOR_BLUE 		0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 	0xFF9900AA
#define COLOR_WHITE 	0xFFFFFFFF
#define COLOR_YELLOW 	0xFFFF00AA

#define SLOTS 4

#define SOUND_MUSIC1	1062
#define SOUND_MUSIC2	1068
#define SOUND_MUSIC3	1076
#define SOUND_OFF       1184

new doane;
new doane2;
new poort1;
new poort2;

new Text:Clock;

new bomb;
new DoanePort;

new Dead[MAX_PLAYERS];

new keydown[MAX_PLAYERS] = {false, ...};
new rampid[MAX_PLAYERS] = {-1, ...};

forward Keys();
forward RemoveRamp(playerid);
forward Float:GetOptimumRampDistance(playerid);
forward Float:GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance);
new ramptypes[] = {
	1696, // curvy normal one
	1660, // concrete one with pipes
	1245, // plank of wood against a box
	1631, // water ramp with rocks
	1632, // normal water ramp
	1655, // wide water ramp
};
new playerramptypes[MAX_PLAYERS] = {0, ...};

main()
{
	print("\nGameMode Klerekast Country 2.0 starting...");


}



new Float:DM[][3] = {
{2068.7788,-3998.7654,16.2540},//dm1
{2099.4011,-4018.0686,2.8429},//dm2
{2134.2261,-4008.7080,3.8461},//dm3
{2195.8464,-4029.3828,2.8515},//dm4
{2240.0015,-4018.0591,2.8429},//dm5
{2224.4500,-3982.2769,2.8429},//dm6
{2262.3362,-3917.2495,4.2560},//dm7
{2139.3657,-3872.1382,6.2101},//dm8
{2107.7173,-3917.2080,2.8429},//dm9
{2088.2012,-3890.8994,2.842},//dm10
{2082.7026,-3939.4971,2.8429},//dm11
{2115.7771,-3985.0625,3.5919}//dm12
};

forward Doane();
forward kill();
forward time();
forward TextDraw();

public OnGameModeInit()
{

	SetGameModeText("Klerekast Country 2.0");

	EnableTirePopping(1); //Shot wheels
	AllowInteriorWeapons(1); //Weapon in interior
	AllowAdminTeleport(1);
	SetDeathDropAmount(2);

	SetTimer("Keys", 100, 1);

	//ADMIN CAR'S
	AddStaticVehicle(432,2197.1877,5844.9639,4.0128,101.1505,43,0); // Rhino1
	AddStaticVehicle(433,2192.5527,5872.8354,4.4363,102.6330,43,0); // Barracks
 	AddStaticVehicle(432,2196.5210,5850.1616,4.0050,102.8841,43,0); // Rhino2
	AddStaticVehicle(432,2195.3000,5855.2485,4.0127,102.4826,43,0); // Rhino3
	AddStaticVehicle(433,2192.7903,5867.4458,4.4366,107.0875,43,0); // Barracks2
 	AddStaticVehicle(433,2193.9651,5861.6807,4.4365,102.9463,43,0); // Barracks3
	AddStaticVehicle(425,2158.6467,5841.9106,4.5784,284.7290,43,0); // Hunter1
	AddStaticVehicle(425,2151.2488,5862.1318,4.5721,103.1793,43,0); // Hunter2
	//PLAYER CAR'S
	AddStaticVehicle(410,2144.1538,5984.8979,3.6504,197.5376,9,1); // 	Manana
	AddStaticVehicle(419,2123.8579,5984.4072,3.7975,201.0838,47,76); // Esperanto
	AddStaticVehicle(429,2106.1680,5984.1670,3.6797,23.3024,13,13); // 	Banshee
	AddStaticVehicle(445,2071.6223,5958.9512,3.8750,201.2139,35,35); // Admiral
	AddStaticVehicle(458,2040.1971,5947.6235,3.8786,196.9920,101,1); // Solair
	AddStaticVehicle(467,2003.7090,5938.2388,3.7399,199.4469,58,8); // 	Oceanic
	AddStaticVehicle(468,1983.7941,5937.6753,3.6692,199.2520,46,46); // Sanchez
	AddStaticVehicle(475,1976.0396,5931.1982,3.8035,201.2643,9,39); // 	Sabre
	AddStaticVehicle(475,2510.0974,6175.0029,15.3990,139.4471,21,1); // Sabre
	AddStaticVehicle(477,2519.7935,6149.5781,15.3491,49.5130,101,1); // ZR-350
	AddStaticVehicle(480,2513.2942,6141.7490,15.3686,227.2027,2,2); // 	Comet
	AddStaticVehicle(491,2459.0620,6219.8394,15.3489,138.1620,52,66); //Virgo
	AddStaticVehicle(496,2485.2153,6195.1714,15.3120,320.0189,53,56); //Blista Compact
	AddStaticVehicle(507,2478.9910,6265.8857,15.4200,320.5223,53,53); //Elegant
	AddStaticVehicle(516,2509.2100,6240.1309,15.4245,139.9382,122,1); //Nebula
	AddStaticVehicle(527,2536.9963,6217.8481,15.3086,318.0867,66,1); // Cardrona
	AddStaticVehicle(533,2419.8909,6233.2739,15.3044,49.9470,75,1); // 	Feltzer
	AddStaticVehicle(540,2426.6582,6192.2412,14.4331,319.2307,53,53); //Vincent
	AddStaticVehicle(541,2468.8269,6197.6108,12.3581,320.7648,60,1); // Bullet
	AddStaticVehicle(478,2655.5381,6190.0698,3.9861,2.1215,66,1); // 	Walton
	AddStaticVehicle(478,2646.7439,6190.3901,3.9935,174.4176,59,1); // 	Walton
	AddStaticVehicle(498,2654.9758,6226.7461,4.0694,358.3286,13,120); //Boxville
	AddStaticVehicle(498,2647.0674,6226.6377,4.0677,358.1542,20,117); //Boxville
	AddStaticVehicle(515,2718.3291,6168.1665,5.0148,271.4773,24,77); // Roadtrain
	AddStaticVehicle(515,2718.8530,6162.6558,5.0112,271.7386,63,78); // Roadtrain
	AddStaticVehicle(515,2719.4758,6157.5073,5.0195,271.6102,42,76); // Roadtrain
	AddStaticVehicle(412,2211.9260,5909.6860,3.8385,113.9894,10,8); // 	Voodoo
	AddStaticVehicle(421,2203.3647,5932.4629,3.8825,296.5237,13,1); // 	Washington
    AddStaticVehicle(521,2541.9622,6514.6396,14.9727,262.3463,75,13); //FCR-900
	AddStaticVehicle(521,2541.9617,6513.0850,14.9745,264.6656,87,118);//FCR-900
	AddStaticVehicle(521,2541.9419,6511.4478,14.9770,265.6107,92,3); // FCR-900
	AddStaticVehicle(522,2542.0303,6509.0166,14.9704,266.0751,6,25); // NRG-500
	AddStaticVehicle(522,2541.8430,6506.8462,14.9710,263.4922,7,79); // NRG-500
	AddStaticVehicle(522,2541.7898,6505.1572,14.9749,265.6940,8,82); // NRG-500

	AddStaticVehicle(405,1127.8906,-3297.6199,2.8250,358.5294,24,1); // Sentinel
	AddStaticVehicle(410,1108.6344,-3308.6052,2.6054,359.0224,4,1); //  Manana
	AddStaticVehicle(419,1074.0203,-3302.1880,2.7475,88.5881,45,75); // Esperanto
	AddStaticVehicle(421,1102.2050,-3278.8181,2.8326,0.2987,4,1); // 	Washington
	AddStaticVehicle(422,1118.3502,-3289.3201,2.9361,181.3384,97,25); //Bobcat
	AddStaticVehicle(436,1187.4640,-3313.1799,2.9221,27.4600,87,1); // 	Previon
	AddStaticVehicle(445,1180.2156,-3327.6926,3.0172,184.4978,34,34); //Admiral
	AddStaticVehicle(463,1172.8900,-3365.8411,2.4682,147.9936,7,7); // 	Freeway
	AddStaticVehicle(474,1188.8279,-3361.2820,2.8686,358.1576,81,1); // Hermes
	AddStaticVehicle(478,1263.9362,-3389.9941,2.9336,90.8964,72,1); // 	Walton
	AddStaticVehicle(487,1252.8651,-3295.4475,6.0016,90.7393,29,42); // Maverick
	AddStaticVehicle(480,1147.4143,-3431.5120,2.7101,8.5036,12,12); // 	Comet
	//PLAYERS
	AddPlayerClass(84,2556.2981,6192.0996,16.3032,129.8821,4,1,0,0,0,0); // land 1
	AddPlayerClass(84,2210.9133,5899.3398,4.1753,308.5321,4,1,0,0,0,0);  // land 2
	AddPlayerClass(84,2119.5562,5463.1333,4.0000,298.2230,4,1,0,0,0,0);  // land 3
	AddPlayerClass(84,1147.4712,-3277.4033,2.9500,133.6188,4,1,0,0,0,0); // land 4
	//OBJECTS LAND 1
	CreateObject(4246,2481.8806,6205.0283,2.0,0,0,0);//			zand1 > 1
	CreateObject(4246,2730.1,6205.0283,2.0,0,0,0);//			zand2 > 1
	CreateObject(4246,2730.1,6006.6,2.0,0,0,0);//				zand3 > 1
	CreateObject(4246,2481.9,6006.6,2.0,0,0,0);//				zand4 > 1
	CreateObject(8390,2481.8806,6205.0283,0.9,0,0,50);//		garage
	CreateObject(4594,2667.4287,6250.8394,1.6079,0,0,180);//	bedrijf?
	CreateObject(5390,2579.0662,6470.6919,12.0,0,0,89);//		skate park
	CreateObject(11468,2579.0662,6302.0,0.8,0,4,230);//			brug na skate park
	CreateObject(5708,2631.4885,6168.3286,12.5,0,0,180);//		ziekenhuis
	CreateObject(6867,2683.2493,6182.0527,30.4,0,0,180);//		gebouwen
	CreateObject(4570,2643.0815,6067.7808,47.9,0,0,180);//		flat
	CreateObject(10952,2821.5549,6180.2266,13.8,0,0,270);//		shops
	CreateObject(7073,2494.6899,6122.4331,20.0000,0,0,150);//	man
	CreateObject(7584,2738.1157,6021.1743,52.0000,0,0,260);//	Hotel
	CreateObject(6907,2537.1790,5946.5195,1.6,0,0,260);//		Bedrijfjes
	//OBJECTS LAND 2
	CreateObject(11468,2300.7241,5966.7300,0.8,0,0,170);//			 brug
	CreateObject(4246,2087.6445,5899.2734,2.0,0,0,20);//			 zand7 > 2
	CreateObject(3487,2117.2278,5998.2441,8.6,0,0,20);//			 huis1
	CreateObject(3446,2138.2278,5998.2441,5.4,0,0,20);//			 huis2
	CreateObject(3485,2094.2278,5987.2441,8.9,0,0,20);//			 huis3
	CreateObject(3443,2067.2278,5965.2441,4.8,0,0,20);//			 huis4
	CreateObject(3483,2034.2278,5963.2441,8.8,0,0,20);//			 huis5
	CreateObject(3488,2000.2278,5952.2441,8.3,0,0,20);//			 huis6
	CreateObject(3484,1972.2278,5948.2441,8.6,0,0,20);//			 huis7
	CreateObject(3881,2205.7131,5927.6987,3.8,0,0,115);//			'doane'
	CreateObject(3881,2210.6479,5913.8823,3.8,0,0,295);//			'doane'
	doane = CreateObject(11327,2211.0725,5922.0127,3.9024,0,0,20);// poort
	doane2 = CreateObject(11327,2211.0725,5922.0127,7.9024,0,0,20);//poort
	CreateObject(11327,2211.0725,5922.0127,11.9024,0,0,20);//		 poort
	CreateObject(3267,2212.1943,5914.0786,4.8,0,0,50);//			 beveileging 1
	CreateObject(3267,2206.6531,5929.6689,4.8,0,0,100);//			 beveileging 2
	CreateObject(11438,2169.8022,5853.8467,1.8,0,0,10);//			 hok
	CreateObject(11438,2169.8022,5853.8467,3.8,0,0,10);//			 hok
	CreateObject(11438,2169.8022,5853.8467,4.8,0,0,10);//			 hok
	CreateObject(11438,2169.8022,5853.8467,7.8,0,0,10);//			 hok
	CreateObject(11438,2169.8022,5853.8467,9.8,0,0,10);//			 hok
	poort1 = CreateObject(11327,2137.9382,5846.8154,3.3,0,0,10);//	 poortvanhok
	poort2 = CreateObject(11327,2137.9382,5846.8154,7.3,0,0,10);//	 poortvanhok
	CreateObject(11327,2137.9382,5846.8154,11.3,0,0,10);//			 poortvanhok
	//OBJECTS LAND 3
	CreateObject(4246,2169.6399,5482.1221,2.0,0,0,20);// 		zand8 >3
	CreateObject(11468,2110.3562,5683.8452,0.8,0,0,80);//		brug
	CreateObject(10871,2171.6924,5429.4771,149.7,0,0,0);//		Flat1
	CreateObject(9919,2255.9302,5450.7041,48.7,0,0,0);//		Flat2
	CreateObject(10308,2087.2673,5519.6855,42.6690,0,0,0);//	Flat2
	CreateObject(9931,2096.5151,5450.3794,18.6627,0,0,30);//	gebouw
	//DM OBJECTS
	CreateObject(4246, 2168.772217, -3959.721924, 1.842857, 0, 0, 0);
	CreateObject(17324, 2147.141846, -3930.285645, 1.838520, 0, 0, 180);
	CreateObject(17074, 2099.012451, -3968.306885, 1.839714, 0, 0, 90);
	CreateObject(17061, 2152.011475, -3876.887207, 1.827326, 0, 0, 258.75);
	CreateObject(17059, 2145.504639, -3884.990479, 1.830495, 0, 0, 348.75);
	CreateObject(17054, 2231.035889, -3884.592529, 1.831081, 0, 0, 0);
	CreateObject(17039, 2224.112793, -3986.036133, 1.844391, 0, 0, 270);
	CreateObject(17000, 2165.527344, -3926.592285, 1.837130, 0, 0, 0);
	CreateObject(17000, 2228.044434, -3904.442383, 1.837130, 0, 0, 0);
	CreateObject(14873, 2204.700195, -3936.121582, 2.661708, 0, 0, 90);
	CreateObject(13367, 2195.421387, -3899.399658, 13.836744, 0, 0, 0);
	CreateObject(3419, 2192.789307, -4023.815674, 1.851491, 0, 0, 213.7501);
	CreateObject(3375, 2149.088135, -4022.007324, 6.426873, 0, 0, 180);
	CreateObject(17059, 2151.345459, -4003.002930, 1.830495, 0, 0, 0);
	CreateObject(17059, 2137.034912, -4004.261719, 1.830495, 0, 0, 0);
	CreateObject(16388, 2247.061768, -4019.032227, 2.436733, 0, 0, 269.9999);
	CreateObject(16359, 2119.284668, -3991.876953, 1.841908, 0, 0, 0);
	CreateObject(16138, 2169.374512, -3970.574463, 1.835839, 0, 0, 123.75);
	CreateObject(18235, 2090.623779, -4019.584229, 1.838855, 0, 0, 90);
	CreateObject(11458, 2086.452881, -3889.069336, 2.014811, 0, 0, 78.75);
	CreateObject(11457, 2076.543457, -3905.998535, 1.444077, 0, 0, 0);
	CreateObject(11459, 2093.064209, -3906.817139, 1.841034, 0, 0, 0);
	CreateObject(11457, 2095.917969, -3928.651855, 1.444077, 0, 0, 0);
	CreateObject(11458, 2077.834717, -3940.615967, 2.014809, 0, 0, 315);
	CreateObject(11446, 2097.534424, -3939.950195, 7.697105, 0, 0, 90);
	CreateObject(11442, 2106.332275, -3916.322754, 2.016609, 0, 0, 78.75);
	CreateObject(11440, 2074.661865, -3876.434814, 1.439774, 0, 0, 90);
	CreateObject(11427, 2112.846680, -3902.701416, 9.032718, 0, 0, 191.2499);
	CreateObject(11088, 2242.032959, -3944.158203, 8.599741, 0, 0, 90);
	CreateObject(3256, 2071.649902, -3998.319336, 2.105568, 0, 0, 0);
	//NEW COUNTRY
	CreateObject(4246, 1187.606567, -3372.812744, 1.937897, 0, 0, 0);

	CreateObject(8040, 1109.863281, -3293.526367, 2.715652, 0, 0, 0);

	//CreateObject(762, 1157.575684, -3304.711670, 7.961943, 0, 0, 0);
	CreateObject(17681, 1179.486694, -3345.151855, 2.117603, 0, 0, 180);
	CreateObject(17699, 1164.440918, -3330.656982, 6.576776, 0, 0, 0);
	CreateObject(17697, 1166.166626, -3346.911865, 6.571442, 0, 0, 90);
	CreateObject(18365, 1273.641235, -3395.127930, 10.827715, 0, 0, 135);
	CreateObject(1696, 1273.148071, -3321.291748, 2.945127, 0, 0, 180);
	CreateObject(16070, 1164.600342, -3369.539795, 7.803885, 0, 0, 180);
	CreateObject(10631, 1170.745239, -3405.229736, 6.583073, 0, 0, 303.75);
	CreateObject(5835, 1222.342651, -3339.802734, 9.820557, 0, 0, 180);
	CreateObject(11451, 1197.752930, -3306.514648, 1.937897, 0, 0, 22.5);
	CreateObject(1395, 1119.087036, -3433.127930, 34.468201, 0, 0, 0);
	CreateObject(1394, 1118.927856, -3433.164795, 87.007263, 0, 0, 337.5);
	CreateObject(1459, 1208.507813, -3389.301025, 2.755711, 0, 0, 270);
	CreateObject(1459, 1208.260254, -3393.024170, 2.571642, 0, 0, 90);
	CreateObject(1459, 1208.245728, -3396.393066, 2.551045, 0, 0, 90);
	CreateObject(1459, 1208.349121, -3400.171631, 2.553645, 0, 0, 270);
	CreateObject(1459, 1208.127930, -3404.042969, 2.723372, 0, 0, 90);
	CreateObject(974, 1066.778809, -3392.693115, 4.715637, 0, 0, 0);
	CreateObject(974, 1073.446167, -3392.741943, 4.715637, 0, 0, 0);
	CreateObject(974, 1080.121948, -3392.806396, 4.715637, 0, 0, 0);
	CreateObject(974, 1086.816406, -3392.894775, 4.715637, 0, 0, 0);
	CreateObject(974, 1093.495361, -3392.905273, 4.715637, 0, 0, 0);
	CreateObject(974, 1100.179321, -3392.876221, 4.715636, 0, 0, 0);
	CreateObject(974, 1106.865479, -3392.849365, 4.715637, 0, 0, 0);
	CreateObject(974, 1113.511719, -3392.868896, 4.715637, 0, 0, 0);
	CreateObject(974, 1120.230469, -3392.859131, 4.715636, 0, 0, 0);
	CreateObject(974, 1126.917847, -3392.818604, 4.715637, 0, 0, 0);
	CreateObject(974, 1133.631958, -3392.779785, 4.715637, 0, 0, 0);
	CreateObject(974, 1137.522217, -3396.073242, 4.715638, 0, 0, 281.25);
	CreateObject(974, 1138.835083, -3402.611816, 4.715637, 0, 0, 281.25);
	CreateObject(974, 1140.184082, -3409.192871, 4.715637, 0, 0, 281.25);

	CreateObject(988, 1141.265259, -3415.226074, 2.976959, 0, 0, 101.25);
	CreateObject(988, 1142.259277, -3420.597412, 2.976959, 0, 0, 101.25);

	CreateObject(974, 1143.551392, -3426.560547, 4.715637, 0, 0, 281.25);
	CreateObject(974, 1144.848999, -3433.111816, 4.715637, 0, 0, 281.25);
	CreateObject(974, 1146.138306, -3439.664307, 4.715637, 0, 0, 281.25);
	CreateObject(974, 1147.436768, -3446.248779, 4.715637, 0, 0, 101.25);
	CreateObject(974, 1148.739380, -3452.814941, 4.715637, 0, 0, 101.25);
	CreateObject(974, 1150.049805, -3459.352295, 4.715637, 0, 0, 101.25);
	CreateObject(974, 1151.399170, -3465.892334, 4.715637, 0, 0, 281.25);
	CreateObject(974, 1149.446777, -3470.952881, 4.715637, 0, 0, 33.75);
	CreateObject(2714, 1192.758423, -3310.614990, 5.589590, 0, 0, 281.25);
	CreateObject(3757, 1180.900146, -3369.762451, 6.885910, 0, 0, 270);
	CreateObject(7597, 1167.893066, -3367.069824, 19.850857, 0, 0, 258.75);
	CreateObject(1259, 1132.247192, -3176.559082, -95.924477, 0, 0, 89.9999);
	CreateObject(9190, 1176.287720, -3282.808594, 23.274330, 0, 0, 0);
	CreateObject(1259, 1175.328125, -3283.274902, 17.272205, 0, 0, 90);
	CreateObject(1431, 1117.994873, -3426.087646, 2.485510, 0, 0, 0);
	CreateObject(3566, 1087.879883, -3405.480957, 4.551515, 0, 0, 270);
	CreateObject(3568, 1086.728760, -3411.952637, 4.551515, 0, 0, 270);
	CreateObject(3502, 1094.758545, -3433.522949, 3.866537, 0, 0, 292.5);
	CreateObject(1689, 1163.590576, -3410.206543, 12.106451, 0, 0, 123.7499);
	CreateObject(9958, 1258.159790, -3477.517578, 5.552046, 0, 0, 270);
	CreateObject(3620, 1295.952026, -3470.120117, 15.033335, 0, 0, 0);
	CreateObject(16399, 1195.108887, -3421.465088, 3.154768, 0, 0, 180);
	CreateObject(1216, 1194.002930, -3319.658936, 2.926691, 0, 0, 281.25);
	CreateObject(1216, 1193.776367, -3318.679443, 2.927887, 0, 0, 281.25);
	CreateObject(1291, 1176.959717, -3336.731201, 2.731945, 0, 0, 90);
	CreateObject(18248, 1111.047485, -3412.767334,10.004425, 0, 0, 0);
	CreateObject(3864, 1097.787231, -3424.349854, 8.034923, 0, 0, 213.75);
	CreateObject(1243, 1148.003052, -3508.953125, -3.629771, 0, 0, 0);
	CreateObject(3407, 1174.129395, -3327.498047, 1.940730, 0, 0, 90);
	CreateObject(3407, 1174.292236, -3346.059570, 1.940730, 0, 0, 90);
	CreateObject(1569, 1170.773193, -3347.293213, 3.278918, 0, 0, 270);
	CreateObject(1569, 1169.370605, -3329.352051, 2.791768, 0, 0, 270);

	CreateObject(996, 1091.879395, -3293.318848, 2.870657, 0, 0, 0);
	CreateObject(996, 1100.919067, -3293.459717, 2.870657, 0, 0, 0);
	CreateObject(996, 1109.792236, -3293.448486, 2.870657, 0, 0, 0);
	CreateObject(996, 1119.382568, -3293.249268, 2.870657, 0, 0, 0);

	CreateObject(1412, 1149.320557, -3308.911621, 4.774378, 0, 0, 90);
	CreateObject(1412, 1146.715088, -3311.763428, 4.774379, 0, 0, 0);
	CreateObject(1412, 1141.417480, -3311.693604, 4.774379, 0, 0, 0);
	CreateObject(1412, 1136.142700, -3311.709473, 4.774379, 0, 0, 0);
	CreateObject(1412, 1130.857300, -3311.701172, 4.774379, 0, 0, 0);
	CreateObject(1412, 1125.580688, -3311.706543, 4.774379, 0, 0, 0);
	CreateObject(1412, 1120.083618, -3311.736328, 4.774379, 0, 0, 0);
	CreateObject(1412, 1114.791748, -3311.844727, 4.774379, 0, 0, 0);
	CreateObject(1412, 1109.450806, -3311.837402, 4.774379, 0, 0, 0);
	CreateObject(1412, 1104.178955, -3311.849609, 4.774379, 0, 0, 0);
	CreateObject(1412, 1098.828125, -3311.971191, 4.774379, 0, 0, 0);
	CreateObject(1412, 1093.602905, -3311.978271, 4.774379, 0, 0, 0);
	CreateObject(1412, 1088.442627, -3311.923096, 4.774379, 0, 0, 0);
	CreateObject(1412, 1083.292114, -3311.879639, 4.774379, 0, 0, 0);
	CreateObject(1412, 1078.030029, -3311.921143, 4.774379, 0, 0, 0);
	CreateObject(1412, 1072.817383, -3311.863770, 4.774379, 0, 0, 0);

	CreateObject(9241, 1252.048950, -3295.365479, 2.5, 0, 0, 0.0001);
	CreateObject(1234, 1193.714600, -3317.791260, 3.800989, 0, 0, 0);
	CreateObject(3454, 1205.498901, -3372.739014, 6.215469, 0, 0, 270);
	CreateObject(1337, 1171.058594, -3343.062744, 3.931605, 0, 0, 90);
	CreateObject(14553, 1865.926880, -2489.088379, 22.964590, 0, 0, 269.9999);
	CreateObject(1684, 1110.674927, -3452.814697, 3.527773, 0, 0, 281.25);
	CreateObject(3504, 1107.466309, -3439.389404, 3.280261, 0, 0, 0);
	CreateObject(3866, 1085.674927, -3447.543213, 9.776461, 0, 0, 90);

	//PICKUP DM
 	AddStaticPickup(355,2,2139.7505,-3869.8110,2.8430);
 	AddStaticPickup(342,2,2096.7236,-3939.9365,8.5222);
 	AddStaticPickup(349,2,2100.5703,-3966.9138,2.8429);
  	AddStaticPickup(352,2,2148.7070,-4023.8318,5.8907);
  	AddStaticPickup(342,2,2196.3076,-4028.3345,2.8515);
  	AddStaticPickup(352,2,2230.2654,-3959.2769,4.2560);
  	AddStaticPickup(336,2,2241.4155,-3884.1292,2.8429);
  	AddStaticPickup(357,2,2181.7156,-3955.0283,7.9870);
  	AddStaticPickup(348,2,2061.2190,-3880.7566,2.8429);
  	AddStaticPickup(338,2,2253.3140,-4011.5798,2.8429);
  	AddStaticPickup(349,2,2179.1226,-3966.1421,6.2396);
	return 1;
}

public Keys()
{
	new keys, updown, leftright, playerid;
	new Float:x, Float:y, Float:z, Float:angle;
	for (playerid = 0; playerid < MAX_PLAYERS; playerid++) {
	    if (IsPlayerConnected(playerid)) {
			GetPlayerKeys(playerid, keys, updown, leftright);
			if (keys & KEY_ACTION && IsPlayerInAnyVehicle(playerid)) {
				if (!keydown[playerid]) {
					keydown[playerid] = true;
					if (rampid[playerid] == -1) {
					    GetPlayerPos(playerid, x, y, z);
					    angle = GetXYInFrontOfPlayer(playerid, x, y, GetOptimumRampDistance(playerid));
					    switch (playerramptypes[playerid]) {
							case 2:
							{
					        angle -= 90.0;
					        if (angle < 0.0) angle += 360.0;
					        z += 0.5;
					        }
					        case 1:
					        {
					            z -= 0.5;
					        }
					    }
					    rampid[playerid] = CreateObject(ramptypes[playerramptypes[playerid]], x, y, z - 0.5, 0.0, 0.0, angle);
					    SetTimerEx("RemoveRamp", 2000, 0, "d", playerid);
				    }
			    }
			} else keydown[playerid] = false;
		}
	}
}

public OnGameModeExit()
{
	for (new i=0; i<MAX_PLAYERS; i++)
	{
		if (rampid[i] != -1) DestroyObject(rampid[i]);
	}
}

public time(){
TextDrawDestroy(Clock);
new hour,minute,second;
gettime(hour,minute,second);
new string[256];
if (minute <= 9){format(string,25,"%d:0%d",hour,minute);}
else {format(string,25,"%d:%d",hour,minute);}
TextDrawHideForAll(Clock);
Clock=TextDrawCreate(552,28,string);
TextDrawLetterSize(Clock,0.5,1.8);
TextDrawFont(Clock,2);
TextDrawBackgroundColor(Clock,15);
TextDrawSetOutline(Clock,1);
TextDrawShowForAll(Clock);
SetTimer("time",30000,0);
return 1;
}



SetupPlayerForClassSelection(playerid)
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
return 1;
}



public OnPlayerRequestClass(playerid, classid)
{
	SetupPlayerForClassSelection(playerid);
	printf("Classid: %d", classid);
	switch (classid) {
	    case 0:
	        {
				GameTextForPlayer(playerid, "~r~-Country 1-~n~ ~g~On Land 1 are ~n~~b~Buildings,~n~Skate Park,~n~Garage,~n~Cars.", 3000, 5);

			}
		case 1:
		    {
				GameTextForPlayer(playerid, "~r~-Country 1-~n~ ~g~On Land 2 are ~n~~b~Houses,~n~~w~Admin Zone,~n~~b~Cars.", 3000, 5);
			}
		case 2:
		    {
				GameTextForPlayer(playerid, "~r~-Country 1-~n~ ~g~On Land 3 are ~n~~b~Flats,~n~~b~Buildings,~n~~b~Cars.", 3000, 5);
			}
		case 3:
		    {
				GameTextForPlayer(playerid, "~r~ -Country 2- ~n~ ~g~On Land 4 is ~n~~b~Garage,~n~~b~Building,~n~~b~Cars.", 3000, 5);
			}
	}
	return 1;
}

public OnPlayerConnect(playerid)
{

	new name[MAX_PLAYER_NAME+1];
	new string[256];

	GetPlayerName(playerid, name, sizeof(name));

    format(string, 256, "%s has joined the Server.", name);
    SendClientMessageToAll(COLOR_WHITE, string);

  	SendClientMessage(playerid, COLOR_WHITE, "TYP '/commands' for the Command list!");
  	SendClientMessage(playerid, COLOR_WHITE, "TYP '/help' for Help!");

	return 1;
}

public OnPlayerDisconnect(playerid, reason) {

	new name[MAX_PLAYER_NAME+1];
	new string[256];
    GetPlayerName(playerid, name, 30);
    switch (reason) {
    case 0: format(string, 256, "%s has left the Server! (Timeout)", name);
	case 1: format(string, 256, "%s has left the Server! (Leaving)", name);
	case 2: format(string, 256, "%s has left the Server! (Kicked)", name);
    }
    SendClientMessageToAll(COLOR_WHITE, string);
    return 1;
}

public RemoveRamp(playerid)
{
	if (rampid[playerid] != -1) {
	DestroyObject(rampid[playerid]);
 	rampid[playerid] = -1;
	}
}

public OnPlayerSpawn(playerid)
{

	GameTextForPlayer(playerid,"	", 3000, 5);
 	SetPlayerInterior(playerid,0);
 	SetPlayerArmour(playerid,100);
 	GivePlayerMoney(playerid,5000);


	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
GivePlayerMoney(killerid,100);
return 1;
}

public kill(){
{
for (new i =0; i < MAX_PLAYERS; i++)
if(Dead[i]==1) {
new Float:x, Float:y, Float:z;
GetPlayerPos(i,x,y,z);
CreateExplosion(x,y,z,2,38);
CreateExplosion(x,y,z,2,38);
CreateExplosion(x,y,z,2,38);
CreateExplosion(x,y,z,2,38);
KillTimer(bomb);
Dead[i] = 0;
}
}
}

public Doane()
{
MoveObject(doane,2211.0725,5922.0127,3.9024,1);
MoveObject(doane2,2211.0725,5922.0127,7.9024,1);
KillTimer(DoanePort);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{

	new name[MAX_PLAYER_NAME+1];
	new string[256];
	new cmd[256];
    new idx;

 	cmd = strtok(cmdtext, idx);

	if(strcmp(cmd,"/open",true) == 0 && IsPlayerAdmin(playerid) == 1)    {
	MoveObject(poort1,2137.9382,5846.8154,12.3,1);
	MoveObject(poort2,2137.9382,5846.8154,12.3,1);
	return 1;
	}

	if(strcmp(cmd,"/close",true) == 0 && IsPlayerAdmin(playerid) == 1)    {
	MoveObject(poort1,2137.9382,5846.8154,4.3,1);
	MoveObject(poort2,2137.9382,5846.8154,8.3,1);
	return 1;
	}

 	if (strcmp("/up", cmdtext, true, 10) == 0){
	MoveObject(doane,2211.0725,5922.0127,11.9024,1);
	MoveObject(doane2,2211.0725,5922.0127,11.9024,1);
	DoanePort = SetTimer("Doane", 9000, 0);
	return 1;
	}

	if(strcmp(cmd, "/handsup", true) == 0) {
	if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
 	SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
	return 1;
	}
	}

 	if (strcmp("/help", cmdtext, true, 9) == 0)
	{
  	SendClientMessage(playerid, COLOR_WHITE, "HELP :");
  	SendClientMessage(playerid, COLOR_WHITE, "*This a Freeroam GameMode by Maikel van Haaren!");
  	SendClientMessage(playerid, COLOR_WHITE, "*TYP '/commands' for the Command list.");
  	SendClientMessage(playerid, COLOR_WHITE, "*You can download this GameMode on the SA:MP Forum!");
 	return 1;
	}
	if(strcmp(cmdtext, "/dm", true) == 0) {
 	new randomize=random(sizeof(DM));
  	SetPlayerPos(playerid, DM[randomize][0],DM[randomize][1],DM[randomize][2]);
  	SendClientMessage(playerid, COLOR_WHITE, "Kill all players! Good luck.");
	GetPlayerName(playerid, name, sizeof(name));
	format(string, sizeof(string), "%s has enter de Deathmacht Area!(/dm)", name);
 	SendClientMessageToAll(COLOR_WHITE, string);
 	ResetPlayerWeapons(playerid);
 	GivePlayerWeapon(playerid, 4 , 100);
	SetPlayerHealth(playerid,100);
	return 1;
    }
    
    if (strcmp("/version", cmdtext, true, 9) == 0)
	{
  	SendClientMessage(playerid, COLOR_WHITE, "VERSION :");
  	SendClientMessage(playerid, COLOR_WHITE, "*Klerekast Country 2.0 by Maikel van Haaren!");
 	return 1;
	}

	if (strcmp("/commands", cmdtext, true, 9) == 0)
	{
  	SendClientMessage(playerid, COLOR_WHITE, "COMMANDS :");
  	SendClientMessage(playerid, COLOR_WHITE, "*TYP '/dm' to go to the Deathmatch Area!");
  	SendClientMessage(playerid, COLOR_WHITE, "*TYP '/up' to open the gate at the other land!");
  	SendClientMessage(playerid, COLOR_WHITE, "*TYP '/kill' to kill yourself...");
  	SendClientMessage(playerid, COLOR_WHITE, "*TYP '/handsup' to give over yourself! ");
  	SendClientMessage(playerid, COLOR_WHITE, "*TYP '/version' if you want to check the version");
  	SendClientMessage(playerid, COLOR_RED, "*ADMIN : TYP '/admincommands' for the Admin Commands!");
 	return 1;
	}
	if(strcmp(cmd,"/admincommands",true) == 0 && IsPlayerAdmin(playerid) == 1)    {
	SendClientMessage(playerid, COLOR_RED, "*ADMIN : TYP '/open' to open the gate to the Admin Zone!");
  	SendClientMessage(playerid, COLOR_RED, "*ADMIN : TYP '/close' to close the gate to the Admin Zone!");
 	return 1;
	}

	if (strcmp("/kill", cmdtext, true, 9) == 0)
    {
 	bomb = SetTimer("kill", 3000, 0);
	if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
	ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0); // Place Bomb
	Dead[playerid] = 1;
	return 1;
	}
	}

	if (strcmp("/setramp ", cmdtext, true, 9) == 0)
	{
	new ramp = strval(cmdtext[9]);
	if (ramp < 0 || ramp >= sizeof(ramptypes)) {
	SendClientMessage(playerid, 0xFFFFFFAA, "Invalid ramp ID.");
	} else {
	playerramptypes[playerid] = ramp;
	}
	return 1;
	}

	return 0;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}
strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }

    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
Float:GetOptimumRampDistance(playerid)
{
	new ping = GetPlayerPing(playerid), Float:dist;
	dist = floatpower(ping, 0.25);
	dist = dist*4.0;
	dist = dist+5.0;
	return dist;
}
Float:GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
	new Float:a;
	GetPlayerPos(playerid, x, y, a);
	if (IsPlayerInAnyVehicle(playerid)) GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
	else GetPlayerFacingAngle(playerid, a);
	x += (distance * floatsin(-a, degrees));
	y += (distance * floatcos(-a, degrees));
	return a;
}