[Help]Pawno when i compilr dont respond
#1

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  new string[256];
	new sendername[MAX_PLAYER_NAME];
	new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
	new newcar = GetPlayerVehicleID(playerid);
  if(newkeys == KEY_JUMP)
  {
    if(IsPlayerInAnyVehicle(playerid))
    {
			if(IsPlayerConnected(playerid))
			{
				if(!engineOn[GetPlayerVehicleID(playerid)])
				{
					if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
					{
						return 1;
					}
					if(IsAnOwnableCar(newcar))
					{
					  if(PlayerInfo[playerid][pPcarkey] == newcar) { }
						else if(PlayerInfo[playerid][pPcarkey2] == newcar) { }
						else if(PlayerInfo[playerid][pPcarkey3] == newcar) { }
						else { return 1; }
					}
					if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509)
					{
						return 1;
					}
					if(newcar == 59 || newcar == 60)
					{
						return 1;
					}
					if(newcar >= 135 && newcar <= 154)
					{
					  if(HireCar[playerid] != newcar)
					  {
							return 1;
						}
					}
					if(IsAHarvest(newcar))
					{
					  return 1;
					}
					if(IsADrugHarvest(newcar))
					{
					  return 1;
					}
					if(IsAPlane(newcar))
					{
						return 1;
					}
					if(IsASweeper(newcar))
					{
						return 1;
					}
					
				}
			}
		}
  }
  else if(newkeys == KEY_SECONDARY_ATTACK)
  {
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
      if(gEngine[playerid] == 0 && engineOn[newcar] == 0)
      {
				RemovePlayerFromVehicle(playerid);
				TogglePlayerControllable(playerid, 1);
				return 1;
      }
      else if(NoFuel[playerid] == 1)
			{
			  TogglePlayerControllable(playerid, 1);
				RemovePlayerFromVehicle(playerid);
				NoFuel[playerid] = 0;
				return 1;
			}
    }
  }
  return 1;
}
 else if(newkeys == KEY_WALK)
	{
	  if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
			for(new i = 0; i < sizeof(HouseInfo); i++)
			{
				if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
				{
					//printf("Found House :%d",i);
					if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
					{
						SetPlayerInterior(playerid,HouseInfo[i][hInt]);
						SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]);
						SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
						GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
						PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
						PlayerInfo[playerid][pLocal] = i;
						HouseEntered[playerid] = i;
					}
					else
					{
						GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
					}
				}
			}
			for(new i = 0; i < sizeof(BizzInfo); i++)
			{
				if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
				{
					//printf("Found House :%d",i);
					if(!IsACop(playerid) && i == 3)
					{
					  SendClientMessage(playerid, COLOR_GREY, "  Cops only !");
					  return 1;
					}
					if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
					{
						if(PlayerInfo[playerid][pPbiskey] != i)
						{
							if(BizzInfo[i][bLocked] == 1)
							{
								GameTextForPlayer(playerid, "~r~Closed", 5000, 1);
								return 1;
							}
							if(BizzInfo[i][bProducts] == 0)
							{
								GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
								return 1;
							}
							SafeGivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
							format(string, sizeof(string), "~r~-$%d~n~~w~type /exit~n~to get out", BizzInfo[i][bEntranceCost]);
							BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
							ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
							BizzInfo[i][bProducts]--;
							OnPropUpdate();
							GameTextForPlayer(playerid, string, 5000, 3);
						}
						SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
						SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
						PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
						PlayerInfo[playerid][pLocal] = i+99;
						new dood[MAX_PLAYER_NAME];
						GetPlayerName(playerid, dood, sizeof(dood));
						format(string, sizeof(string), "%s payed $%d to enter biz %d", dood, BizzInfo[i][bEntranceCost], i);
						printf("%s", string);
						PayLog(string);
						//PlayerInfo[playerid][pLocal] = i;
					}
					else
					{
						GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1);
					}
				}
			}
			for(new i = 0; i < sizeof(SBizzInfo); i++)
			{
				if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
				{
					if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= SBizzInfo[i][sbEntranceCost])
					{
						if(PlayerInfo[playerid][pPbiskey] != i)
						{
							if(SBizzInfo[i][sbLocked] == 1)
							{
								GameTextForPlayer(playerid, "~r~Closed", 5000, 1);
								return 1;
							}
							if(SBizzInfo[i][sbProducts] == 0)
							{
								GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
								return 1;
							}
							if(i == 10)
							{
							  PaintballPlayers ++;
							  PlayerPaintballing[playerid] = 1;
							  new rand = random(sizeof(PaintballSpawns));
								SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
								TogglePlayerControllable(playerid, 0);
							}
							else if(i == 11)
							{
							  PlayerKarting[playerid] = 1;
							  SendClientMessage(playerid, TEAM_GROVE_COLOR, "You can now parcipitate in a Karting Race, grab a Kart.");
							}
							else
							{
							  return 1;
							}
							SafeGivePlayerMoney(playerid,-SBizzInfo[i][sbEntranceCost]);
							gSpentCash[playerid] = GetPlayerMoney(playerid);
							SBizzInfo[i][sbProducts]--;
							SBizzInfo[i][sbTill] += SBizzInfo[i][sbEntranceCost];
							ExtortionSBiz(i, SBizzInfo[i][sbEntranceCost]);
							new dood[MAX_PLAYER_NAME];
							GetPlayerName(playerid, dood, sizeof(dood));
							format(string, sizeof(string), "%s payed $%d to enter sbiz %d", dood, SBizzInfo[i][sbEntranceCost], i);
							printf("%s", string);
							PayLog(string);
							OnPropUpdate();
						}
					}
					else
					{
						GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1);
					}
				}
			}
			if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
			{
			  GameTextForPlayer(playerid, "~w~Welcome to the 8ball Track", 5000, 1);
			  SetPlayerInterior(playerid,7);
			  PlayerInfo[playerid][pInt] = 7;
				SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
			}
			if (PlayerToPoint(3.0, playerid,725.3539,-1276.4338,13.6484))
			{

	  		if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
 				{
					GameTextForPlayer(playerid, "~w~TheCrimsons HQ", 5000, 1);
					SetPlayerInterior(playerid,5);
					PlayerInfo[playerid][pInt] = 5;
					SetPlayerPos(playerid,1278.0051,-782.0831,1089.9375);
				}
				else
				{
		    	SendClientMessage(playerid, COLOR_GRAD1, "  You are not a Crimison Member to enter the hq !");
					return 1;
				}
			}
			if (PlayerToPoint(3.0, playerid,1797.5171,-1579.3662,14.0893))
			{
			  GameTextForPlayer(playerid, "~w~LSPD Prison", 5000, 1);
			  SetPlayerInterior(playerid,3);
			  PlayerInfo[playerid][pInt] = 3;
				SetPlayerPos(playerid,288.7287,168.5377,1007.1719);
			}
				if (PlayerToPoint(3.0, playerid,2729.3320,-2451.3513,17.5937))
			{
          if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
 				{
			  GameTextForPlayer(playerid, "~w~Army base", 5000, 1);
			  SetPlayerInterior(playerid,3);
			  PlayerInfo[playerid][pInt] = 3;
				SetPlayerPos(playerid,1494.325195,1304.942871,1093.289062);
			}
				else
				{
		    	SendClientMessage(playerid, COLOR_GRAD1, "  You are not a Army Member to enter the hq !");
					return 1;
				}
			}
				if (PlayerToPoint(3.0, playerid,2244.3423,-1665.5542,15.4766))
			{
			  GameTextForPlayer(playerid, "~w~Welcome to Bincos Clothes shop", 5000, 1);
			  SetPlayerInterior(playerid,15);
			  PlayerInfo[playerid][pInt] = 15;
				SetPlayerPos(playerid,207.7336,-108.6231,1005.1328);
			}
			if (PlayerToPoint(3.0, playerid,1554.9537,-1675.6584,16.1953))
			{
			  GameTextForPlayer(playerid, "~b~LSPD HeadQuarters", 5000, 1);
			  SetPlayerInterior(playerid,6);
			  PlayerInfo[playerid][pInt] = 6;
				SetPlayerPos(playerid,246.7079,66.2239,1003.6406);
			}
				if (PlayerToPoint(3.0, playerid,1352.1194,-1759.2534,13.5078))
			{
			  GameTextForPlayer(playerid, "~y~24-7", 5000, 1);
			  SetPlayerInterior(playerid,6);
			  PlayerInfo[playerid][pInt] = 6;
				SetPlayerPos(playerid,-26.6916,-55.7149,1003.5469);
			}
			else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344))
			{
			  GameTextForPlayer(playerid, "~w~Welcome to the Dirt Track", 5000, 1);
			  SetPlayerInterior(playerid,4);
			  PlayerInfo[playerid][pInt] = 4;
				SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
			}
			else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
			{
			  GameTextForPlayer(playerid, "~w~Welcome to the Stunting Track", 5000, 1);
			  SetPlayerInterior(playerid,14);
			  PlayerInfo[playerid][pInt] = 14;
				SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
			}
			else if (PlayerToPoint(8.0, playerid,1073.0094,-345.4233,73.9922))
			{
			  GameTextForPlayer(playerid, "~w~Welcome to HitManHQ", 5000, 1);
			  SetPlayerInterior(playerid,11);
			  PlayerInfo[playerid][pInt] = 11;
				SetPlayerPos(playerid,501.980987,-69.150199,998.757812);
			}
			else if (PlayerToPoint(4, playerid,2073.2979,-1831.1228,13.5469))
			{ // Pay & Spray
			  if(GetPlayerState(playerid) == 2)
			  {
			    if(GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
			    {
			      if(SBizzInfo[5][sbProducts] > 0)
			      {
      					new tmpcar = GetPlayerVehicleID(playerid);
							SetVehiclePos(tmpcar, 2062.1294,-1831.5498,13.5469);
			    		SetVehicleZAngle(tmpcar, 90);
			    		SafeGivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
			    		SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
			    		SBizzInfo[5][sbProducts]--;
			    		SetTimerEx("AfterSpray1", 5000, false, "i", playerid);
						}
						else
						{
						  GameTextForPlayer(playerid, "~r~Out of stock", 5000, 1);
						}
					}
					else
					{
					  SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to enter Pay & Spray.");
					}
			  }
			}
			else if (PlayerToPoint(4, playerid,1024.9756,-1030.7930,32.0257))
			{ // Pay & Spray
			  if(GetPlayerState(playerid) == 2)
			  {
			    if(GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
			    {
			      if(SBizzInfo[5][sbProducts] > 0)
			      {
      					new tmpcar = GetPlayerVehicleID(playerid);
							SetVehiclePos(tmpcar, 1024.9763,-1021.8850,32.1016);
			    		SetVehicleZAngle(tmpcar, 0);
			    		SafeGivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
			    		SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
			    		SBizzInfo[5][sbProducts]--;
			    		SetTimerEx("AfterSpray2", 5000, false, "i", playerid);
						}
						else
						{
						  GameTextForPlayer(playerid, "~r~Out of stock", 5000, 1);
						}
					}
					else
					{
					  SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to enter Pay & Spray.");
					}
			  }
			}
			else if (PlayerToPoint(4, playerid,488.3819,-1733.0563,11.1752))
			{ // Pay & Spray
			  if(GetPlayerState(playerid) == 2)
			  {
			    if(GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
			    {
			      if(SBizzInfo[5][sbProducts] > 0)
			      {
      					new tmpcar = GetPlayerVehicleID(playerid);
							SetVehiclePos(tmpcar, 487.4099,-1741.4585,11.1330);
			    		SetVehicleZAngle(tmpcar, 180);
			    		SafeGivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
			    		SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
			    		SBizzInfo[5][sbProducts]--;
			    		SetTimerEx("AfterSpray3", 5000, false, "i", playerid);
						}
						else
						{
						  GameTextForPlayer(playerid, "~r~Out of stock", 5000, 1);
						}
					}
					else
					{
					  SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to enter Pay & Spray.");
					}
			  }
			}
			else if (PlayerToPoint(4, playerid,719.8940,-464.8272,16.3359))
			{ // Pay & Spray
			  if(GetPlayerState(playerid) == 2)
			  {
			    if(GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
			    {
			      if(SBizzInfo[5][sbProducts] > 0)
			      {
      					new tmpcar = GetPlayerVehicleID(playerid);
							SetVehiclePos(tmpcar, 720.3924,-456.0286,16.3359);
			    		SetVehicleZAngle(tmpcar, 0);
			    		SafeGivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
			    		SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
			    		SBizzInfo[5][sbProducts]--;
			    		SetTimerEx("AfterSpray4", 5000, false, "i", playerid);
						}
						else
						{
						  GameTextForPlayer(playerid, "~r~Out of stock", 5000, 1);
						}
					}
					else
					{
					  SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to enter Pay & Spray.");
					}
			  }
			}
		}
		return 1;
		}
		}
when i compile it it doesnt respond please help
Reply
#2

http://ampaste.net/m32ee1fb5 - Try
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)