Need Help
#1

First: My Englisch is not so good because i come from germany.

So this is my Problem:

Hello SAMP
I have a big problem.
I'm here to Game Mode downloaded from your side.
I've now made with an MTA DM Map. I have now with SAMP converted Converter. But in the game mode of you, there are two teams. Once again Ballas and Grove. I want to create now, if the example. a portet of the Grove / dm1 sets off on the right. If a Ballas portet to / dm1 it should link to a different position. If we die we to choose to stay with it until the map a different port.

This is the gamemode:
Код:
/*
*/
//--------------------------INCLUDES--------------------------------------------
#include <a_samp>
#include <utils>
#include <core>
#include <float>
//--------------------------PARAGMAS--------------------------------------------
// Tells Loose Indentation warnings to be quiet
#pragma tabsize 0

//--------------------------DEFINES---------------------------------------------
#define COLOR_BLUE 0x0000FFAA //0x0000FFAA
#define COLOR_GREEN 0x33AA33AA //0x33AA33AA
#define COLOR_RED 0xAA3333AA //0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA //0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA //0xFFFFFFAA
#define COLOR_BROWN 0x993300AA //0x993300AA
#define COLOR_ORANGE 0xFF9933AA //0xFF9933AA
#define COLOR_CYAN 0x99FFFFAA //0x99FFFFAA
#define COLOR_PINK 0xFF66FFAA //0xFF66FFAA
#define COLOR_BLACK 0x000000AA //0x000000AA
#define COLOR_LIGHTCYAN 0xAAFFCC33 //0xAAFFCC33
#define COLOR_LEMON 0xDDDD2357 //0xDDDD2357
#define COLOR_AQUA 0x7CFC00AA //0x7CFC00AA
#define COLOR_WHITEYELLOW 0xFFE87DFF //0xFFE87DFF
#define COLOR_BLUEAQUA 0x7E60FFFF //0x7E60FFFF
#define COLOR_DARKBLUE 0x15005EFF //0x15005EFF
#define COLOR_ALIEN 0x90FF87FF //0x90FF87FF
#define COLOR_GOLD 0xB8860BAA //0xB8860BAA
#define KICK_COLOR 0xFF0000FF //0xFF0000FF

#define MAX_SPAWNS 25
#define MAX_KILL_STRINGS 8

#define TEAM_BALLAS 1
#define TEAM_GROVE 2
//-----------------------------NEW----------------------------------------------
new Menu:bws;

new Grove;
new Ballas;

new ballasscore;
new grovescore;
new Text:scores;

new CreatedCars[100];
new CreatedCar = 0;

new Float:gRandomSpawn[MAX_SPAWNS][3] = {
	{589.8654,-2004.8679,9.2932}, // [1]
	{570.1117,-2008.3284,16.6976},
	{562.9705,-1950.4797,11.8608},
	{590.4459,-1951.2632,15.5216},
	{582.4764,-1966.1040,8.9915},
	{595.8607,-1965.8066,16.0005},
	{592.2352,-2017.8258,17.0152},
	{569.9879,-2012.2202,12.6230},
	{570.9584,-2067.0452,10.2086},
	{563.6376,-2111.9873,12.6772}, //[10]
	{525.7043,-2104.0359,12.6634},
	{551.2253,-2107.8394,16.2688},
	{554.1971,-2071.1941,13.9778},
	{553.9758,-2039.8016,13.9924},
	{539.6302,-2089.9365,9.5008},
	{528.9678,-2093.5444,15.7795},
	{552.9875,-2078.9551,9.5647},
	{564.8051,-2040.3418,14.6696},
	{579.9131,-2040.2048,14.6227},
	{569.3008,-2007.4692,19.9789}, //[20]
	{565.6253,-1990.3750,9.8018},
	{592.5919,-2004.6349,9.4236},
	{577.9435,-1972.3864,9.3655},
	{532.5810,-1949.1047,15.2619},
	{595.5600,-2110.0459,16.0525} //[25]
};

new gRandomKillString[MAX_KILL_STRINGS][256] = {
	"YOU ARE THE BOSS",
	"YOU OWNED THE NUB!",
	"YOU KILLED THAT SCRAP",
	"LUCKY? NAAAHHHH... OWNED!",
	"POOR LITTLE NUB OWNED BY YOU",
	"DIE BICTH!",
	"FUCK U ASSHOLE!!",
	"MUAHAHAHA, HE SUX"
};

//-----------------------------DEFINES------------------------------------------
#define COLOR_BALLAS 0x6F006FFF
#define COLOR_GROVE 0x008000FF
#define COLOR_VAGOS 0xFFFF00AA
#define COLOR_MOTOBIKERS 0x80400096
#define COLOR_LOS_AZTECAS 0x00E8E896
//-----------------------------FORWARDS-----------------------------------------
forward CheckForWalkingTeleport(playerid);
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
forward PlayerToPointStripped(Float:radi, playerid, Float:x, Float:y, Float:z, Float:curx, Float:cury, Float:curz);
forward IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy);

forward ScoreUpdate();
forward ScoreCheck(playerid);
//----------------------------NEW-----------------------------------------------
new gTeam[MAX_PLAYERS];

main()
{
	print("\n******************************************************");
	print("  |               Team DeathMatch                  |");
	print("  |                By Shorty_209                   |");
	print("  |                                                |");
	print("  **************************************************\n");
}



public OnGameModeInit()
{
	SetGameModeText("Team DeathMatch");
	ShowNameTags(1);
	AllowInteriorWeapons(1);
	ShowPlayerMarkers(1);
	SetWorldTime(0);
	DisableInteriorEnterExits();
	EnableTirePopping(1);

	bws = CreateMenu("Wдhle hier jetzt deine Waffe", 1, 10.0, 150.0, 420.0, 420.0);
	SetMenuColumnHeader(bws, 0, "Du bekommst alle Waffen + Leben und Panzer!");

	SetGameModeText("Team DeathMatch");
	SetTimer("AD",1800000,1); // 30 minutes
	SetTimer("Respawn",5000,0); // 5 sec

//-------------------------------------Ballas-----------------------------------
	AddPlayerClass(102,2168.3,-1673.4,15.0,92.857757,4,1,29,400,31,550);// Knife, SMG, M4
	AddPlayerClass(103,2168.3,-1673.4,15.0,92.857757,4,1,29,400,31,550);// Knife, SMG, M4
	AddPlayerClass(104,2168.3,-1673.4,15.0,92.857757,4,1,29,400,31,550);// Knife, SMG, M4
	AddStaticVehicle(470,559.2733,-1952.0898,12.5083,179.4265,0,0); // Patriot
	AddStaticVehicle(470,532.7758,-1949.8364,11.8269,178.3798,0,0); // Patriot
	AddStaticVehicle(470,539.1904,-1949.4664,11.8362,175.0149,0,0); // Patriot
	AddStaticVehicle(470,526.2460,-1950.1849,11.8220,188.9801,0,0); // Patriot
//	AddStaticVehicle(579, 2176.4, -1666.6, 15.0, 22.2873, 22, 0); //
//	Ballas = GangZoneCreate(2140.15, -1745.026, 2178.178, -1634.489);

//------------------------------------Grove-------------------------------------
	AddPlayerClass(105,2498.9,-1686.1,13.4,89.356460,8,1,24,160,30,550);// Katana, Deagle, AK-47
	AddPlayerClass(106,2498.9,-1686.1,13.4,89.356460,27,200,30,200,34,200);// Katana, Deagle, AK-47
	AddPlayerClass(107,2498.9,-1686.1,13.4,89.356460,27,200,31,200,34,200);// Katana, Deagle, AK-47
	AddStaticVehicle(470,589.0424,-2109.1121,12.6251,358.6809,0,0); // Patriot
	AddStaticVehicle(470,582.6147,-2108.5242,12.6232,358.8587,0,0); // Patriot
	AddStaticVehicle(470,595.1375,-2108.5154,12.6190,358.4992,0,0); // Patriot
	AddStaticVehicle(470,562.6476,-2106.9324,13.3025,1.7406,0,0); // Patriot
//	AddStaticVehicle(579, 2474.3,-1682.7,13.4, 52.2873, 86, 0); //
//	Grove = GangZoneCreate(2432.969, -1721.339, 2520.434, -1634.489);

//------------------------------------OBJECTS-----------------------------------
CreateObject(3938, 561.112671, -1951.853149, 11.615896, 0.0000, 0.0000, 270.0000);
CreateObject(3950, 560.976990, -1968.567017, 8.464075, 0.0000, 0.0000, 90.0000);
CreateObject(3925, 541.524475, -1986.898315, 7.669224, 0.0000, 0.0000, 270.0000);
CreateObject(3954, 549.593323, -2004.351074, 8.189592, 0.0000, 0.0000, 90.0000);
CreateObject(3953, 561.536011, -2001.023315, 9.791565, 0.0000, 0.0000, 90.0000);
CreateObject(3947, 561.610107, -2048.462891, 10.303734, 0.0000, 0.0000, 90.0000);
CreateObject(3955, 547.916260, -2018.975342, 10.756109, 0.0000, 0.0000, 90.0001);
CreateObject(3956, 548.6748046875, -2060.0009765625, 8.9006690979004, 0, 0, 90);
CreateObject(3952, 586.213501, -2016.234375, 10.309923, 0.0000, 0.0000, 90.0001);
CreateObject(3960, 561.1787109375, -2107.1513671875, 12.412830352783, 0, 0, 90);
CreateObject(3957, 571.182373, -2048.624268, 9.820345, 0.0000, 0.0000, 90.0000);
CreateObject(3949, 560.9111328125, -2046.4609375, 9.952374458313, 0, 0, 90);
CreateObject(3951, 561.894775, -2047.626343, 9.763923, 0.0000, 0.0000, 90.0000);
CreateObject(3940, 582.822876, -1951.566284, 13.942965, 0.0000, 0.0000, 270.0000);
CreateObject(3940, 540.630859375, -2108.1650390625, 14.708950042725, 0, 0, 90);
CreateObject(3939, 595.374512, -2109.800781, 13.271295, 0.0000, 0.0000, 90.0000);
CreateObject(3939, 588.875, -2109.9013671875, 13.282260894775, 0, 0, 90);
CreateObject(3939, 582.328308, -2109.792969, 13.253503, 0.0000, 0.0000, 90.0000);
CreateObject(3939, 526.279236, -1948.607788, 12.492882, 0.0000, 0.0000, 270.0000);
CreateObject(3939, 532.699585, -1948.709229, 12.480646, 0.0000, 0.0000, 270.0000);
CreateObject(3939, 539.065002, -1948.653809, 12.479512, 0.0000, 0.0000, 270.0000);
CreateObject(3928, 550.345459, -1951.192993, 10.857615, 0.0000, 0.0000, 270.0000);
CreateObject(3928, 571.805847, -2108.672363, 11.680286, 0.0000, 0.0000, 270.0000);
CreateObject(617, 573.483887, -1966.666138, 8.280373, 0.0000, 0.0000, 0.0000);
CreateObject(617, 583.856384, -1971.560791, 7.636303, 0.0000, 0.0000, 0.0000);
CreateObject(617, 574.503967, -1991.991699, 7.627930, 0.0000, 0.0000, 0.0000);
CreateObject(617, 528.089783, -1994.304321, 8.016336, 0.0000, 0.0000, 0.0000);
CreateObject(617, 561.403809, -2000.878296, 8.720648, 0.0000, 0.0000, 0.0000);
CreateObject(617, 542.455872, -1968.840332, 8.327536, 0.0000, 0.0000, 0.0000);
CreateObject(617, 542.099182, -2080.162354, 7.810326, 0.0000, 0.0000, 0.0000);
CreateObject(617, 577.202698, -2090.225098, 8.382119, 0.0000, 0.0000, 0.0000);
CreateObject(617, 525.895752, -2054.525879, 8.587517, 0.0000, 0.0000, 0.0000);
CreateObject(617, 588.456909, -2047.060791, 8.569311, 0.0000, 0.0000, 0.0000);
CreateObject(617, 541.106873, -2028.489380, 8.497049, 0.0000, 0.0000, 0.0000);
CreateObject(617, 588.148132, -2065.026367, 8.498741, 0.0000, 0.0000, 0.0000);
CreateObject(703, 566.440308, -1969.099487, 8.725647, 0.0000, 0.0000, 0.0000);
CreateObject(703, 585.856934, -1979.572510, 8.213259, 0.0000, 0.0000, 0.0000);
CreateObject(703, 551.925598, -2054.505127, 7.152491, 0.0000, 0.0000, 0.0000);
CreateObject(726, 533.822021, -1974.205566, 7.353572, 0.0000, 0.0000, 0.0000);
CreateObject(726, 596.724915, -2030.046631, 8.714499, 0.0000, 0.0000, 0.0000);
CreateObject(726, 572.406250, -2083.538086, 7.810239, 0.0000, 0.0000, 0.0000);
CreateObject(726, 528.692810, -2079.171387, 7.273188, 0.0000, 0.0000, 0.0000);
CreateObject(789, 539.496582, -2006.858765, 22.052298, 0.0000, 0.0000, 0.0000);
CreateObject(789, 554.776062, -1976.113647, 21.032299, 0.0000, 0.0000, 0.0000);
CreateObject(789, 594.007446, -2084.686523, 22.599688, 0.0000, 0.0000, 135.0000);
CreateObject(883, 567.239929, -2091.485840, 8.516470, 0.0000, 0.0000, 0.0000);
CreateObject(883, 554.781189, -2093.908447, 9.045039, 0.0000, 0.0000, 0.0000);
CreateObject(883, 553.461670, -2086.373779, 8.491624, 0.0000, 0.0000, 0.0000);
CreateObject(883, 542.188782, -2091.674072, 7.872862, 0.0000, 0.0000, 0.0000);
CreateObject(883, 530.274780, -2089.028564, 7.646307, 0.0000, 0.0000, 0.0000);
CreateObject(883, 533.603333, -2095.575684, 9.244079, 0.0000, 0.0000, 0.0000);
CreateObject(883, 578.563477, -2094.517578, 9.350552, 0.0000, 0.0000, 0.0000);
CreateObject(883, 567.873535, -2056.573730, 8.986070, 0.0000, 0.0000, 0.0000);
CreateObject(883, 575.172363, -2054.916016, 9.840181, 0.0000, 0.0000, 0.0000);
CreateObject(883, 559.752136, -2049.376221, 9.771438, 0.0000, 0.0000, 0.0000);
CreateObject(883, 593.655396, -1996.247314, 9.535412, 0.0000, 0.0000, 0.0000);
CreateObject(883, 575.050537, -2003.224609, 7.732629, 0.0000, 0.0000, 0.0000);
CreateObject(883, 562.676514, -2006.780640, 9.354144, 0.0000, 0.0000, 0.0000);
CreateObject(883, 583.201721, -1963.825317, 7.733326, 0.0000, 0.0000, 0.0000);
CreateObject(3279, 595.253662, -1965.742676, 7.322256, 0.0000, 0.0000, 270.0000);
CreateObject(3279, 593.2939453125, -2017.69140625, 6.8369655609131, 0, 0, 179.99450683594);
CreateObject(3279, 529.14453125, -2093.6484375, 5.3512859344482, 0, 0, 90);
CreateObject(3279, 566.7509765625, -2091.2265625, 5.9279594421387, 0, 0, 90);
CreateObject(3794, 558.873169, -2111.872070, 12.109752, 0.0000, 0.0000, 0.0000);
CreateObject(3794, 557.763000, -2107.476563, 12.084116, 0.0000, 0.0000, 0.0000);
CreateObject(3794, 570.381592, -2095.755127, 9.903333, 0.0000, 0.0000, 0.0000);
CreateObject(3794, 541.516724, -2096.342529, 8.961878, 0.0000, 0.0000, 0.0000);
CreateObject(3794, 538.497559, -2053.660889, 6.399271, 0.0000, 0.0000, 270.0000);
CreateObject(3794, 580.673218, -2018.263062, 6.324271, 0.0000, 0.0000, 236.2501);
CreateObject(3794, 544.242737, -1964.124512, 9.161944, 0.0000, 0.0000, 180.0000);
CreateObject(3794, 545.679260, -1967.879639, 9.021989, 0.0000, 0.0000, 180.0000);
CreateObject(3794, 566.844543, -1948.915649, 11.214919, 0.0000, 0.0000, 180.0000);
CreateObject(3794, 566.496704, -1951.983032, 11.218604, 0.0000, 0.0000, 180.0000);
CreateObject(3794, 566.242920, -1953.923584, 11.230088, 0.0000, 0.0000, 180.0000);
CreateObject(3794, 558.243958, -2102.160400, 11.897003, 0.0000, 0.0000, 180.0000);
CreateObject(3794, 557.572998, -2010.957397, 10.433899, 0.0000, 0.0000, 180.0000);
CreateObject(3795, 557.333801, -2019.216919, 12.166104, 0.0000, 7.7349, 348.7500);
CreateObject(3797, 594.402344, -1971.077271, 12.715886, 0.0000, 0.0000, 0.0000);
CreateObject(3797, 532.796692, -2091.131592, 12.689034, 0.0000, 0.0000, 0.0000);
CreateObject(16093, 539.929626, -2088.711914, 8.368015, 0.0000, 0.0000, 180.0001);
CreateObject(16093, 582.489136, -1966.405518, 7.858654, 0.0000, 0.0000, 0.0001);
CreateObject(3277, 551.394592, -1990.904053, 9.603471, 0.0000, 0.0000, 0.0000);
CreateObject(3277, 564.485535, -2049.780029, 10.081176, 0.0000, 0.0000, 0.0000);
CreateObject(16390, 570.070251, -2063.799316, 10.041633, 0.0000, 0.0000, 0.0000);
CreateObject(647, 564.542847, -2075.947266, 9.384300, 0.0000, 0.0000, 0.0000);
CreateObject(647, 551.996582, -2082.932373, 9.827908, 0.0000, 0.0000, 0.0000);
CreateObject(647, 528.766174, -2073.302246, 8.532166, 0.0000, 0.0000, 0.0000);
CreateObject(647, 557.201477, -2057.955566, 9.558879, 0.0000, 0.0000, 0.0000);
CreateObject(647, 562.491150, -2052.945801, 10.807871, 0.0000, 0.0000, 0.0000);
CreateObject(647, 560.929443, -2044.713379, 11.366983, 0.0000, 0.0000, 0.0000);
CreateObject(647, 566.291870, -2044.307617, 11.581107, 0.0000, 0.0000, 0.0000);
CreateObject(647, 569.931763, -2048.650879, 11.499413, 0.0000, 0.0000, 0.0000);
CreateObject(647, 587.600586, -2047.815918, 10.269753, 0.0000, 0.0000, 0.0000);
CreateObject(647, 594.607361, -2053.009521, 10.526480, 0.0000, 0.0000, 0.0000);
CreateObject(647, 587.643738, -2053.970459, 10.167800, 0.0000, 0.0000, 0.0000);
CreateObject(647, 580.293640, -2048.432129, 10.712368, 0.0000, 0.0000, 0.0000);
CreateObject(647, 575.723083, -2038.949585, 13.781589, 0.0000, 0.0000, 0.0000);
CreateObject(647, 591.338745, -2090.436279, 10.466485, 0.0000, 0.0000, 0.0000);
CreateObject(647, 589.894897, -2095.705322, 11.139527, 0.0000, 0.0000, 0.0000);
CreateObject(647, 574.532898, -2091.481445, 10.000421, 0.0000, 0.0000, 0.0000);
CreateObject(647, 537.056274, -2095.320557, 9.885614, 0.0000, 0.0000, 0.0000);
CreateObject(647, 528.216797, -2060.795410, 10.611395, 0.0000, 0.0000, 0.0000);
CreateObject(647, 533.473145, -2051.638184, 9.503716, 0.0000, 0.0000, 0.0000);
CreateObject(647, 542.493225, -2049.875732, 8.958524, 0.0000, 0.0000, 0.0000);
CreateObject(647, 548.021851, -2027.124390, 10.723510, 0.0000, 0.0000, 0.0000);
CreateObject(647, 531.735352, -2030.836914, 10.206479, 0.0000, 0.0000, 0.0000);
CreateObject(647, 535.154724, -2024.812378, 10.416726, 0.0000, 0.0000, 0.0000);
CreateObject(647, 539.959167, -2029.311890, 10.457252, 0.0000, 0.0000, 0.0000);
CreateObject(647, 593.928589, -1996.326416, 11.055032, 0.0000, 0.0000, 0.0000);
CreateObject(647, 575.131104, -2001.883789, 9.285214, 0.0000, 0.0000, 0.0000);
CreateObject(647, 559.985046, -2008.973877, 10.999925, 0.0000, 0.0000, 0.0000);
CreateObject(647, 566.788635, -2009.778320, 10.419000, 0.0000, 0.0000, 0.0000);
CreateObject(647, 575.530579, -1976.136108, 9.325068, 0.0000, 0.0000, 0.0000);
CreateObject(647, 588.441589, -1997.015503, 9.997928, 0.0000, 0.0000, 0.0000);
CreateObject(647, 581.713989, -1997.736938, 7.720599, 0.0000, 0.0000, 0.0000);
CreateObject(647, 580.556213, -2007.357056, 8.938664, 0.0000, 0.0000, 0.0000);
CreateObject(973, 566.663940, -2011.270752, 8.521144, 0.0000, 0.0000, 225.0000);
CreateObject(973, 573.803040, -2005.696289, 8.581427, 0.0000, 0.0000, 146.2501);
CreateObject(973, 551.098206, -1960.580688, 10.500163, 0.0000, 0.0000, 180.0000);
CreateObject(973, 551.755188, -2078.329102, 9.200674, 0.0000, 0.0000, 11.2500);
CreateObject(973, 566.031494, -2059.260986, 9.734434, 0.0000, 0.0000, 348.7500);
CreateObject(3666, 575.333496, -2104.747314, 11.930273, 0.0000, 0.0000, 0.0000);
CreateObject(3666, 575.180786, -2112.444092, 11.998516, 0.0000, 0.0000, 0.0000);
CreateObject(3666, 568.181580, -2112.480957, 12.084705, 0.0000, 0.0000, 0.0000);
CreateObject(3666, 568.229370, -2104.777344, 12.040691, 0.0000, 0.0000, 0.0000);
CreateObject(3666, 546.676575, -1954.981079, 11.225929, 0.0000, 0.0000, 0.0000);
CreateObject(3666, 546.959595, -1947.409668, 11.297726, 0.0000, 0.0000, 0.0000);
CreateObject(3666, 553.717834, -1947.279907, 11.253830, 0.0000, 0.0000, 0.0000);
CreateObject(3666, 553.761292, -1954.994873, 11.210799, 0.0000, 0.0000, 0.0000);
CreateObject(3399, 584.746399, -1947.377930, 12.247583, 0.0000, 0.0000, 0.0000);
CreateObject(3399, 543.015869, -2103.070557, 12.956876, 0.0000, 0.0000, 0.0000);
CreateObject(4106, 555.078247, -2067.870850, 11.461760, 0.0000, 0.0000, 0.0000);
CreateObject(4106, 569.179382, -1998.960815, 10.095961, 0.0000, 0.0000, 180.0000);
CreateObject(4882, 569.841003, -2008.334351, 13.728895, 0.0000, 0.0000, 270.0000);
CreateObject(3933, 564.7763671875, -2029.9609375, 13.458614349365, 0, 0, 270);
CreateObject(971, 599.30889892578, -2114.2329101563, 16.540943145752, 0, 0, 0);
CreateObject(971, 590.74035644531, -2114.2133789063, 16.560606002808, 0, 0, 0);
CreateObject(971, 582.26336669922, -2114.19921875, 16.56192779541, 0, 0, 0);
CreateObject(971, 573.5146484375, -2114.2268066406, 16.549234390259, 0, 0, 0);
CreateObject(971, 565.10931396484, -2114.1889648438, 16.521068572998, 0, 0, 0);
CreateObject(971, 556.24475097656, -2114.1958007813, 16.55214881897, 0, 0, 0);
CreateObject(971, 547.51263427734, -2114.1804199219, 16.571348190308, 0, 0, 0);
CreateObject(971, 538.88482666016, -2114.19140625, 16.531183242798, 0, 0, 0);
CreateObject(971, 530.07702636719, -2114.2124023438, 16.536348342896, 0, 0, 0);
CreateObject(971, 521.39721679688, -2114.248046875, 16.524606704712, 0, 0, 0);
CreateObject(5821, 535.22625732422, -2104.1359863281, 13.061882019043, 0, 0, 0);//10.458614
//--------------------------------STATICPICKUPS---------------------------------
	AddStaticPickup(1239, 2, 552.3380,-2104.5674,12.6403); // HQ
	AddStaticPickup(1239, 2, 238.7097,140.8174,1003.0234); // HQ EXIT
	
	AddStaticPickup(1239, 2, 571.2656,-1955.4629,11.8353); // HQ2
	
//-------------------------------WEAPONPICKUPS----------------------------------
	AddStaticPickup(360, 2, 257.6537,186.3847,1008.1719); // HQ
	AddStaticPickup(360, 2, 262.7082,186.1601,1008.1719); // HQ EXIT
	AddStaticPickup(360, 2, 252.2762,185.0578,1008.1719); // HQ
	AddStaticPickup(362, 2, 245.9617,186.3305,1008.1719); // HQ EXIT
	AddStaticPickup(362, 2, 191.1988,158.8338,1003.0234); // HQ

	
	print("  Team Deathmath lдdt!");
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerTeamFromClass(playerid, classid);
    return 1;
}

public ScoreUpdate()
{
	new string[100];
	TextDrawHideForAll(Text:scores);
	format(string,sizeof(string),"~b~Ballas: %d ~r~Grove: %d", ballasscore,grovescore);
	scores = TextDrawCreate(100.0, 410.0,string);
	TextDrawTextSize(scores,600.0, -4.0);
	TextDrawSetOutline(scores,1);
	TextDrawSetShadow(scores,1);
	TextDrawShowForAll(Text:scores);
}

forward SetPlayerTeamFromClass(playerid,classid);
public SetPlayerTeamFromClass(playerid, classid)
{
	switch(classid)
	{
	    case 0..2:
	    {
		    GameTextForPlayer(playerid, "~p~Ballas Team", 1500, 6);
		    SetPlayerInterior(playerid,0);
		    SetPlayerPos(playerid,540.3209,-2090.8428,9.4930);
		    SetPlayerFacingAngle(playerid, 349.3210);//349.3210
		    SetPlayerCameraPos(playerid, 541.5538,-2087.1614,9.5008);
		    SetPlayerCameraLookAt(playerid, 540.3209,-2090.8428,9.4930);
		    gTeam[playerid] = TEAM_BALLAS;
		    SetPlayerTeam(playerid,1);
		    ApplyAnimation(playerid,"GANGS","DEALER_DEAL",4.1,1,1,1,1,1);
		    PlayerPlaySound(playerid, 1098, 0.0, 0.0, 0.0);
		 }
		 case 3..5:
		 {
		    GameTextForPlayer(playerid, "~g~~h~Grove Team", 1500, 6);
		    SetPlayerInterior(playerid,0);
		    SetPlayerPos(playerid,582.1440,-1964.2706,9.0387);
		    SetPlayerFacingAngle(playerid, 180.2643);//180.2643
		    SetPlayerCameraPos(playerid, 580.0731,-1967.6215,8.9915);
		    SetPlayerCameraLookAt(playerid, 582.1440,-1964.2706,9.0387);
		    gTeam[playerid] = TEAM_GROVE;
		    SetPlayerTeam(playerid,2);
		    ApplyAnimation(playerid,"GANGS","DEALER_IDLE",4.1,1,1,1,1,1);
      		PlayerPlaySound(playerid, 1068, 2360.519775, -1131.397949, 1050.875000);
//		    PlayerPlaySound(playerid, 1098, 0.0, 0.0, 0.0);
		}
	}
}


public OnPlayerConnect(playerid)
{
	new s[128];
	new name[MAX_PLAYER_NAME];
//	if (GetPlayerState(playerid) == 1) CheckForWalkingTeleport(playerid); // IF THE PLAYER IS IN A TELEPORT ZONE, TELEPORT THEM
	TextDrawShowForAll(Text:scores);
	GetPlayerName(playerid,name,sizeof(name));
	SendClientMessage(playerid,COLOR_WHITE," ");
	format(s,sizeof(s),"Willkommen auf unseren Server %s.",name);
	SendClientMessage(playerid,COLOR_RED,s);
	SendClientMessage(playerid,COLOR_WHITE," ");
	SetPlayerScore(playerid,5);
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	new string[256];
	format(string,sizeof(string),"%s hat den Server verlassen.",playerid);
	SendClientMessageToAll(0xF58554FF,string);
    return 1;
}


public OnPlayerSpawn(playerid)
{
	new spawnid = random(MAX_SPAWNS);
	ResetPlayerMoney(playerid);
	GivePlayerMoney(playerid, 15000);
	SetPlayerPos(playerid, gRandomSpawn[spawnid][0], gRandomSpawn[spawnid][1], gRandomSpawn[spawnid][2]);
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,sizeof(name));
	new string[128];
	if(GetPlayerScore(playerid) < 0)
	{
	    format(string,sizeof(string),"Ha ha ha, %s ist ein Anfдnger %d Punkte.",name,GetPlayerScore(playerid));
	    SendClientMessageToAll(COLOR_GOLD,string);
	}
 	if ( gTeam[playerid] == TEAM_BALLAS) {
	SendClientMessage(playerid, COLOR_YELLOW, "DU gehцrst nun zu den Terroristen, benutz /pm [ID] [NACHRICHT] um mit anderen zu Reden");
	SendClientMessage(playerid, COLOR_YELLOW, "Viel SpaЯ! Achja kein Hacken bzw. Cheaten!");
	}
	else if ( gTeam[playerid] == TEAM_GROVE) {
	SendClientMessage(playerid, COLOR_YELLOW, "Du gehцrst nun zu den Anti-Terroristen, benutz /pm [ID] [NACHRICHT] um mit anderen zu Reden");
	SendClientMessage(playerid, COLOR_YELLOW, "Viel SpaЯ! Achja kein Hacken bzw. Cheaten!");
	}
    GangZoneShowForPlayer(playerid, Grove, 0x00800096);
    GangZoneShowForPlayer(playerid, Ballas, 0x5E005E96);
	SetPlayerArmour(playerid,100);
	SetPlayerToTeamColor(playerid);
	return 1;
}

forward SetPlayerToTeamColor(playerid);
public SetPlayerToTeamColor(playerid)
{
    if (gTeam[playerid] == TEAM_BALLAS) //|| GetPlayerTeam(playerid) == 1)
    {
        SetPlayerColor(playerid, COLOR_BALLAS);
        SetPlayerInterior(playerid,0);
    }
    else if (gTeam[playerid] == TEAM_GROVE) //|| GetPlayerTeam(playerid) == 2)
    {
        SetPlayerColor(playerid, COLOR_GROVE);
        SetPlayerInterior(playerid,0);
    }
}

public OnPlayerDeath(playerid, killerid, reason)
{
	new tmp[256];
	SendDeathMessage(killerid, playerid, reason);
	SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
	SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
//	GivePlayerMoney(GetPlayerMoney(killerid) + 5000);
	ResetPlayerWeapons(playerid);
	ResetPlayerMoney(playerid);
	format(tmp, 256, "~r~%s~n~~w~Du hast %s~n~~y~+ $%d gekillt", gRandomKillString[random(MAX_KILL_STRINGS)]);
	GameTextForPlayer(killerid, tmp, 5000, 6);
	if(killerid == TEAM_BALLAS)
	{
	ballasscore += 1;
	}

	if(killerid == TEAM_GROVE)
	{
	grovescore += 1;
	}
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	new string[256];
	new tmp[256],cmd[256],idx;
	new giveplayer[MAX_PLAYER_NAME];
	new sendername[MAX_PLAYER_NAME];
	new giveplayerid;
	cmd = strtok(cmdtext, idx);
	if(!strcmp(cmdtext,"/help",true))
	{
	    SendClientMessage(playerid,COLOR_GREEN,"**TDM** ----Team Deathmatch Befehle----");
	    SendClientMessage(playerid,COLOR_WHITE,"-------------------------------------------------");
	    SendClientMessage(playerid,COLOR_WHITE,"**TDM** /kill /meinscore /team /meinteam");
	    SendClientMessage(playerid,COLOR_WHITE,"**TDM** /enter /exit /enter2 /exit2");
	    SendClientMessage(playerid,COLOR_WHITE,"-------------------------------------------------");
		if (IsPlayerAdmin(playerid))
		{
			SendClientMessage(playerid, COLOR_RED, "*** ADMIN *** /admin");
		}
	    return 1;
	}
	if(!strcmp(cmdtext,"/admin",true))
	{
	    SendClientMessage(playerid,COLOR_GREEN,"**TDM** ----Team Deathmatch Admin Befehle----");
	    SendClientMessage(playerid,COLOR_WHITE,"-------------------------------------------------");
	    SendClientMessage(playerid,COLOR_WHITE,"**TDM** /kill /myscore /team ");
	    SendClientMessage(playerid,COLOR_RED,"**TDM** /ad /setscore /kick - Nur fьr Admins");
	    SendClientMessage(playerid,COLOR_RED,"**TDM** /veh /ban - Nur fьr Admins");
	    SendClientMessage(playerid,COLOR_WHITE,"-------------------------------------------------");
        return 1;
	}
    if(strcmp(cmdtext, "/enter", true, 6) == 0)
	{
		if(PlayerToPoint(3, playerid, 552.3380,-2104.5674,12.6403)) //  hq enterance
		{
		    SetPlayerInterior(playerid, 3); // This is important! This sets player to interior id 3!
		    SetPlayerPos(playerid, 288.7460,169.3510,1007.1719); // these are coordinates where he'll spawn (PD INT)
		    return 1;
		}
		return 1;
  	}
 	if (strcmp(cmdtext, "/exit", true, 5) == 0)
  	{
        if(PlayerToPoint(3, playerid, 238.7097,140.8174,1003.0234)) // Police enterance
	    {
	        SetPlayerInterior(playerid, 0);  // this is important..interior 0 is outside...
	        SetPlayerPos(playerid, 552.3380,-2104.5674,12.6403); // this is where player will stand...
	        return 1;
	    }
		return 1;
    }
    
   	if(strcmp(cmdtext, "/enter2", true, 6) == 0)
	{
		if(PlayerToPoint(3, playerid, 571.2656,-1955.4629,11.8353)) //  hq enterance
		{
		    SetPlayerInterior(playerid, 6); // This is important! This sets player to interior id 3!
		    SetPlayerPos(playerid, 1552.3231,-1674.6780,16.1953); // these are coordinates where he'll spawn (PD INT)
		    return 1;
		}
		return 1;
  	}
 	if (strcmp(cmdtext, "/exit2", true, 5) == 0)
  	{
        if(PlayerToPoint(3, playerid, 1552.3231,-1674.6780,16.1953)) // Police enterance
	    {
	        SetPlayerInterior(playerid, 0);  // this is important..interior 0 is outside...
	        SetPlayerPos(playerid, 571.2656,-1955.4629,11.8353); // this is where player will stand...
	        return 1;
	    }
		return 1;
    }
	if(strcmp(cmdtext, "/waffen", true) == 0) {
    	ShowMenuForPlayer(bws, playerid);
    	TogglePlayerControllable(playerid,false);
		SetPlayerArmour(playerid, 9999999999);
    	return 1;
	}

 	if(strcmp(cmd,"/b",true)==0) {//Bomb
		if (gTeam[playerid] == TEAM_BALLAS) {
		new Float:X,Float:Y,Float:Z;
		GetPlayerPos(playerid,X,Y,Z);
		CreateExplosion(X,Y,Z,6,40.0);
		SetPlayerHealth(playerid, 0.0);
		GameTextForPlayer(playerid,"~r~Bring den um!!!",2500,5);
		} else { SendClientMessage(playerid, COLOR_RED, "Du hast einen Selbstmord begangen!!!");}
		return 1;
	}
	
	if(strcmp(cmd,"/b",true)==0) {//Bomb
		if (gTeam[playerid] == TEAM_GROVE) {
		new Float:X,Float:Y,Float:Z;
		GetPlayerPos(playerid,X,Y,Z);
		CreateExplosion(X,Y,Z,6,40.0);
		SetPlayerHealth(playerid, 0.0);
		GameTextForPlayer(playerid,"~r~Bring den um!!!",2500,5);
		} else { SendClientMessage(playerid, COLOR_RED, "Das kцnnen nur die Ballas!!!");}
		return 1;
	}
	
    if (!strcmp("/kill", cmdtext, true))
    {
        SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
        SetPlayerHealth(playerid,0);
        return 1;
    }
    if (!strcmp(cmdtext,"/meinscore",true))
    {
        new s = GetPlayerScore(playerid);
        format(string,sizeof(string),"Dein Score ist %d.",s);
		SendClientMessage(playerid,COLOR_GOLD,string);
		return 1;
	}
	if(!strcmp(cmdtext,"/meinteam",true) || !strcmp(cmdtext,"/meinteam",true))
	{
	    new team[20];
	    if(gTeam[playerid] == 1)
	    {
	        team = "Ballas";
	    }
	    else if(gTeam[playerid] == 2)
	    {
	        team = "Grove";
	    }
	    else return SendClientMessage(playerid,COLOR_GOLD,"Fehler: Du hast noch kein Team gewдhlt.");
	    format(string,sizeof(string),"Du bist im %s Team.",team);
	    if(gTeam[playerid] == 1) SendClientMessage(playerid,COLOR_BALLAS,string);
	    else if(gTeam[playerid] == 2) SendClientMessage(playerid,COLOR_GROVE,string);
	    else if(gTeam[playerid] == 3) SendClientMessage(playerid,COLOR_VAGOS,string);
	    else if(gTeam[playerid] == 4) SendClientMessage(playerid,COLOR_MOTOBIKERS,string);
	    else if(gTeam[playerid] == 5) SendClientMessage(playerid,COLOR_LOS_AZTECAS,string);
	    else SendClientMessage(playerid,COLOR_WHITE,string);
		return 1;
	}
	
	if(!strcmp(cmd, "/setscore", true))
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "Benutz: /setscore [ID] [SCORE]");
				return 1;
			}
			new playa,score;
			playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); score = strval(tmp);
			if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_WHITE,"Du bist nicht als Admin eingeloggt.");
		    if(IsPlayerConnected(playa))
		    {
		        if(playa != INVALID_PLAYER_ID)
		        {
					GetPlayerName(playa, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* Du hast %s Score in %d umgeдndert!",giveplayer,score);
					SendClientMessage(playerid, COLOR_GOLD, string);
					format(string, sizeof(string), "* %s setz dein Score %d !", sendername, score);
					SendClientMessage(playa, COLOR_GOLD, string);
					SetPlayerScore(playa,score);
				}
			}
			else return SendClientMessage(playerid,COLOR_WHITE,"Den Spieler gibt es nicht.");
		}
		return 1;
	}

	if(!strcmp(cmd, "/kick", true))
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "Benutz: /kick [ID] [Grund]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if (IsPlayerAdmin(playerid))
			{
				if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						new length = strlen(cmdtext);
						while ((idx < length) && (cmdtext[idx] <= ' '))
						{
							idx++;
						}
						new offset = idx;
						new result[64];
						while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
						{
							result[idx - offset] = cmdtext[idx];
							idx++;
						}
						result[idx - offset] = EOS;
						if(!strlen(result))
						{
							SendClientMessage(playerid, COLOR_WHITE, "Benutz: /kick [ID] [Grund]");
							return 1;
						}
						format(string, sizeof(string), "%s hat %s gekickt. Grund: %s", sendername,giveplayer, (result));
						SendClientMessageToAll(KICK_COLOR, string);
                        Kick(giveplayerid);
						return 1;
					}
				}
			}
		}
		return 1;
	}
	if(!strcmp(cmd, "/veh", true))
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if (IsPlayerAdmin(playerid))
			{
			    SendClientMessage(playerid, COLOR_RED, "   Du darfst diesen Command nicht Ausfьhren!");
			    return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GREEN, "Benutz: /veh [AutoID] [Farbe1] [Farbe2]");
				return 1;
			}
			new car;
			car = strval(tmp);
			if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_RED, "   Fahrzeugnummer kann nicht unter 400 oder ьber 611 sein!"); return 1; }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GREEN, "Benutz: /veh [AutoID] [Farbe1] [Farbe2]");
				return 1;
			}
			new color1;
			color1 = strval(tmp);
			if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_RED, "   Farbnummer kann nicht unter 0 oder ьber 126 sein!"); return 1; }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GREEN, "Benutz: /veh [AutoID] [Farbe1] [Farbe2]");
				return 1;
			}
			new color2;
			color2 = strval(tmp);
			if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_RED, "   Farbnummer kann nicht unter 0 oder ьber 126 sein!"); return 1; }
			new Float:X,Float:Y,Float:Z;
			GetPlayerPos(playerid, X,Y,Z);
			new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);
			CreatedCars[CreatedCar] = carid;
			CreatedCar ++;
			format(string, sizeof(string), "   Auto %d steht bereit.", carid);
			SendClientMessage(playerid, COLOR_GREEN, string);
		}
		return 1;
	}
	if(!strcmp(cmd, "/ban", true))
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "Benutz: /ban [ID] [Grund]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if (IsPlayerAdmin(playerid))
			{
				if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						new length = strlen(cmdtext);
						while ((idx < length) && (cmdtext[idx] <= ' '))
						{
							idx++;
						}
						new offset = idx;
						new result[64];
						while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
						{
							result[idx - offset] = cmdtext[idx];
							idx++;
						}
						result[idx - offset] = EOS;
						if(!strlen(result))
						{
							SendClientMessage(playerid, COLOR_WHITE, "Benutz: /ban [ID] [Grund]");
							return 1;
						}
						format(string, sizeof(string), "%s hate %s gebannt. Grund: %s", sendername,giveplayer, (result));
						SendClientMessageToAll(KICK_COLOR, string);
                        Ban(giveplayerid);
						return 1;
					}
				}
			}
		}
		return 1;
	}
	
	if(!strcmp(cmdtext,"/ad",true))
	{
	    if(IsPlayerAdmin(playerid))
	    {
		    SetTimer("AD",500,0);
		    return 1;
		}
		return 1;
	}
    return 0;
}

forward Respawn();
public Respawn()
{
    for(new x; x < MAX_VEHICLES; x++)
	{
		SetVehicleToRespawn(x);
	}
}

forward AD();
public AD()
{
	new r = random(4) + 1;
	if(r == 1)
    SendClientMessageToAll(COLOR_GOLD,"Willkommen auf unseren Server");
    else if(r == 2)
    SendClientMessageToAll(COLOR_LEMON,"Bitte Hackt bzw. Cheatet nicht!");
    else if(r == 3)
    SendClientMessageToAll(COLOR_ORANGE,"Weitere Maps folgen bald");
    else if(r == 4)
    SendClientMessageToAll(COLOR_WHITEYELLOW,"Admin-Chef: Aldi.N]");
}

stock strtok(const string5[], &index)
{
	new length = strlen(string5);
	while ((index < length) && (string5[index] <= ' '))
	{
		index++;
	}

	new offset = index;
	new result[20];
	while ((index < length) && (string5[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string5[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}

public PlayerToPointStripped(Float:radi, playerid, Float:x, Float:y, Float:z, Float:curx, Float:cury, Float:curz)
{
    if(IsPlayerConnected(playerid))
	{
		new Float:tempposx, Float:tempposy, Float:tempposz;
		tempposx = (curx -x);
		tempposy = (cury -y);
		tempposz = (curz -z);
		if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) return 1;
	}
	return 0;
}

public IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if (x > minx && x < maxx && y > miny && y < maxy) return 1;
    return 0;
}

public OnPlayerText(playerid,text[])
{
	if(text[0] == ';')
	{
	    new string[128];    GetPlayerName(playerid, string, sizeof(string));
	    format(string, sizeof(string), "*Teamchat aus %s:  %s", string, text[1]);
		printf("%s", string);

	    for(new i = 0; i < MAX_PLAYERS; i++)
		{
		 	if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid]) SendClientMessage(i, GetPlayerColor(playerid), string);
 		}
		return 0;
	}

	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    HideMenuForPlayer(bws, playerid);
    new Menu:current;
    current = GetPlayerMenu(playerid);
    if(current == bws)
    {
        switch(row)
        {
            case 0: // TEC9
			{
                if(GetPlayerMoney(playerid) > 1500)
				{
					GivePlayerMoney(playerid,-1500);
					GivePlayerWeapon(playerid, 32, 200);
	  				SetPlayerHealth(playerid, 100.0);
			  		SetPlayerArmour(playerid, 100.0);
			  		SendClientMessage(playerid, COLOR_RED, "Du hast dir eine TEC9 mit 200 Munition gekauft!");
					TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_RED,"Du hast nicht genug Geld!");
					SetPlayerArmour(playerid, 0.0);
					TogglePlayerControllable(playerid, true);

				}
            }
            case 1:
			{
				if(GetPlayerMoney(playerid) > 1500)
				{
					GivePlayerMoney(playerid,-1500);
					GivePlayerWeapon(playerid, 28, 200);
	  				SetPlayerHealth(playerid, 100.0);
			  		SetPlayerArmour(playerid, 100.0);
			  		SendClientMessage(playerid, COLOR_RED, "Du hast dir eine UZI mit 200 Munition gekauft!");
					TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_RED,"Du hast nicht genug Geld!");
					SetPlayerArmour(playerid, 0.0);
					TogglePlayerControllable(playerid, true);
				}
            }
            case 2:
			{
				if(GetPlayerMoney(playerid) > 2000)
				{
					GivePlayerMoney(playerid,-2000);
					GivePlayerWeapon(playerid, 30, 250);
	  				SetPlayerHealth(playerid, 100.0);
			  		SetPlayerArmour(playerid, 100.0);
			  		SendClientMessage(playerid, COLOR_RED, "Du hast dir eine AK-47 mit 250 Munition gekauft!");
					TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_RED,"Du nicht genug Geld!");
					SetPlayerArmour(playerid, 0.0);
					TogglePlayerControllable(playerid, true);
				}
            }
            case 3:
			{
				if(GetPlayerMoney(playerid) > 750)
				{
             	   	GivePlayerMoney(playerid,-750);
					GivePlayerWeapon(playerid, 22, 100);
					SetPlayerHealth(playerid, 100.0);
			  		SetPlayerArmour(playerid, 100.0);
			  		SendClientMessage(playerid, COLOR_RED, "Du hast dir eine 9MM mit 200 Munition gekauft!");
					TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_RED,"DU hast nicht genug Geld!");
					SetPlayerArmour(playerid, 0.0);
					TogglePlayerControllable(playerid, true);
				}
            }
            case 4:
			{
				if(GetPlayerMoney(playerid) > 2000)
				{
            	    GivePlayerMoney(playerid,-100);
            	    GivePlayerWeapon(playerid, 29, 250);
 					SetPlayerHealth(playerid, 100.0);
			  		SetPlayerArmour(playerid, 100.0);
			  		SendClientMessage(playerid, COLOR_RED, "Du hast dir eine SMG mit 250 Munition gekauft!");
            	    TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_RED,"Du hast nicht genug Geld!");
					SetPlayerArmour(playerid, 0.0);
					TogglePlayerControllable(playerid, true);
				}
            }
            case 5:
			{
				if(GetPlayerMoney(playerid) > 1000)
				{
					GivePlayerMoney(playerid,-1000);
			  		GivePlayerWeapon(playerid, 16, 10);
			  		SetPlayerHealth(playerid, 100.0);
			  		SetPlayerArmour(playerid, 100.0);
			  		SendClientMessage(playerid, COLOR_RED, "Du hast dir 10 Granaten gekauft");
			  		TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_RED,"Du hast nicht genug Geld!");
					SetPlayerArmour(playerid, 0.0);
					TogglePlayerControllable(playerid, true);
				}
			}
			case 6:
			{
				if(GetPlayerMoney(playerid) > 1000)
				{
					GivePlayerMoney(playerid,-1000);
			  		GivePlayerWeapon(playerid, 18, 10);
			  		SetPlayerHealth(playerid, 100.0);
			  		SetPlayerArmour(playerid, 100.0);
			  		SendClientMessage(playerid, COLOR_RED, "Du hast dir 10 Molotovs gekauft!");
			  		TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_RED,"Du hast nicht genug Geld!");
					SetPlayerArmour(playerid, 0.0);
					TogglePlayerControllable(playerid, true);
				}
			}
			case 7:
			{
				if(GetPlayerMoney(playerid) > 1000)
				{
					GivePlayerMoney(playerid,-1000);
			  		GivePlayerWeapon(playerid, 24, 150);
			  		SetPlayerHealth(playerid, 100.0);
			  		SetPlayerArmour(playerid, 100.0);
			  		SendClientMessage(playerid, COLOR_RED, "Du hast dir eine Desert Eagцe mit 150 Munition gekauft!");
			  		TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_RED,"Du hast nicht genung Geld!");
					SetPlayerArmour(playerid, 0.0);
					TogglePlayerControllable(playerid, true);
				}
			}
			case 8:
			{
				if(GetPlayerMoney(playerid) > 250)
				{
					GivePlayerMoney(playerid,-250);
			  		SetPlayerHealth(playerid, 100.0);
			  		SendClientMessage(playerid, COLOR_RED, "Du hast nun volles Leben!");
			  		TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_RED,"Du hast nicht genung Geld!");
					SetPlayerArmour(playerid, 0.0);
					TogglePlayerControllable(playerid, true);
				}
			}
			case 9:
			{
				if(GetPlayerMoney(playerid) > 250)
				{
					GivePlayerMoney(playerid,-250);
			  		SetPlayerArmour(playerid, 100.0);
			  		SendClientMessage(playerid, COLOR_RED, "Dein Panzer ist voll!");
			  		TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_RED,"Du hast nicht genung Geld!");
					SetPlayerArmour(playerid, 0.0);
					TogglePlayerControllable(playerid, true);
				}
			}
			case 10:
			{
				{
					HideMenuForPlayer(bws, playerid);
					SetPlayerArmour(playerid, 0.0);
			  		TogglePlayerControllable(playerid, true);
				}
    	}
	}
	}
	}
	
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    if(IsPlayerConnected(playerid))
	{
		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;
}
Download:http://rapidshare.com/files/44486070...DEATHMATCH.rar
Reply
#2

Sorry for /push but its very Important
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)