Wanted enter don't work
#10

Not workin`...

Код:
if(strcmp(cmd, "/enter", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
			for(new i = 0; i < sizeof(HouseInfo); i++)
			{
			if(GetPlayerWantedLevel(playerid) > 0) return SendClientMessage(playerid, 0xFF0000FF, "You're wanted by police and can't get into into any home.");
			    {
				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]);
						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;
					}
					else
					{
						GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
					}
				}
				}
			}
			for(new i = 0; i < sizeof(BizzInfo); i++)
			{
			if(GetPlayerWantedLevel(playerid) > 0) return SendClientMessage(playerid, 0xFF0000FF, "You're wanted by police and can't get into into any home.");
			    {
				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;
							}
							GivePlayerMoney(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);
					}
				}
				}
			}
Reply


Messages In This Thread
Wanted enter don't work - by qUick1337 - 28.06.2011, 14:33
Re: Wanted enter don't work - by bartje01 - 28.06.2011, 15:10
Re: Wanted enter don't work - by Shadoww5 - 28.06.2011, 15:35
Re: Wanted enter don't work - by qUick1337 - 28.06.2011, 19:49
Re: Wanted enter don't work - by Shadoww5 - 28.06.2011, 21:20
Re: Wanted enter don't work - by qUick1337 - 28.06.2011, 22:14
Re: Wanted enter don't work - by Shadoww5 - 28.06.2011, 22:34
Re: Wanted enter don't work - by qUick1337 - 28.06.2011, 23:07
Re: Wanted enter don't work - by Shadoww5 - 29.06.2011, 01:03
Re: Wanted enter don't work - by qUick1337 - 29.06.2011, 09:37

Forum Jump:


Users browsing this thread: 1 Guest(s)