rendered paste body#include <a_samp>
#include <a_vehicles>
#include <core>
#include <float>
#include <a_players>
static gTeam[MAX_PLAYERS];
#pragma tabsize 0
#define TEAM_GREEN 1
#define TEAM_RED 2
#define TEAM_GREEN_COLOR 0x33AA33AA
#define TEAM_RED_COLOR 0x33AAFFFF
#define COLOR_RED 0xAA3333AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_YELLOW 0xFFFF00AA
forward SetPlayerToTeamColor(playerid);
forward SetupPlayerForClassSelection(playerid);
forward SetPlayerTeamFromClass(playerid,classid);
//======MAIN===========//
main()
{
print(" ");
print("===========================");
print(" Challenger ");
print(" 2007 ");
print(" Created by Charger ");
print(" Hosted by cosmoboss ");
print("===========================");
print(" ");
}
//=====OnGameModeInit=====//
public OnGameModeInit()
{
//======Gamemode=======//
SetGameModeText(".::YEAR 2150::.");
ShowPlayerMarkers(1);
ShowNameTags(1);
UsePlayerPedAnims();
SetWorldTime(23);
SetWeather(19);
//=======Vehicles======//
AddStaticVehicle(425,364.9576,2538.1501,17.2182,181.0086,43,0); // hunter
AddStaticVehicle(513,324.8747,2544.2292,17.3598,182.2311,21,36); // stunt plane
AddStaticVehicle(513,292.1323,2542.9595,17.3718,177.9999,21,34); //
AddStaticVehicle(520,366.6429,2462.6479,17.4372,5.6080,0,0); // hydra
AddStaticVehicle(520,356.2249,2463.1179,17.2076,4.7259,0,0); // hydra
AddStaticVehicle(520,342.8795,2466.7515,17.1994,2.4015,0,0); // hydra
AddStaticVehicle(542,404.3433,2539.8894,16.2888,146.3162,31,93); // sabre II
AddStaticVehicle(542,420.1806,2528.6917,16.3432,147.8641,32,92); // sabre II
AddStaticVehicle(542,425.7697,2528.6409,16.3563,151.7641,45,92); // sabre II
AddStaticVehicle(543,431.0904,2524.5159,16.3777,94.4477,43,8); //
AddStaticVehicle(548,383.1520,2538.0598,18.1518,181.2875,1,1); // cargo heli
AddStaticVehicle(510,407.3122,2537.7002,16.1405,141.6953,46,46); // bike
AddStaticVehicle(510,431.5775,2521.7087,16.0965,87.5030,39,39); // bike
AddStaticVehicle(511,245.7979,2534.4199,18.1033,178.3803,4,90); // plane
AddStaticVehicle(476,269.2019,2535.7397,17.4633,182.4934,7,6); // rustler
AddStaticVehicle(512,433.2635,2503.6169,16.7757,87.0798,15,123); // plane
AddStaticVehicle(514,539.0476,2355.7129,31.6091,80.3361,25,1); // truck
AddStaticVehicle(515,512.2472,2376.4736,31.2736,151.9510,63,78); // truck
AddStaticVehicle(517,527.1742,2370.1609,30.1784,126.3582,40,36); //
AddStaticVehicle(510,531.9662,2365.6992,30.0315,179.6852,6,6); //
AddStaticVehicle(508,500.7825,2382.8271,30.2611,119.2436,1,1); //
AddStaticVehicle(505,430.2448,2482.3384,16.6266,65.9869,120,123); //
AddStaticVehicle(500,430.0367,2488.5901,16.5979,86.0262,28,119); //
AddStaticVehicle(475,405.2192,2524.6812,16.2973,93.8882,17,1); //
AddStaticVehicle(471,384.2370,2598.5791,15.9652,224.3198,103,111); //
AddStaticVehicle(471,387.9341,2599.5537,15.9660,157.8328,74,91); //
AddStaticVehicle(470,419.2716,2459.0806,16.4943,53.9043,43,0); //
AddStaticVehicle(470,391.6121,2459.8704,16.4902,325.1528,43,0); //
AddStaticVehicle(432,405.0726,2455.1289,16.5122,2.5689,43,0); // rhino
AddStaticVehicle(525,392.4866,2540.9819,16.4009,173.2224,17,20); // tow truck
AddStaticVehicle(432,274.4795,2025.3164,17.6517,272.2466,43,0); // rhino
AddStaticVehicle(432,277.6894,1989.9244,17.6516,270.4437,43,0); //
AddStaticVehicle(432,276.5302,1956.3895,17.6513,268.8275,43,0); //
AddStaticVehicle(520,334.2356,1989.7039,18.5835,123.2269,0,0); //
AddStaticVehicle(520,339.0545,1976.7542,18.6005,115.6034,0,0); //
AddStaticVehicle(520,336.5583,1964.3494,18.3639,112.3810,0,0); //
AddStaticVehicle(520,340.3470,1953.2233,18.6033,101.8313,0,0); //
AddStaticVehicle(470,297.8289,2056.1165,17.6315,183.3877,43,0); //
AddStaticVehicle(470,302.1807,2056.5991,17.6346,180.1033,43,0); //
AddStaticVehicle(470,306.6725,2056.7290,17.6355,180.0507,43,0); //
AddStaticVehicle(470,311.0403,2056.3677,17.6324,178.2342,43,0); //
AddStaticVehicle(470,316.9416,2056.3816,17.6326,178.0695,43,0); //
AddStaticVehicle(433,356.4142,1924.6509,18.0774,83.7604,43,0); //
AddStaticVehicle(433,354.9381,1914.4277,18.0775,54.8513,43,0); //
AddStaticVehicle(433,354.3911,1905.7002,18.0773,103.2361,43,0); //
AddStaticVehicle(548,232.7182,1993.1624,19.4615,263.5441,1,1); //
AddStaticVehicle(425,233.4547,2014.8179,18.2291,245.5167,43,0); // hunter
AddStaticVehicle(425,232.5263,2029.3391,18.2218,264.2602,43,0); //
AddStaticVehicle(470,355.8701,1936.8549,17.6382,121.8655,43,0); //
AddStaticVehicle(470,356.8108,1931.4023,17.6326,78.8381,43,0); //
AddStaticVehicle(470,281.4855,1926.2040,17.6364,275.3124,43,0); //
AddStaticVehicle(470,280.2616,1935.8071,17.6228,249.6591,43,0); //
AddStaticVehicle(470,276.7150,2032.1545,17.6298,241.4461,43,0); //
AddStaticVehicle(470,276.0558,2014.4110,17.6334,306.8792,43,0); //
AddStaticVehicle(470,277.6739,1998.8442,17.6308,242.4978,43,0); //
AddStaticVehicle(470,277.9297,1981.1456,17.6337,298.2509,43,0); //
AddStaticVehicle(470,277.3730,1948.1038,17.6369,301.5678,43,0); //
AddStaticVehicle(470,275.8342,1965.5894,17.6368,243.4361,43,0); //
AddStaticVehicle(497,267.5801,2451.2913,16.6614,325.9846,0,1); //
AddStaticVehicle(497,257.7725,2461.7065,17.1930,323.2161,0,1); //
//=======Player Classes========//
AddPlayerClass(287,283.8770,2040.2675,17.6406,270.6496,0,0,0,0,0,0); // army skin and spawn point
AddPlayerClass(1,433.1370,2536.9805,16.2841,132.3699,0,0,0,0,0,0); // other spawn point
AddPlayerClass(73,433.1370,2536.9805,16.2841,132.3699,0,0,0,0,0,0); // other spawn point
AddPlayerClass(77,404.4810,2544.0149,16.5206,148.7102,0,0,0,0,0,0); // other spawn point
AddPlayerClass(78,404.4810,2544.0149,16.5206,148.7102,0,0,0,0,0,0); // other spawn point
AddPlayerClass(79,404.2318,2544.5796,16.5127,163.4604,0,0,0,0,0,0); // other spawn point
AddPlayerClass(101,377.4603,2590.7275,16.4844,317.6219,0,0,0,0,0,0); // other spawn point
AddPlayerClass(131,377.6710,2590.9583,16.4844,317.6219,0,0,0,0,0,0); // other spawn point
AddPlayerClass(134,377.6710,2590.9583,16.4844,317.6219,0,0,0,0,0,0); // other spawn point
AddPlayerClass(134,412.4034,2580.4309,16.3508,157.1937,0,0,0,0,0,0); // other spawn point
AddPlayerClass(135,412.4034,2580.4309,16.3508,157.1937,0,0,0,0,0,0); // other spawn point
AddPlayerClass(137,412.4034,2580.4309,16.3508,157.1937,0,0,0,0,0,0); // other spawn point
AddPlayerClass(161,411.4809,2578.4248,16.2396,155.3137,0,0,0,0,0,0); // other spawn point
AddPlayerClass(192,411.4809,2578.4248,16.2396,155.3137,0,0,0,0,0,0); // other spawn point
AddPlayerClass(192,432.3885,2540.9407,19.1066,112.7701,0,0,0,0,0,0); // other spawn point
AddPlayerClass(197,432.3885,2540.9407,19.1066,112.7701,0,0,0,0,0,0); // other spawn point
AddPlayerClass(201,432.3885,2540.9407,19.1066,112.7701,0,0,0,0,0,0); // other spawn point
AddPlayerClass(222,432.3885,2540.9407,19.1066,112.7701,0,0,0,0,0,0); // other spawn point
//========CreateObjects================//
CreateObject(3279,342.403,2539.542,15.853,0.0,0.0,0.0);
CreateObject(3279,319.901,2455.454,15.557,0.0,0.0,-247.500);
CreateObject(3271,270.225,2453.608,15.779,0.0,0.0,0.0);
CreateObject(3271,197.335,2579.771,15.602,0.0,0.0,-22.500);
CreateObject(3271,108.232,2455.507,15.779,0.0,0.0,-33.750);
CreateObject(3271,213.897,2456.788,15.779,0.0,0.0,33.750);
CreateObject(2035,415.798,2536.100,18.975,0.0,0.0,0.0);
CreateObject(2045,412.543,2536.560,18.241,0.0,0.0,0.0);
CreateObject(2057,420.061,2534.066,15.729,0.0,0.0,213.750);
CreateObject(2057,419.009,2535.152,15.738,0.0,0.0,213.750);
CreateObject(2057,418.560,2534.586,15.749,0.0,0.0,213.750);
CreateObject(2057,418.994,2533.815,15.735,0.0,0.0,0.0);
CreateObject(2060,322.018,2455.649,31.791,0.0,0.0,112.500);
CreateObject(2060,321.520,2456.685,31.791,0.0,0.0,-56.250);
CreateObject(2060,318.637,2453.936,31.791,0.0,0.0,112.500);
CreateObject(2060,318.149,2456.398,31.791,0.0,0.0,67.500);
CreateObject(2060,317.691,2455.494,31.791,0.0,0.0,112.500);
CreateObject(2060,318.056,2454.782,31.791,0.0,0.0,78.750);
CreateObject(2060,341.166,2537.880,32.087,0.0,0.0,-22.500);
CreateObject(2060,344.158,2541.282,32.087,0.0,0.0,135.000);
CreateObject(2060,432.274,2476.505,15.864,0.0,0.0,0.0);
CreateObject(2060,432.256,2476.516,16.180,0.0,0.0,0.0);
CreateObject(2060,432.097,2476.434,16.495,0.0,0.0,33.750);
CreateObject(2060,433.906,2476.469,16.411,0.0,0.0,0.0);
CreateObject(2060,433.892,2476.327,16.726,0.0,0.0,22.500);
CreateObject(2060,432.985,2476.262,16.726,0.0,0.0,-11.250);
CreateObject(2060,432.132,2476.416,16.811,0.0,0.0,-22.500);
CreateObject(2060,434.924,2476.519,16.436,0.0,0.0,45.000);
CreateObject(2060,434.936,2476.498,16.751,0.0,0.0,56.250);
CreateObject(2060,434.005,2476.627,17.041,0.0,0.0,11.250);
CreateObject(2060,434.835,2476.752,17.067,0.0,0.0,56.250);
CreateObject(2060,322.360,2454.469,31.791,0.0,0.0,67.500);
CreateObject(2060,321.686,2453.798,31.791,0.0,0.0,33.750);
CreateObject(2060,322.106,2454.969,31.791,0.0,0.0,-78.750);
CreateObject(2060,320.748,2453.264,31.791,0.0,0.0,22.500);
CreateObject(2060,319.634,2453.086,31.791,0.0,0.0,-11.250);
CreateObject(2060,321.681,2453.694,32.107,0.0,0.0,33.750);
CreateObject(2060,320.791,2453.180,32.107,0.0,0.0,11.250);
CreateObject(2060,321.684,2454.116,31.812,0.0,0.0,45.000);
CreateObject(2060,320.683,2453.526,31.791,0.0,0.0,22.500);
CreateObject(2060,322.148,2454.541,32.107,0.0,0.0,67.500);
CreateObject(2060,321.314,2453.787,32.128,0.0,0.0,33.750);
CreateObject(2060,319.914,2453.106,32.107,0.0,0.0,-11.250);
CreateObject(2060,320.578,2453.467,32.107,0.0,0.0,22.500);
CreateObject(2060,434.209,2476.899,16.258,0.0,0.0,0.0);
CreateObject(2060,433.484,2476.989,16.068,0.0,0.0,0.0);
CreateObject(2060,434.792,2477.082,16.573,0.0,0.0,56.250);
CreateObject(2060,434.529,2476.838,16.889,0.0,0.0,22.500);
CreateObject(2060,433.397,2476.766,16.405,0.0,0.0,0.0);
CreateObject(2060,433.308,2476.468,16.735,0.0,0.0,0.0);
CreateObject(2060,431.517,2476.110,15.722,0.0,0.0,-22.500);
CreateObject(2060,432.838,2476.770,16.103,0.0,0.0,0.0);
CreateObject(2060,431.256,2476.128,16.058,0.0,0.0,-45.000);
CreateObject(2060,431.923,2476.258,16.023,0.0,0.0,0.0);
CreateObject(2060,431.876,2476.152,16.339,0.0,0.0,-33.750);
CreateObject(2060,433.829,2476.254,16.219,0.0,0.0,0.0);
CreateObject(2060,432.947,2476.254,16.108,0.0,0.0,0.0);
CreateObject(745,263.018,2401.863,16.321,0.0,0.0,0.0);
CreateObject(745,259.827,2398.385,16.086,0.0,0.0,-78.750);
CreateObject(745,256.872,2396.975,16.077,0.0,0.0,-33.750);
CreateObject(748,253.664,2396.843,16.315,0.0,0.0,0.0);
CreateObject(745,375.899,2430.959,16.083,0.0,0.0,0.0);
CreateObject(745,360.851,2420.232,16.083,0.0,0.0,0.0);
CreateObject(745,358.961,2417.047,16.083,0.0,0.0,-45.000);
CreateObject(745,355.848,2414.349,16.083,0.0,0.0,90.000);
CreateObject(1303,212.683,2371.617,15.964,0.0,0.0,78.750);
CreateObject(1304,211.824,2372.806,16.412,0.0,0.0,78.750);
CreateObject(1304,213.300,2371.732,16.412,0.0,0.0,202.500);
CreateObject(1303,210.139,2372.817,15.964,0.0,0.0,0.0);
CreateObject(1303,355.578,2567.137,16.016,0.0,0.0,0.0);
CreateObject(1303,356.896,2567.711,16.014,0.0,0.0,56.250);
CreateObject(1303,355.698,2566.046,16.026,0.0,0.0,-146.250);
CreateObject(745,352.030,2576.717,16.083,0.0,0.0,0.0);
CreateObject(745,368.846,2470.511,16.083,0.0,0.0,-67.500);
CreateObject(745,364.457,2469.386,16.083,0.0,0.0,0.0);
CreateObject(745,367.205,2467.713,16.083,0.0,0.0,0.0);
CreateObject(1451,342.456,2612.661,16.312,0.0,0.0,45.000);
CreateObject(1452,346.063,2634.541,16.331,0.0,0.0,0.0);
CreateObject(1453,352.938,2617.301,16.029,0.0,0.0,0.0);
CreateObject(1457,373.234,2613.880,17.144,0.0,0.0,281.250);
CreateObject(1458,373.752,2618.028,15.738,0.0,0.0,-236.250);
CreateObject(3252,363.657,2617.758,15.657,0.0,0.0,0.0);
CreateObject(13367,404.014,2586.302,27.588,0.0,0.0,0.0);
CreateObject(14875,355.886,2614.285,16.302,0.0,0.0,0.0);
CreateObject(16404,356.379,2614.030,17.384,0.0,0.0,0.0);
CreateObject(980,231.386,2365.471,18.258,0.0,0.0,0.0);
CreateObject(983,240.382,2365.502,16.168,0.0,0.0,-90.000);
CreateObject(1228,244.779,2359.740,15.906,0.0,0.0,-90.000);
CreateObject(1228,241.306,2359.681,15.906,0.0,0.0,-90.000);
CreateObject(1282,237.819,2359.684,16.173,0.0,0.0,-90.000);
CreateObject(1407,245.983,2365.486,16.291,0.0,0.0,0.0);
CreateObject(1407,250.673,2365.343,16.291,0.0,0.0,0.0);
CreateObject(1407,255.224,2365.777,16.291,0.0,0.0,11.250);
CreateObject(1407,259.927,2366.717,16.291,0.0,0.0,11.250);
CreateObject(1407,264.319,2368.069,16.291,0.0,0.0,22.500);
CreateObject(1407,268.378,2370.347,16.291,0.0,0.0,33.750);
CreateObject(1410,272.475,2372.101,16.254,0.0,0.0,11.250);
CreateObject(1410,277.013,2372.634,16.254,0.0,0.0,0.0);
CreateObject(1410,281.582,2373.543,16.254,0.0,0.0,22.500);
CreateObject(1410,285.683,2375.784,16.254,0.0,0.0,33.750);
CreateObject(1410,289.457,2378.209,16.254,0.0,0.0,33.750);
CreateObject(1410,293.430,2380.528,16.254,0.0,0.0,22.500);
CreateObject(1410,297.614,2383.035,16.254,0.0,0.0,33.750);
CreateObject(1410,300.779,2386.247,16.254,0.0,0.0,56.250);
CreateObject(1413,304.220,2389.412,16.770,0.0,0.0,33.750);
CreateObject(1414,307.762,2391.714,16.564,0.0,0.0,33.750);
CreateObject(1413,311.636,2393.128,16.770,0.0,0.0,0.0);
CreateObject(1413,316.665,2393.540,16.769,0.0,0.0,0.0);
CreateObject(745,328.465,2399.734,16.075,0.0,0.0,0.0);
CreateObject(745,332.182,2402.636,16.075,0.0,0.0,-45.000);
CreateObject(745,365.824,2422.427,16.083,0.0,0.0,0.0);
CreateObject(1324,353.555,2408.690,16.969,0.0,0.0,-45.000);
CreateObject(1443,395.661,2537.690,16.177,0.0,0.0,0.0);
CreateObject(2599,430.458,2538.991,15.653,0.0,0.0,0.0);
CreateObject(2665,421.922,2540.148,15.928,0.0,0.0,90.000);
CreateObject(3410,474.239,2449.231,26.813,0.0,0.0,22.500);
CreateObject(6986,398.141,2585.793,28.291,0.0,0.0,-78.750);
CreateObject(1503,81.740,2467.656,15.878,0.0,0.0,90.000);
CreateObject(3364,64.259,2460.739,15.633,0.0,0.0,45.000);
CreateObject(13590,40.009,2446.751,17.852,0.0,0.0,-112.500);
CreateObject(11480,220.453,2559.718,17.561,0.0,0.0,90.000);
CreateObject(14826,379.477,2585.521,16.224,0.0,0.0,0.0);
CreateObject(936,372.575,2585.768,15.958,0.0,0.0,33.750);
CreateObject(937,370.416,2585.011,15.958,0.0,0.0,11.250);
CreateObject(1416,374.642,2586.314,16.049,0.0,0.0,-371.250);
CreateObject(1417,368.878,2588.356,15.754,0.0,0.0,33.750);
CreateObject(1645,367.483,2587.025,15.817,0.0,0.0,56.250);
CreateObject(1742,375.115,2591.100,15.480,0.0,0.0,-78.750);
CreateObject(1755,370.951,2609.231,15.486,0.0,0.0,-67.500);
CreateObject(1481,369.070,2609.690,16.188,0.0,0.0,0.0);
CreateObject(1738,343.178,2613.905,16.139,0.0,0.0,-33.750);
CreateObject(1748,370.377,2585.261,16.433,0.0,0.0,11.250);
CreateObject(1771,371.615,2595.547,16.118,0.0,0.0,0.0);
CreateObject(1514,372.467,2585.610,16.699,0.0,0.0,-168.750);
CreateObject(2495,391.968,2616.357,15.647,0.0,0.0,-78.750);
CreateObject(2228,435.579,2529.744,16.427,0.0,0.0,0.0);
CreateObject(2064,436.276,2477.636,17.131,0.0,0.0,0.0);
CreateObject(2064,376.415,2473.709,16.114,0.0,0.0,-22.500);
CreateObject(2064,373.817,2473.582,16.114,0.0,0.0,11.250);
CreateObject(2061,374.485,2474.473,15.776,0.0,0.0,0.0);
CreateObject(2061,374.297,2474.755,15.776,0.0,0.0,0.0);
CreateObject(2061,376.111,2474.244,15.776,0.0,0.0,0.0);
CreateObject(2061,375.752,2474.026,15.776,0.0,0.0,0.0);
CreateObject(2061,376.024,2475.052,15.776,0.0,0.0,0.0);
CreateObject(2061,376.373,2474.864,15.776,0.0,0.0,0.0);
CreateObject(2061,435.741,2477.927,16.603,0.0,0.0,0.0);
CreateObject(2061,435.506,2477.778,16.574,0.0,0.0,-22.500);
CreateObject(2061,435.794,2478.094,16.577,0.0,0.0,0.0);
CreateObject(2061,431.087,2476.529,15.776,0.0,0.0,0.0);
CreateObject(2044,431.361,2476.420,15.512,0.0,0.0,-112.500);
CreateObject(2036,431.666,2477.128,15.518,0.0,0.0,-56.250);
CreateObject(1636,435.793,2478.773,16.483,0.0,0.0,0.0);
CreateObject(1222,408.741,2589.276,16.390,0.0,0.0,0.0);
CreateObject(1222,410.131,2589.319,16.458,0.0,0.0,0.0);
CreateObject(1222,408.799,2587.850,16.349,0.0,0.0,0.0);
CreateObject(3057,410.295,2587.492,16.320,0.0,0.0,0.0);
CreateObject(3057,408.770,2586.658,16.221,0.0,0.0,-90.000);
CreateObject(3374,398.509,2611.740,17.268,0.0,0.0,0.0);
CreateObject(3425,185.881,2543.283,27.039,0.0,0.0,-22.500);
CreateObject(16776,196.439,2656.258,17.238,0.0,0.0,-67.500);
CreateObject(1222,376.941,2469.422,15.960,0.0,0.0,0.0);
CreateObject(1222,375.412,2469.170,15.960,0.0,0.0,0.0);
CreateObject(1222,375.573,2470.611,15.960,0.0,0.0,0.0);
CreateObject(1222,373.911,2468.819,15.960,0.0,0.0,0.0);
CreateObject(1222,373.994,2470.213,15.960,0.0,0.0,0.0);
CreateObject(1222,372.325,2468.190,15.960,0.0,0.0,0.0);
CreateObject(1222,376.629,2435.129,15.960,0.0,0.0,0.0);
CreateObject(1225,375.551,2434.438,15.890,0.0,0.0,0.0);
CreateObject(1225,374.413,2433.443,15.890,0.0,0.0,0.0);
CreateObject(1216,409.774,2541.934,16.202,0.0,0.0,-90.000);
CreateObject(849,431.625,2554.613,15.551,0.0,0.0,0.0);
CreateObject(851,431.028,2556.969,15.664,0.0,0.0,0.0);
CreateObject(852,429.704,2558.510,15.362,0.0,0.0,0.0);
CreateObject(853,431.838,2559.545,15.895,0.0,0.0,0.0);
CreateObject(853,433.862,2558.146,15.875,0.0,0.0,-56.250);
CreateObject(910,434.918,2567.146,16.636,0.0,0.0,-11.250);
CreateObject(852,436.765,2565.379,15.331,0.0,0.0,0.0);
return 1;
}
//==========OnPlayerConnect========//
public OnPlayerConnect(playerid)
{
new pName[30], string[256];
GetPlayerName(playerid, pName, 30);
format(string, 256, "Welcome %s", pName);
SendClientMessageToAll(COLOR_RED,string);
GivePlayerMoney(playerid,1000);
return 1;
}
//==========SetupPlayerForClassSelection======//
public SetupPlayerForClassSelection(playerid)
{
SetPlayerPos(playerid, -340.1041,2218.0769,42.4827);
SetPlayerFacingAngle(playerid, 120.0);
SetPlayerCameraPos(playerid, -344.0919,2216.4077,42.4835);
SetPlayerCameraLookAt(playerid, -344.0919,2216.4077,42.4835);
return 1;
}
//===========SetPlayerTeamFromClass=====//
public SetPlayerTeamFromClass(playerid,classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_GREEN;
}
else if(classid >= 1)
{
gTeam[playerid] = TEAM_RED;
}
return 1;
}
//=========SetPlayerToTeamColor==========//
public SetPlayerToTeamColor(playerid)
{
if(gTeam[playerid] == TEAM_GREEN)
{
SetPlayerColor(playerid,TEAM_GREEN_COLOR);
}
else if(gTeam[playerid] == TEAM_RED)
{
SetPlayerColor(playerid,TEAM_RED_COLOR);
}
}
//===========OnPlayerRequestClass=========//
public OnPlayerRequestClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid);
SetPlayerTeamFromClass(playerid,classid);
if(classid == 0){
GameTextForPlayer(playerid,"~g~The Army",2000,5);
}
else if(classid >= 1)
{
GameTextForPlayer(playerid,"~r~Survivors",2000,5);
}
return 1;
}
//===========OnPlayerSpawn===============//
public OnPlayerSpawn(playerid)
{
GameTextForPlayer(playerid,"~r~..::Chernobyl 2150::.. welcome to hell",1000,0);
SendClientMessage(playerid,COLOR_RED,"Type /help to see the available commands");
SetPlayerToTeamColor(playerid);
if(gTeam[playerid] == TEAM_GREEN)
{
new PlayerName[30], str[256];
GetPlayerName(playerid, PlayerName, 30);
format(str, 256, "%s Has spawned as Army", PlayerName);
SendClientMessageToAll(0x33AA33AA, str);
}
else if(gTeam[playerid] == TEAM_RED)
{
new PlayerName[30], str[256];
GetPlayerName(playerid, PlayerName, 30);
format(str, 256, "%s Has spawned as Survivor", PlayerName);
SendClientMessageToAll(0x33AAFFFF, str);
}
return 1;
}
//============OnPlayerCommandText==========//
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
////////
if(strcmp(cmd, "/help", true) == 0)
{
SendClientMessage(playerid,COLOR_RED,"======================================");
SendClientMessage(playerid,COLOR_RED,"Cernobyl.Year 2150");
SendClientMessage(playerid,COLOR_RED,"Type /objective to see what to do");
SendClientMessage(playerid,COLOR_RED,"Type /rules to see the rules");
SendClientMessage(playerid,COLOR_RED,"And dont forget,try to survive and respect the rules");
SendClientMessage(playerid,COLOR_RED,"======================================");
return 1;
}
////////
if(strcmp(cmd, "/objective", true) == 1)
{
SendClientMessage(playerid,COLOR_RED,"======================================");
SendClientMessage(playerid,COLOR_RED,"Stay alive");
SendClientMessage(playerid,COLOR_RED,"======================================");
return 1;
}
return 1;
}