When i Click The Button It Kicked Me From Game.
#1

Okay So i have a script here

Код:
if(strcmp("/buy", cmdtext, true, 10) == 0)
	{
		ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Weapon Shop","M4 ($50,000)\nAK-47 ($50,000)\nMP5 ($30,00)\nDual Tec9's ($25,000)\nDual Uzi's ($25,000)\nDesert Eagle ($35,000)\nSilencer ($1,500)\nDual Colt's ($15,000)\nSawn-Off ($60,000)\nCombat-Shotgun ($60,000)\nGrenade's ($10,000)\nMolotov's ($10,000)\nSniper Rifle ($10,000)\nArmour ($5000)\nFull-Heal ($5000)\nRPG 5rounds ($500,000)\n","Buy!", "Exit");
		return 1;
	}
	return 0;
Код:
if(listitem == 1)
			{
				if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 50,000!");
				GivePlayerMoney(playerid, -50000);
				GivePlayerWeapon(playerid,30,500);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 2)
			{
				if(GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 30,000!");
				GivePlayerMoney(playerid, -30000);
				GivePlayerWeapon(playerid,29,500);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 3)
			{
				if(GetPlayerMoney(playerid) < 25000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 25,000!");
				GivePlayerMoney(playerid, -25000);
				GivePlayerWeapon(playerid,32,500);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 4)
			{
				if(GetPlayerMoney(playerid) < 25000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 25,000!");
				GivePlayerMoney(playerid, -25000);
				GivePlayerWeapon(playerid,28,500);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 5)
			{
				if(GetPlayerMoney(playerid) < 35000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 35,000!");
				GivePlayerMoney(playerid, -35000);
				GivePlayerWeapon(playerid,24,500);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 6)
			{
				if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 2,000!");
				GivePlayerMoney(playerid, -2000);
				GivePlayerWeapon(playerid,23,100);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 7)
			{
				if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 10,000!");
				GivePlayerMoney(playerid, -10000);
				GivePlayerWeapon(playerid,22,600);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 8)
			{
				if(GetPlayerMoney(playerid) < 60000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 60,000!");
				GivePlayerMoney(playerid, -60000);
				GivePlayerWeapon(playerid,26,100);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 9)
			{
				if(GetPlayerMoney(playerid) < 60000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 60,000!");
				GivePlayerMoney(playerid, -60000);
				GivePlayerWeapon(playerid,27,100);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 10)
			{
				if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 10,000!");
				GivePlayerMoney(playerid, -10000);
				GivePlayerWeapon(playerid,16,30);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 11)
			{
				if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 10,000!");
				GivePlayerMoney(playerid, -10000);
				GivePlayerWeapon(playerid,18,30);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 12)
			{
				if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 10,000!");
				GivePlayerWeapon(playerid,34,100);
				GivePlayerMoney(playerid,-10000);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 13)
			{
				if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 5,000!");
				GivePlayerMoney(playerid, -5000);
				SetPlayerArmour(playerid, 100);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 14)
			{
				if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 5,000!");
				GivePlayerMoney(playerid, -5000);
				SetPlayerHealth(playerid, 100);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 15)
			{
				if(GetPlayerMoney(playerid) < 500000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 500,000!");
				GivePlayerWeapon(playerid,35,5);
				GivePlayerMoney(playerid,-500000);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
		}
	}
	return 1;
When i Click Exit, because i didnt have enough money it kicks me from the game. Please Help
Reply
#2

Show us the part of the code where the dialog is called in OnDialogResponse. We need to see the !response code, which is when you click the second button on the dialog.

For example:
pawn Код:
public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
{
   switch( dialogid )
   {
      case 1:
      // Show here down
Reply
#3

Actually Heres My Hole Code.

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT


/* Just basically added a weapon menu /buy and turned the /credits into a dialog box*/

#include <a_samp>
#define COLOR_BLUEMEDIUM 		0x0000CDAA
#define COLOR_BLUEDARK 			0x00008BAA
#define COLOR_PINK 				0xFF1493AA
#define COLOR_PINKDARK 			0xFF00FFAA
#define COLOR_GREEN 			0x008000AA
#define COLOR_GREENLIGHT 		0x00FF00AA
#define COLOR_GREENDARK 		0x006400AA
#define COLOR_MAROON 			0x800000AA
#define COLOR_OKER 				0x808000AA
#define COLOR_ORANGE 			0xFF4500AA
#define COLOR_ORANGELIGHT 		0xFF8C00AA
#define COLOR_PURPLE 			0x800080AA
#define COLOR_VIOLETDARK 		0x9400D3AA
#define COLOR_INDIGO 			0xAB0082AA
#define COLOR_RED 				0xFF0000AA
#define COLOR_SAND 				0xFFDEADAA
#define COLOR_SILVER 			0xC0C0C0AA
#define COLOR_TEAL 				0x008080AA
#define COLOR_WHITE 			0xFFFFFFAA
#define COLOR_YELLOW			0xFFFF00AA
#define COLOR_GOLD 				0xFFD700AA
#define COLOR_BROWN 			0x8B4513AA
#define COLOR_BROWNLIGHT 		0xA0522DAA
#define COLOR_GRAY 				0xA9A9A9AA
#define COLOR_GRAYDARK 			0x696969AA
#define COLOUR_YELLOW 			0xFFFF00FF
#define COLOUR_RED				0xFF3E3EFF
#define COLOR_GREY 				0xAFAFAFAA
#define COLOR_YELLOW 			0xFFFF00AA
#define COLOR_WHITE 			0xFFFFFFAA
#define BLUE					0x0000FFAA
#define PINK        			0xFF66FFAA
#define BLACK      				0x000000AA
#define AQUA        			0x7CFC00AA
#define YELLOW      			0xFFFF00AA
#define WHITE      				0xFFFFFFAA
#define COLOR_LIGHTBLUE 		0x33CCFFAA
#define WHITEP 					0xFFFFD5AA
#define GREY        			0xAFAFAFAA
#define CYAN        			0x99FFFFAA
#define PURPLE      			0x9900FFAA
#define ADMIN_RED 				0xFB0000FF
#define RED 					0xE60000FF
#define ADMIN_RED 				0xFB0000FF
#define LIGHTRED 				0xFF8080FF
#define PLAYER_COLOR 			0xFFFFFFFF
#define LIGHTGREEN 				0x38FF06FF
#define DARKPINK 				0xE100E1FF
#define DARKGREEN 				0x008040FF
#define ANNOUNCEMENT 			0x00CACAFB
#define AFK 					0x6AF7E1FF
#define COLOR_SYSTEM 			0xEFEFF7AA
#define PLAYER_VIEW 			0xC0C0C0FF
#define COLOR_GRAD1 			0xB4B5B7FF
#define NICESKY 				0x99FFFFAA
#define GRAY 					0xCECECEFF
#define COLOR_BRIGHTRED 		0xFF000AAA
#define COLOR_AQUA 				0x00FFFFAA
#define COLOR_GREY 				0xAFAFAFAA
#define COLOR_BEIGE 			0xFFF8DCAA
#define COLOR_BLACK 			0x000000AA
#define COLOR_BLUE 				0x0000FFAA
#define COLOR_BLUELIGHTER 		0x00BFFFAA
#define COLOR_BLUELIGHT 		0x1E90FFAA



public OnFilterScriptExit()
{
	return 1;
}


main()
{
	print("\n----------------------------------------------");
	print(" Game Mode By Chris {Scripter} Ben{Mapper");
	print("------------------------------------------------\n");
}


public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Free Roam");
 	AddPlayerClass(63,1087.4453,-924.3555,43.3906,184.1402,0,0,0,0,0,0); // Prostitute1
	AddPlayerClass(266,1568.5076,-1691.5100,5.8906,182.6821,24,200,25,100,3,1); // Spawn Officer pulaski
	AddPlayerClass(267,1572.1798,-1691.3918,5.8906,176.2471,24,200,25,100,3,1); // Officer Hernandez
	AddPlayerClass(270,2527.2998,-1665.0039,15.1669,96.5309,0,0,24,100,25,100); // groovestreet 7
	AddPlayerClass(271,2460.6169,-1687.5531,13.5336,271.9992,0,0,24,100,25,100); // Groovestreet 8
	AddPlayerClass(269,2483.1467,-1689.2684,13.5139,3.6503,25,100,24,100,25,100); // Groovestreet Smoke
	AddPlayerClass(0,2495.3301,-1687.5093,13.5158,360.0000,25,100,24,100,25,100); // Groovestreet CJ
	AddPlayerClass(102,2290.1616,-1528.1307,26.8750,357.8344,0,0,24,100,25,100); // BallasGangMember 1
	AddPlayerClass(103,2297.9976,-1506.8126,26.8449,9.2828,0,0,24,100,25,100); // BallasTwo
	AddPlayerClass(104,2299.1497,-1494.3140,23.4154,9.2828,0,0,24,100,25,100); // Ballas 4
	AddPlayerClass(117,1306.4563,-859.8710,39.5781,268.9776,0,0,0,0,0,0); // Admin
	AddStaticVehicle(596,1554.5903,-1615.0980,13.0999,142.9999,0,1); // Policecar1
	AddStaticVehicle(596,1560.2695,-1614.7181,13.0963,142.5754,0,1); // policecar2
	AddStaticVehicle(596,1565.3582,-1615.0917,13.0840,143.0489,0,1); // policecar3
	AddStaticVehicle(596,1570.3173,-1615.0155,13.0718,142.6719,0,1); // policecar4
	AddStaticVehicle(596,1575.5088,-1615.0381,13.0990,142.9739,0,1); // policecar 5
	AddStaticVehicle(427,1600.4585,-1607.5620,13.6215,88.3389,0,1); // police truck
	AddStaticVehicle(427,1599.9548,-1613.5918,13.6269,88.9400,0,1); // Policetruck2
	AddStaticVehicle(427,1600.0586,-1619.9673,13.6240,89.5147,0,1); // policetruck 3
	AddStaticVehicle(427,1599.8856,-1626.2255,13.6187,89.2147,0,1); // policetruck 4
	AddStaticVehicle(596,1602.4238,-1683.8866,5.6076,269.8653,0,1); // Policecar 7
	AddStaticVehicle(596,1602.2551,-1688.0073,5.6083,90.1565,0,1); // policecar 7
	AddStaticVehicle(596,1602.0204,-1692.0383,5.6123,89.1739,0,1); // policecar9
	AddStaticVehicle(596,1595.4048,-1711.5979,5.6076,180.3377,0,1); // policecar 10
	AddStaticVehicle(596,1591.4720,-1711.0446,5.6078,0.0349,0,1); // policecar11
	AddStaticVehicle(523,1582.1809,-1673.4303,5.4340,236.1597,0,0); // policebike1
	AddStaticVehicle(523,1582.1759,-1671.2104,5.4450,237.9854,0,0); // policebike2
	AddStaticVehicle(523,1582.3500,-1669.2474,5.4438,240.0609,0,0); // policebike3
	AddStaticVehicle(523,1582.1974,-1667.0199,5.4391,243.3042,0,0); // policebike 4
	AddStaticVehicle(596,1602.2170,-1700.3971,5.6104,90.5559,0,1); // policecar 12
	AddStaticVehicle(596,1583.4418,-1711.0413,5.6091,179.2010,0,1); // policecar 13
	AddStaticVehicle(596,1578.7501,-1710.8430,5.6125,178.5468,0,1); // policecar 14
	AddStaticVehicle(596,1570.3175,-1710.6646,5.6135,358.4360,0,1); // police car 16
	AddStaticVehicle(596,1559.0669,-1710.3262,5.6104,1.6732,0,1); // policecar 17
	AddStaticVehicle(427,1564.8468,-1710.8167,6.0203,0.5049,0,1); // Policetruck 5
	AddStaticVehicle(427,1534.6257,-1644.6981,6.0224,2.0019,0,1); // policetruck
	AddStaticVehicle(574,1530.7456,-1642.8064,5.6067,177.4833,26,26); // policesweeper
	AddStaticVehicle(574,1526.7968,-1642.4609,5.6158,181.8455,26,26); // policesweeper
	AddStaticVehicle(574,1526.7079,-1652.4778,5.6105,269.6704,26,26); // police sweeper
	AddStaticVehicle(574,1526.7534,-1655.8231,5.6072,269.4876,26,26); // policesweeper
	AddStaticVehicleEx(413,-2572.82810000,817.25430000,50.07340000,179.82530000,-1,-1,900); //Pony
	AddStaticVehicleEx(413,-2764.22290000,4.87720000,7.06760000,5.00160000,-1,-1,900); //Pony
	AddStaticVehicleEx(413,-2105.39330000,901.40830000,76.59570000,1.53260000,-1,-1,900); //Pony
	AddStaticVehicleEx(489,-1676.39150000,437.36540000,7.32290000,224.89370000,-1,-1,900); //Rancher
	AddStaticVehicleEx(589,-1676.45250000,437.16620000,6.83770000,227.33390000,-1,-1,900); //Club
	AddStaticVehicleEx(477,-1674.49130000,439.58490000,6.93490000,226.75390000,-1,-1,900); //ZR-350
	AddStaticVehicleEx(411,-2089.83280000,-83.09030000,34.90500000,0.16610000,-1,-1,900); //Infernus
	AddStaticVehicleEx(404,-1669.44010000,406.41520000,6.91370000,316.86990000,-1,-1,900); //Perrenial
	AddStaticVehicleEx(561,-1674.79500000,438.31980000,6.99320000,229.25410000,-1,-1,900); //Stratum
	AddStaticVehicleEx(493,-1769.10440000,-191.40140000,-0.09240000,182.87860000,-1,-1,900); //Jetmax
	AddStaticVehicleEx(470,-1543.86910000,477.67210000,7.17530000,83.15120000,-1,-1,900); //Patriot
	AddStaticVehicleEx(452,-1753.03990000,-191.30690000,-0.49320000,178.53570000,-1,-1,900); //Speeder
	AddStaticVehicleEx(562,-1922.97960000,281.38710000,40.70920000,183.55140000,-1,-1,900); //Elegy
	AddStaticVehicleEx(486,-2109.52490000,144.55770000,35.30330000,92.87470000,-1,-1,900); //Dozer
	AddStaticVehicleEx(571,-2211.55710000,114.47790000,34.60410000,90.24370000,-1,-1,900); //Kart
	AddStaticVehicleEx(558,-2265.55350000,200.41640000,34.79490000,271.54760000,-1,-1,900); //Uranus
	AddStaticVehicleEx(527,-2265.87520000,128.80040000,34.88910000,270.35960000,-1,-1,900); //Cadrona
	AddStaticVehicleEx(426,-2265.17600000,141.08560000,34.90020000,268.78800000,-1,-1,900); //Premier
	AddStaticVehicleEx(402,-2773.85620000,-311.68830000,6.87060000,181.31560000,-1,-1,900); //Buffalo
	AddStaticVehicleEx(534,-2765.94070000,-311.59730000,6.76380000,182.97190000,-1,-1,900); //Remington
	AddStaticVehicleEx(480,-1800.66250000,967.60600000,24.50590000,179.86120000,-1,-1,900); //Comet
	AddStaticVehicleEx(551,-1800.61170000,947.20010000,24.53660000,179.55430000,-1,-1,900); //Merit
	AddStaticVehicleEx(477,-1930.44300000,910.69400000,37.96110000,269.79150000,-1,-1,900); //ZR-350
	AddStaticVehicleEx(492,-1907.27100000,876.67620000,34.87310000,179.65690000,-1,-1,900); //Greenwood
	AddStaticVehicleEx(589,-1996.18800000,805.17630000,45.03460000,359.61890000,-1,-1,900); //Club
	AddStaticVehicleEx(404,-1891.36020000,749.56350000,45.10240000,1.06050000,-1,-1,900); //Perrenial
	AddStaticVehicleEx(400,-1931.58870000,723.32990000,45.45950000,269.96630000,-1,-1,900); //Landstalker
	AddStaticVehicleEx(567,-1978.06590000,723.27500000,45.23970000,270.28630000,-1,-1,900); //Savanna
	AddStaticVehicleEx(575,-2124.51810000,655.25420000,51.96990000,89.71740000,-1,-1,900); //Broadway
	AddStaticVehicleEx(466,-2151.93530000,518.23850000,34.83230000,180.40020000,-1,-1,900); //Glendale
	AddStaticVehicleEx(412,-2274.41530000,700.62220000,49.20580000,181.25760000,-1,-1,900); //Voodoo
	AddStaticVehicleEx(418,-2197.04790000,644.90340000,49.53190000,93.09500000,-1,-1,900); //Moonbeam
	AddStaticVehicleEx(419,-2308.25170000,573.83860000,33.09040000,90.20650000,-1,-1,900); //Esperanto
	AddStaticVehicleEx(401,-2380.39530000,606.43660000,29.32300000,359.60890000,-1,-1,900); //Bravura
	AddStaticVehicleEx(410,-2394.61350000,649.70150000,34.74570000,179.78720000,-1,-1,900); //Manana
	AddStaticVehicleEx(415,-2578.16310000,713.88790000,27.65570000,88.84100000,-1,-1,900); //Cheetah
	AddStaticVehicleEx(491,-2645.34060000,725.19040000,27.71720000,179.80090000,-1,-1,900); //Virgo
	AddStaticVehicleEx(496,-2756.51050000,708.20290000,40.91270000,180.99490000,-1,-1,900); //Blista Compact
	AddStaticVehicleEx(500,-2756.40990000,631.31150000,27.92580000,178.08960000,-1,-1,900); //Mesa
	AddStaticVehicleEx(429,-2469.16040000,902.71390000,62.67690000,269.02420000,-1,-1,900); //Banshee
	AddStaticVehicleEx(526,-2451.43360000,741.12570000,34.78230000,180.81120000,-1,-1,900); //Fortune
	AddStaticVehicleEx(536,-2833.76170000,681.45920000,20.12360000,201.18450000,-1,-1,900); //Blade
	AddStaticVehicleEx(540,-2802.67020000,861.90860000,43.84030000,0.28020000,-1,-1,900); //Vincent
	AddStaticVehicleEx(527,-2828.83590000,607.58310000,5.88330000,177.27280000,-1,-1,900); //Cadrona
	AddStaticVehicleEx(560,-2881.80790000,506.10120000,4.61830000,181.26110000,-1,-1,900); //Sultan
	AddStaticVehicleEx(551,-2927.46140000,499.03380000,4.71090000,270.81710000,-1,-1,900); //Merit
	AddStaticVehicleEx(554,-2911.28640000,506.27330000,4.99710000,181.35670000,-1,-1,900); //Yosemite
	AddStaticVehicleEx(492,-2898.24760000,419.99080000,4.69590000,358.53070000,-1,-1,900); //Greenwood
	AddStaticVehicleEx(496,-2927.33230000,445.14500000,4.63040000,271.58690000,-1,-1,900); //Blista Compact
	AddStaticVehicleEx(461,-2980.29270000,484.73860000,4.49720000,180.80410000,-1,-1,900); //PCJ-600
	AddStaticVehicleEx(493,-2970.25200000,492.43340000,-0.68790000,0.94290000,-1,-1,900); //Jetmax
	AddStaticVehicleEx(493,-2982.74730000,492.45550000,-0.38380000,0.07140000,-1,-1,900); //Jetmax
	AddStaticVehicleEx(500,-2970.88550000,458.01810000,5.02260000,358.88880000,-1,-1,900); //Mesa
	AddStaticVehicleEx(573,-2553.48600000,2272.38800000,5.68900000,334.54000000,-1,-1,900); //Duneride
	AddStaticVehicleEx(573,-2392.98800000,2219.30200000,4.54900000,88.60000000,-1,-1,900); //Duneride
	AddStaticVehicleEx(532,-46.32000000,-10.04500000,2.69000000,77.20000000,-1,-1,900); //Combine
	AddStaticVehicleEx(532,-365.94200000,-1440.50900000,25.29800000,83.87000000,-1,-1,900); //Combine
	AddStaticVehicleEx(531,-377.87300000,-1050.07900000,58.65100000,257.42000000,-1,-1,900); //Tractor
	AddStaticVehicleEx(478,-369.62800000,-1061.14500000,58.78500000,7.09000000,-1,-1,900); //Walton
	AddStaticVehicleEx(531,-90.73500000,-36.59500000,1.70000000,337.51000000,-1,-1,900); //Tractor
	AddStaticVehicleEx(493,-1509.84700000,1386.38500000,0.26100000,91.60000000,-1,-1,900); //Jetmax
	AddStaticVehicleEx(409,-1940.19520000,1192.82790000,45.32050000,359.64750000,-1,-1,900); //Stretch
	AddStaticVehicleEx(409,-2634.60860000,1396.18630000,6.97620000,283.61830000,-1,-1,900); //Stretch
	AddStaticVehicleEx(482,-2645.28910000,1369.92810000,7.04360000,269.27580000,-1,-1,900); //Burrito
	AddStaticVehicleEx(421,-2645.22560000,1356.08760000,7.04330000,272.09000000,-1,-1,900); //Washington
	AddStaticVehicleEx(462,-2416.79740000,332.25730000,34.60000000,148.23670000,-1,-1,900); //Faggio
	AddStaticVehicleEx(596,2779.3843,-2434.2644,13.3568,88.5203, 44, 86, 30000); // Army police 1
	AddStaticVehicleEx(596,2779.4299,-2439.7708,13.3572,88.1692,44,86,30000); // Army police 2
	AddStaticVehicleEx(596,2779.1882,-2471.9214,13.3576,86.6550,44,86,30000); // Army police 3
	AddStaticVehicleEx(596,2779.1497,-2477.8547,13.3590,86.9500,44,86,30000); // Army police 4
	AddStaticVehicleEx(432,2791.3584,-2494.2971,13.6588,89.3376,43,0,30000); // Army tank 5
	AddStaticVehicleEx(470,2792.0173,-2455.8245,14.0688,90,43,0,30000); // Army patriot 6
	AddStaticVehicleEx(470,2793.1680,-2418.1855,13.6259,88.3914,-1, -1, 30000); // Patriot 7
	AddStaticVehicleEx(470,2785.0979,-2417.6987,13.6273,87.4559, -1, -1, 30000); //Patriot 8
	AddStaticVehicleEx(433,2781.4146,-2455.5208,14.0714,90,43,0,30000); // Army truck 9
	AddStaticVehicleEx(430,2698.8132,-2311.0671,-0.2161,87.3657,-1, -1, 30000); // Army boat 10
	AddStaticVehicleEx(430,2722.9766,-2311.2756,-0.3360,89.2799,-1, -1, 30000); // Army boat 11
	AddStaticVehicleEx(405,1406.93,-1790.2,13.3,90, 0, 0, 30000); // Mayor security 12
	AddStaticVehicleEx(405,1406.9,-1793.8,13.3,90, 0, 0, 30000); // Mayor security 13
	AddStaticVehicleEx(405,1406.7,-1782.16,13.3,90, 0, 0, 30000); // Mayor security 14
	AddStaticVehicleEx(409,1405.87,-1785.96,13.3,90,1,1,30000); // Mayor stretch 15
	AddStaticVehicleEx(416,1177.35,-1339.24,13.66,269.58, -1, -1, 30000); // Ambulance 52
	AddStaticVehicleEx(416,1176.98,-1308.65,13.62,269.33, -1, -1, 30000); // Ambulance 53
	AddStaticVehicleEx(416,1189.87,-1357.14,13.21,180.78, -1, -1, 30000); // Ambulance 54
	//-------------------------------------------------------------------------------------------
	AddStaticVehicleEx(467,1067.1295,-295.5681,73.7826,179.6040, 90, -1, 30000); // Hitman oceanic 56
	AddStaticVehicleEx(467,1077.3829,-295.1148,73.7812,180.2754, 90, -1, 30000); // Hitman oceanic 57
	AddStaticVehicleEx(467,1071.9189,-294.9166,73.7250,178.9444,90, -1, 30000); // Hitman oceanic 58
	//-------------------------------------------------------------------------------------------
	AddStaticVehicleEx(431,1172.5,-1795.5,13.1,0.0, -1, -1, 30000); // Bus 59
	AddStaticVehicleEx(431,1182.1,-1795.9,13.1,0.0, -1, -1, 30000); // Bus 60
	//-------------------------------------------------------------------------------------------
	AddStaticVehicleEx(409,1789.4137,-1932.6389,13.1079,357.7568,0,0,30000); // YCAT Co. Limo 61
	AddStaticVehicleEx(421,1803.6373,-1916.4673,13.1141,89.0899,0,0,30000); // YCAT Co. Washington 62
	AddStaticVehicleEx(421,1803.6617,-1925.0874,13.1319,266.7457,0,0,30000); // YCAT Co. Washington 63
	AddStaticVehicleEx(420,1800.6991,-1886.0063,13.1462,268.8892,-1,-1,30000); // YCAT Co.Taxi 64
	AddStaticVehicleEx(420,1777.9976,-1886.0128,13.1922,267.6736,-1,-1,30000); // YCAT Co. Taxi 65
	AddStaticVehicleEx(420,1803.7118,-1906.2510,13.2024,85.1059,-1,-1,30000); // YCAT Co. Taxi 66
	AddStaticVehicleEx(420,1777.3717,-1896.7965,13.1916,270.3214,-1,-1,30000); // YCAT Co. Taxi 67
	AddStaticVehicleEx(420,1796.4906,-1932.9441,13.1914,357.7162,-1,-1,30000); // YCAT Co. Taxi 68
	AddStaticVehicleEx(420,1780.8253,-1931.8109,13.1295,358.2670,-1,-1,30000); // YCAT Co. Taxi 69
	AddStaticVehicleEx(420,1777.6808,-1913.4772,13.1285,267.0958,-1,-1,30000); // YCAT Co. Taxi 70
	//-------------------------------------------------------------------------------------------
	//-------------------------------------------------------------------------------------------
	AddStaticVehicleEx(525,2078.74,-2006.38,13.25,271.64,0,0,30000); // Towcar 74
	AddStaticVehicleEx(525,2079.06,-2019.84,13.25,269.24,0,0,30000); // Towcar 75
	AddStaticVehicleEx(525,2097.83,-2006.09,13.25,44.15,0,0,30000); // Towcar 76
	AddStaticVehicleEx(525,2106.72,-2015.25,13.25,44.15,0,0,30000); // Towcar 77
	//-------------------------------------------------------------------------------------------
	AddStaticVehicleEx(571,2286.2141,-2354.5000,12.8306,225.8705,-1,-1,30000); // kart 78
	AddStaticVehicleEx(571,2279.9412,-2348.4141,12.8312,225.8585,-1,-1,30000); // kart 79
	AddStaticVehicleEx(571,2291.7932,-2345.5356,12.8305,227.3060,-1,-1,30000); // kart 80
	AddStaticVehicleEx(571,2287.5615,-2341.6433,12.8306,226.5350,-1,-1,30000); // kart 81
	AddStaticVehicleEx(571,2299.6785,-2338.3186,12.8307,224.3563,-1,-1,30000); // kart 82
	AddStaticVehicleEx(571,2295.3887,-2334.9448,12.8307,227.9102,-1,-1,30000); // kart 83
	CreateVehicle(494,-1401.0436,-210.0052,1042.9913,1.6623,1,0,30000); //hotring 84
	CreateVehicle(494,-1400.4019,-219.9365,1043.0348,5.3554,1,3,30000); //hotring 85
	CreateVehicle(494,-1394.4932,-207.7917,1042.9963,3.6872,0,6,30000); //hotring 86
	CreateVehicle(494,-1393.7854,-217.9354,1043.0325,2.9556,1,2,30000); //hotring 87
	CreateVehicle(468,-1445.6392,-592.3033,1055.7831,90.2133,-1,-1,30000); //bike 88
	CreateVehicle(468,-1433.1708,-592.4930,1055.6533,92.4067,-1,-1,30000); //bike 89
	CreateVehicle(468,-1448.5325,-584.4943,1055.4949,95.5400,-1,-1,30000); //bike 90
	CreateVehicle(468,-1434.8973,-585.1266,1055.2488,91.1533,-1,-1,30000); //bike 91
	CreateVehicle(468,-1449.2814,1610.7823,1052.5313,272.9406,-1,-1,30000); // bike 92
	CreateVehicle(468,-1453.8767,1611.2418,1052.5313,89.0355,-1,-1,30000); // bike 93
	CreateVehicle(468,-1454.4746,1614.3342,1052.5313,86.8422,-1,-1,30000); // bike 94
	CreateVehicle(468,-1449.5795,1614.0684,1052.5313,269.2039,-1,-1,30000); // bike 95
	//-------------------------------------------------------------------------------------------
	CreateVehicle(514,-77.5039,-1108.1729,1.6683,161.8915,-1,-1,30000); // truck 96
	CreateVehicle(514,-72.3507,-1109.7822,1.6670,161.7769,-1,-1,30000); // truck 97
	CreateVehicle(514,-67.0126,-1111.7156,1.6688,160.4800,-1,-1,30000); // truck 98
	CreateVehicle(435,-51.0638,-1135.2831,1.0781,68.3320,-1,-1,30000); // trailer 99
	CreateVehicle(435,-53.6230,-1139.7546,1.0781,67.5604,-1,-1,30000); // trailer 100
	CreateVehicle(435,-55.0517,-1144.3676,0.8018,68.1347,-1,-1,30000); // trailer 101
	//-------------------------------------------------------------------------------------------
	AddStaticVehicleEx(448,2122,-1784.1558,12.9844,0.9122,3,6,30000); // PizzaBoy 102
	AddStaticVehicleEx(448,2120,-1784.1558,12.9844,0.9122,3,6,30000); // PizzaBoy 103
	AddStaticVehicleEx(448,2118,-1784.1558,12.9844,0.9122,3,6,30000); // PizzaBoy 104
	AddStaticVehicleEx(448,2116,-1784.1558,12.9844,0.9122,3,6,30000); // PizzaBoy 105
	AddStaticVehicleEx(448,2114,-1784.1558,12.9844,0.9122,3,6,30000); // PizzaBoy 106
	AddStaticVehicleEx(448,2112,-1784.1558,12.9844,0.9122,3,6,30000); // PizzaBoy 107
	//-------------------------------------------------------------------------------------------
	AddStaticVehicleEx(456,2508.9116,-2111.7759,13.7206,0,-1,-1, 30000); // Component Truck Yankee 108
	AddStaticVehicleEx(456,2484.5356,-2111.7759,13.7196,0,-1,-1,30000); // Component Truck Yankee 109
	AddStaticVehicleEx(440,2529.0413,-2085.3999,13.6651,90,-1,-1,30000); // Component Truck Rumpo 110
	AddStaticVehicleEx(440,2528.9482,-2092.6104,13.6631,90,-1,-1,30000); // Component Truck Rumpo 111
	//-------------------------------------------------------------------------------------------
	AddStaticVehicleEx(510,1556.2643,-2361.6479,13.1627,6.6305,39,39,30000); // Mountain bike 112
	AddStaticVehicleEx(510,1552.8982,-2361.8359,13.1623,10.5426,16,16,30000); // Mountain bike 113
	AddStaticVehicleEx(510,1549.1460,-2362.0383,13.1626,5.5903,6,6,30000); // Mountain bike 114
	AddStaticVehicleEx(510,1546.0422,-2362.0017,13.1630,6.6997,5,5,30000); // Mountain bike 115
	AddStaticVehicleEx(510,1542.7434,-2361.9631,13.1626,15.3254,2,2,30000); // Mountain bike 116
	AddStaticVehicleEx(510,1539.4385,-2362.1431,13.1625,11.8010,43,43,30000); // Mountain bike 117
	AddStaticVehicleEx(510,1536.1389,-2362.0837,13.1626,12.2595,46,46,30000); // Mountain bike 118
	AddStaticVehicleEx(510,1532.6709,-2362.2327,13.1631,8.4654,39,39,30000); // Mountain bike 119
	AddStaticVehicleEx(510,1529.8967,-2362.2913,13.1633,3.8305,28,28,30000); // Mountain bike 120
	AddStaticVehicleEx(510,1526.7921,-2362.0647,13.1630,8.0961,16,16,30000); // Mountain bike 121
	AddStaticVehicleEx(462,1561.2104,-2338.5303,13.1464,107.7252,13,13,30000); // Faggio 122
	AddStaticVehicleEx(462,1561.0819,-2335.0010,13.1470,94.8441,14,14,30000); // Faggio 123
	AddStaticVehicleEx(462,1560.7794,-2331.9216,13.1464,96.7927,1,2,30000); // Faggio 124
	AddStaticVehicleEx(462,1560.7391,-2328.2046,13.1470,92.0937,2,1,30000); // Faggio 125
	AddStaticVehicleEx(462,1560.9022,-2325.0593,13.1462,91.0980,1,3,30000); // Faggio 126
	AddStaticVehicleEx(462,1561.0276,-2321.8657,13.1475,95.4715,3,1,30000); // Faggio 127
	AddStaticVehicleEx(462,1561.0735,-2318.5796,13.1443,97.1012,10,10,30000); // Faggio 128
	AddStaticVehicleEx(462,1560.9514,-2315.0532,13.1465,94.5565,12,12,30000); // Faggio 129
	AddStaticVehicleEx(462,1560.8143,-2311.6104,13.1455,95.1219,13,13,30000); // Faggio 130
	AddStaticVehicleEx(405,2052.5889,-1903.9319,13.4218,180.9040,84,84,30000); // Driving school 131
	AddStaticVehicleEx(405,2055.9761,-1903.8756,13.4219,179.6732,84,84,30000); // Driving school 132
	AddStaticVehicleEx(405,2059.1111,-1903.9015,13.4219,180.2001,84,84,30000); // Driving school 133
	AddStaticVehicleEx(405,2062.3347,-1903.9109,13.4219,179.3091,84,84,30000); // Driving school 134
	AddStaticVehicleEx(404,1681.5526,-1035.9557,23.6389,180,123,92,30000); // Rent car 135
	AddStaticVehicleEx(404,1685.3273,-1035.4058,23.6409,180,101,101,30000); // Rent car 136
	AddStaticVehicleEx(404,1689.9888,-1035.6348,23.6384,180,83,110,30000); // Rent car 137
	AddStaticVehicleEx(401,1694.3981,-1034.7706,23.6860,180,74,74,30000); // Rent car 138
	AddStaticVehicleEx(401,1703.3409,-1044.8248,23.6857,0,91,91,30000); // Rent car 139
	AddStaticVehicleEx(401,1712.7332,-1034.9132,23.6933,180,41,41,30000); // Rent car 140
	AddStaticVehicleEx(410,1690.2993,-1044.3937,23.5577,0,10,1,30000); // Rent car 141
	AddStaticVehicleEx(410,1681.0250,-1044.6152,23.5528,0,36,1,30000); // Rent car 142
	AddStaticVehicleEx(410,1703.0122,-1035.1486,23.5598,180,45,1,30000); // Rent car 143
	AddStaticVehicleEx(418,1698.9230,-1044.6398,23.9990,0,114,114,30000); // Rent car 144
	AddStaticVehicleEx(418,1707.8655,-1035.1423,24.0034,180,95,95,30000); // Rent car 145
	AddStaticVehicleEx(418,1698.7041,-1034.9835,23.9997,180,61,61,30000); // Rent car 146
	AddStaticVehicleEx(418,1685.3434,-1044.4137,23.9994,0,119,119,30000); // Rent car 147
	AddStaticVehicleEx(436,1694.5468,-1044.4786,23.6760,0,92,1,30000); // Rent car 148
	AddStaticVehicleEx(436,1707.9614,-1044.8055,23.6739,0,109,1,30000); // Rent car 149
	AddStaticVehicleEx(436,1712.5034,-1044.1735,23.6731,0,11,1,30000); // Rent car 150
	AddStaticVehicleEx(458,1709.2091,-1061.1398,23.7847,180,109,1,30000); // Rent car 151
	AddStaticVehicleEx(458,1700.3168,-1060.6760,23.7848,180,4,1,30000); // Rent car 152
	AddStaticVehicleEx(458,1717.9724,-1069.8695,23.7848,0,30,1,30000); // Rent car 153
	AddStaticVehicleEx(458,1691.3545,-1069.6636,23.7849,0,91,1,30000); // Rent car 154
	AddStaticVehicleEx(532,-387.4058,-1476.6927,26.7035,265.6719,0,0,30000); // Harvest 155
	AddStaticVehicleEx(532,-382.8609,-1465.2964,26.7162,262.4081,0,0,30000); // Harvest 156
	AddStaticVehicleEx(532,-392.8095,-1487.2607,26.3314,268.0157,0,0,30000); // Harvest 157
	AddStaticVehicleEx(532,-399.6307,-1500.4774,25.4502,265.1973,0,0,30000); // Harvest 158
	AddStaticVehicleEx(532,-54.1143,86.1869,4.0927,246.1964,16,0,30000); // Drug harvest 159
	AddStaticVehicleEx(532,-39.0122,-19.7210,4.0923,66.2487,16,0,30000); // Drug harvest 160
	AddStaticVehicleEx(532,-34.2867,-9.5510,4.0883,62.7305,16,0,30000); // Drug harvest 161
	AddStaticVehicleEx(532,-83.7403,-17.7843,4.0917,340.3535,16,0,30000); // Drug harvest 162
	AddStaticVehicleEx(442,1097.7876,-1327.8087,13.1820,2.3556,3,13,30000); // Drugs smuggler car 163
	AddStaticVehicleEx(442,1110.4362,-1327.9688,13.1654,1.1852,3,13,30000); // Drugs smuggler car 164
	AddStaticVehicleEx(442,1123.7722,-1327.3230,13.2222,359.7142,3,13,30000); // Drugs smuggler car 165
	AddStaticVehicleEx(407,1750.9323,-1453.7485,13.7822,257.2471,3,1,30000); // FireTruck 166
	AddStaticVehicleEx(487,1549.7140,-2430.7375,13.7305,154.5285,84,84,30000); // School Helicopter 167
	AddStaticVehicleEx(487,1902.4270,-2628.4958,13.7092,62.7501,0,0,30000); // Government Helicopter 168
	AddStaticVehicleEx(574,1668.6692,-1896.1118,13.2720,268.0269,26,26,30000); // Street sweeper 169
	AddStaticVehicleEx(574,1668.7383,-1891.4990,13.2720,270.7320,26,26,30000); // Street sweeper 170
	AddStaticVehicleEx(574,1668.7280,-1886.8180,13.2720,268.9658,26,26,30000); // Street sweeper 171
	AddStaticVehicle(426,604.1163,841.5123,-43.5796,101.6071,7,7); // Reservation 172
	AddStaticVehicle(426,608.9548,852.5673,-43.2947,275.9953,7,7); // Reservation 173
	AddStaticVehicle(426,614.8525,873.8575,-43.2182,28.9858,7,7); // Reservation 174
	AddStaticVehicle(426,612.1263,887.0045,-43.4468,5.1609,7,7); // Reservation 175
	AddStaticVehicle(426,588.0759,893.6481,-44.7892,128.3505,7,7); // Reservation 176
	AddStaticVehicle(426,579.7737,910.1716,-43.5148,321.5789,7,7); // Reservation 177
	AddStaticVehicle(426,604.1163,841.5123,-43.5796,101.6071,7,7); // Reservation 178
	AddStaticVehicle(426,608.9548,852.5673,-43.2947,275.9953,7,7); // Reservation 179
	AddStaticVehicle(426,614.8525,873.8575,-43.2182,28.9858,7,7); // Reservation 180
	AddStaticVehicle(426,612.1263,887.0045,-43.4468,5.1609,7,7); // Reservation 181
	AddStaticVehicle(426,588.0759,893.6481,-44.7892,128.3505,7,7); // Reservation 182
	AddStaticVehicle(426,579.7737,910.1716,-43.5148,321.5789,7,7); // Reservation 183
	AddStaticVehicle(602,1107.8553,-933.9453,42.9950,356.1222,18,1); // Sexshop1
	AddStaticVehicle(603,1103.2665,-934.1409,42.9949,3.1146,34,1); // sexshop car 2
	AddStaticVehicle(589,1096.2544,-934.8326,42.7245,3.0477,22,22); // Sexshop car2
	AddStaticVehicle(585,1099.5729,-933.9981,42.7176,182.8870,62,62); // sexshop car 4
	//_____________________________________GROOVESTREET______________________________________
	AddStaticVehicle(401,2482.8579,-1683.3287,13.1964,267.7087,16,16); // GrooveStreet Car1
	AddStaticVehicle(600,2473.1213,-1695.8768,13.2338,177.6840,16,16); // Groovestreet car2
	AddStaticVehicle(402,2505.4927,-1694.4058,13.3886,181.1473,16,16); // Groove Street Car 3
	AddStaticVehicle(415,2479.8850,-1654.1356,13.1617,90.9292,16,16); // Groovestreet car 5
	AddStaticVehicle(429,2508.6563,-1666.3782,13.1232,13.1008,16,16); // Groovestreet car 4
	return 1;
}

public OnGameModeExit()
{
	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);
}

public OnPlayerRequestClass(playerid, classid)
{
    SetupPlayerForClassSelection(playerid);
    new skin = GetPlayerSkin(playerid);
    if(skin == 117)
{
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    if(!strcmp( Name, "HayZatic"))
    {
        SendClientMessage(playerid, RED, "Welcome HayZatic");
    }
    else
    {
        GameTextForPlayer(playerid, "You May Not Use This Admin Skin!", 5000, 5);
        return 0;
    }
}
    return 1;
}

public OnPlayerConnect(playerid)
{
    new string[64], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string,sizeof string,"%s has joined the server. Welcome!",pName);
    SendClientMessageToAll(0xFFFFFFAA,string);
    GivePlayerMoney(playerid,5000);
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new
        string[64],
        name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    switch(reason)
    {
        case 0: format(string,sizeof string,"%s left the server. (Timed out)",name);
        case 1: format(string,sizeof string,"%s left the server. (Leaving)",name);
        case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name);
    }
    SendClientMessageToAll(0xFFFFFFAA,string);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerInterior(playerid,0);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	SendDeathMessage(killerid,playerid,reason);
	GivePlayerMoney(killerid,500);
	GivePlayerMoney(playerid,-500);
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/wank", cmdtext, true) == 0)
	{
	    new pName[MAX_PLAYER_NAME];
		new string[256];
		GetPlayerName(playerid, pName, sizeof(pName));
     	ApplyAnimation(playerid, "PAULNMAC", "wank_loop", 4.0, 0, 0, 0, 0, 0); // Wank In
     	SendClientMessage(playerid, 0xFFFF00AA, "You Are Whacking The Wood!.");
     	SendClientMessageToAll(0xFFFF00AA, string);
 		return 1;
	}
	if (strcmp("/cmds", cmdtext, true, 10) == 0)
	{
	    SendClientMessage(playerid,COLOR_YELLOW, " Welcome To The Command Center!");
	    SendClientMessage(playerid,COLOR_YELLOW, " /kill,/fart,/piss,/credits,/wank");
	    SendClientMessage(playerid,COLOR_YELLOW, " /buy");
	    return 1;
}
	if (strcmp("/piss", cmdtext, true) == 0) {
        ApplyAnimation(playerid, "PAULNMAC", "Piss_in", 3.0, 0, 0, 0, 0, 0); // Pissing
        SendClientMessage(playerid, 0xFFFF00AA, "You are pissing!.");
        SetPlayerSpecialAction(playerid, 68);
        return 1;
	}
    if(strcmp(cmdtext, "/fart", true) == 0)
	{
		new pName[MAX_PLAYER_NAME];
		new string[256];
		GetPlayerName(playerid, pName, sizeof(pName));
		format(string, sizeof(string), "Gross! %s has just farted!.", pName);
		SendClientMessageToAll(0xFFFF00AA, string);
		return 1;
	}
	if(strcmp(cmdtext,"/commands",true)==0)
	{
	ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"{FF002B}United Freeroam","{FFFFFF}Thank You For Looking At The Commands!\n{F2C80C}List1:{FFFFFF}/Piss /Wank /Fart \n{FF002B}List 2:{FFFFFF}/kill!\nMore To Come\nMore To Come\nMore To Come","Okay","Close");
	return 1;
	}
	if(strcmp(cmdtext,"/credits",true)==0)
	{
	ShowPlayerDialog(playerid,21,DIALOG_STYLE_MSGBOX,"{FF002B}United Freeroam","{FFFFFF}Thank You For Looking At The Credits!\n{F2C80C}HayZatic-{FFFFFF}The Person Who Scripted The Server!!\n{FF002B}AgentZero-{FFFFFF}The Person Who Mapped The Server!!\nMore Credits\nMore Credits\nMore Credits","Give Thanks","Close");
	return 1;
	}
	if(strcmp("/buy", cmdtext, true, 10) == 0)
	{
		ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Weapon Shop","M4 ($50,000)\nAK-47 ($50,000)\nMP5 ($30,00)\nDual Tec9's ($25,000)\nDual Uzi's ($25,000)\nDesert Eagle ($35,000)\nSilencer ($1,500)\nDual Colt's ($15,000)\nSawn-Off ($60,000)\nCombat-Shotgun ($60,000)\nGrenade's ($10,000)\nMolotov's ($10,000)\nSniper Rifle ($10,000)\nArmour ($5000)\nFull-Heal ($5000)\nRPG 5rounds ($500,000)\n","Buy!", "Exit");
		return 1;
	}
	return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
 return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{

	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 3)
	{
		if(response == 0)
		{
		new Float:pX, Float:pY, Float:pZ;
		PlayerPlaySound(playerid,1057,pX,pY,pZ);
		}
		if(response == 1)
		{
			new string[256];
			new pname[MAX_PLAYER_NAME];
			GetPlayerName(playerid, pname, sizeof(pname));
			format(string, sizeof(string), "%s has Just Finished Looking At The Commands!", pname);
			SendClientMessageToAll(COLOR_ORANGE, string);
			new Float:pX, Float:pY, Float:pZ;
			PlayerPlaySound(playerid,1057,pX,pY,pZ);
			}
	}
	if(dialogid == 21)
	{
		if(response == 0)
		{
		new Float:pX, Float:pY, Float:pZ;
		PlayerPlaySound(playerid,1057,pX,pY,pZ);
		}
		if(response == 1)
		{
			new string[256];
			new pname[MAX_PLAYER_NAME];
			GetPlayerName(playerid, pname, sizeof(pname));
			format(string, sizeof(string), "%s has Just Gave Credits For Creating This Server!", pname);
			SendClientMessageToAll(COLOR_ORANGE, string);
			new Float:pX, Float:pY, Float:pZ;
			PlayerPlaySound(playerid,1057,pX,pY,pZ);
		}
	}
 	if(dialogid == 1)
	{
		if(response)
		{
			if(listitem == 0)
			{
                if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 50,000!");
				GivePlayerMoney(playerid, -50000);
				GivePlayerWeapon(playerid,31,500);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
 			}
 			if(listitem == 1)
			{
				if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 50,000!");
				GivePlayerMoney(playerid, -50000);
				GivePlayerWeapon(playerid,30,500);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 2)
			{
				if(GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 30,000!");
				GivePlayerMoney(playerid, -30000);
				GivePlayerWeapon(playerid,29,500);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 3)
			{
				if(GetPlayerMoney(playerid) < 25000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 25,000!");
				GivePlayerMoney(playerid, -25000);
				GivePlayerWeapon(playerid,32,500);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 4)
			{
				if(GetPlayerMoney(playerid) < 25000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 25,000!");
				GivePlayerMoney(playerid, -25000);
				GivePlayerWeapon(playerid,28,500);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 5)
			{
				if(GetPlayerMoney(playerid) < 35000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 35,000!");
				GivePlayerMoney(playerid, -35000);
				GivePlayerWeapon(playerid,24,500);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 6)
			{
				if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 2,000!");
				GivePlayerMoney(playerid, -2000);
				GivePlayerWeapon(playerid,23,100);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 7)
			{
				if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 10,000!");
				GivePlayerMoney(playerid, -10000);
				GivePlayerWeapon(playerid,22,600);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 8)
			{
				if(GetPlayerMoney(playerid) < 60000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 60,000!");
				GivePlayerMoney(playerid, -60000);
				GivePlayerWeapon(playerid,26,100);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 9)
			{
				if(GetPlayerMoney(playerid) < 60000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 60,000!");
				GivePlayerMoney(playerid, -60000);
				GivePlayerWeapon(playerid,27,100);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 10)
			{
				if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 10,000!");
				GivePlayerMoney(playerid, -10000);
				GivePlayerWeapon(playerid,16,30);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 11)
			{
				if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 10,000!");
				GivePlayerMoney(playerid, -10000);
				GivePlayerWeapon(playerid,18,30);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 12)
			{
				if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 10,000!");
				GivePlayerWeapon(playerid,34,100);
				GivePlayerMoney(playerid,-10000);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 13)
			{
				if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 5,000!");
				GivePlayerMoney(playerid, -5000);
				SetPlayerArmour(playerid, 100);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 14)
			{
				if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 5,000!");
				GivePlayerMoney(playerid, -5000);
				SetPlayerHealth(playerid, 100);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
			if(listitem == 15)
			{
				if(GetPlayerMoney(playerid) < 500000) return SendClientMessage(playerid,0xFF0000AA, "You don't have enough money!You Need 500,000!");
				GivePlayerWeapon(playerid,35,5);
				GivePlayerMoney(playerid,-500000);
				new Float:pX, Float:pY, Float:pZ;
				PlayerPlaySound(playerid,1057,pX,pY,pZ);
				GameTextForPlayer(playerid, "ITEM ~g~PURCHASED", 2000, 6);
			}
		}
	}
	return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
Reply
#4

Quote:
Originally Posted by Bakr
If it does kick you, are you using any other filterscripts? The dialog IDs may be conflicting.
Check your filterscripts and make sure they don't use the ID 1. If they do, change the ID in your script to something else that is not used in the filterscript or your current script.
Reply
#5

it Says HayZatic Has Left The Server : (Kick/banned)
Reply
#6

I accidentally edited my post above instead of replying (-.-)

Check it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)