[Pomoc] Oko ulaska


Započeo CarterIV, Decembar 08, 2012, 15:12:04 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: GF
Detaljan opis problema: Pa ulazi mi se na /enter i to zelim promjeniti da se ulazi na tipku enter
Dio skripte:
if(strcmp(cmd, "/enter", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
   			for(new i = 0; i < sizeof(HouseInfo); i++)
			{
				if (IsPlayerInRangeOfPoint(playerid,2,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]) && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hDate])
				{
					//printf("Found House :%d",i);
					if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0 || GetPVarInt(playerid, "AdminOnDuty") == 1)
					{
						SetPlayerInterior(playerid,HouseInfo[i][hInt]);
						SetPlayerVirtualWorld(playerid,HouseInfo[i][hVirtualWorld]);
						SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
						GameTextForPlayer(playerid, "~w~Dobro dosli kuci", 5000, 1);
						PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
						PlayerInfo[playerid][pLocal] = i;
					}
					else
					{
						GameTextForPlayer(playerid, "~r~Zakljucano", 5000, 1);
					}
				}
			}
			for(new i = 0; i < sizeof(ApartmentComplexInfo); i++)
			{
				if (IsPlayerInRangeOfPoint(playerid,3,ApartmentComplexInfo[i][acEnterx], ApartmentComplexInfo[i][acEntery], ApartmentComplexInfo[i][acEnterz]))
				{
					SetPlayerInterior(playerid,ApartmentComplexInfo[i][acInt]);
					SetPlayerVirtualWorld(playerid,ApartmentComplexInfo[i][acVirtualWorld]);
					SetPlayerPos(playerid,ApartmentComplexInfo[i][acLocationx],ApartmentComplexInfo[i][acLocationy],ApartmentComplexInfo[i][acLocationz]);
					PlayerInfo[playerid][pInt] = ApartmentComplexInfo[i][acInt];
					PlayerInfo[playerid][pLocal] = i;
				}
			}
			for(new i = 0; i < sizeof(ePickupInfo); i++)
			{
				if (IsPlayerInRangeOfPoint(playerid,3,ePickupInfo[i][epEntrancex], ePickupInfo[i][epEntrancey], ePickupInfo[i][epEntrancez]))
				{
					if(ePickupInfo[i][epCanEnter] == 1)
					{
						if(PlayerInfo[playerid][pMember] == ePickupInfo[i][epOrganizations] || PlayerInfo[playerid][pLeader] == ePickupInfo[i][epOrganizations] || PlayerInfo[playerid][pJob] == ePickupInfo[i][epJob] || ePickupInfo[i][epOrganizations] == 255 || ePickupInfo[i][epJob] == 255)
						{
						    if(GetPVarInt(playerid, "CantEnterNow") == 0)
			    			{
							    TogglePlayerControllable(playerid, 0);
								SetTimerEx("PlayerUnfreeze", 4000, 0, "i", playerid);
								SetPlayerInterior(playerid,ePickupInfo[i][epInt]);
								SetPlayerVirtualWorld(playerid,ePickupInfo[i][epViwo]);
								SetPlayerPos(playerid,ePickupInfo[i][epExitx],ePickupInfo[i][epExity],ePickupInfo[i][epExitz]);
								PlayerInfo[playerid][pInt] = ePickupInfo[i][epInt];
								PlayerInfo[playerid][pLocal] = ePickupInfo[i][epViwo];
								SetPVarInt(playerid, "CantEnterNow", 1);
								format(string, sizeof(string), "%s", ePickupInfo[i][epDiscription]);
					    		GameTextForPlayer(playerid, string, 500, 1);
						    	if(i == 28)
						    	{
						    	    SetPlayerInterior(playerid,0);
									SetPlayerVirtualWorld(playerid,0);
								}
							}
						}
						else
							GameTextForPlayer(playerid, "~r~Zakljucano", 5000, 1);
					}
				}
			}
   			for(new i = 0; i < sizeof(BizzInfo); i++)
			{
				if (IsPlayerInRangeOfPoint(playerid,3,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
				{
					if(!PlayerInfo[playerid][pGunLic] && i == 0 || !PlayerInfo[playerid][pGunLic] && i == 1)
					{
					    SendClientMessage(playerid, COLOR_YELLOW, "Zaposlenik: Nemate potrebne dozvole, zao mi je ali nemogu vas pustiti!");
					    return 1;
					}
					if(!IsOfficer(playerid) && i == 4 || !IsAgent(playerid) && i == 5)
					{
					    SendClientMessage(playerid, COLOR_RED, "   Samo policajci !");
					    return 1;
					}
					if(BizzInfo[i][bDestroyed] != 0)
					{
					    SendClientMessage(playerid, COLOR_RED, "Ovaj biznis je unisten i ceka renoviranje!");
					    return 1;
					}
					/*if(PlayerInfo[playerid][pPbiskey] == i || SafeGetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
					{*/
					if(PlayerInfo[playerid][pPbiskey] != i)
					{
						if(BizzInfo[i][bLocked] == 1)
						{
							GameTextForPlayer(playerid, "~r~Zatvoreno", 3000, 1);
							return 1;
						}
						if(BizzInfo[i][bProducts] == 0)
						{
							GameTextForPlayer(playerid, "~r~Nema produkta", 3000, 1);
							return 1;
						}
						if(BizzInfo[i][bType] == BIZZ_TYPE_BAR || BizzInfo[i][bType] == BIZZ_TYPE_STRIP)
						{
						    if(SafeGetPlayerMoney(playerid) < BizzInfo[i][bEntranceCost])
						    {
						        SendClientMessage(playerid, COLOR_RED, "Za ulazak u ovaj biznis trebate novac (Pise na vratima)!");
								return 1;
						    }
							SafeGivePlayerMoney(playerid, -BizzInfo[i][bEntranceCost]);
							BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
						}
					}
					if(i == 0 || i == 1)
		   			{
		   			    SetPVarInt(playerid, "ammunationtimer", SetTimerEx("ShowAmmunationItems", 200, 1, "i", playerid));
				    	SetPVarInt(playerid, "PlayerInAmmunation", 1);
				    }
				    
				    if(BizzInfo[i][bType] == BIZZ_TYPE_BINCO)//Binco Clothes
				    {
                        SetPVarInt(playerid, "PlayerInShop", 2);
						SetPVarInt(playerid, "PlayerEnteredShop", 1);
					}
					else if(BizzInfo[i][bType] == BIZZ_TYPE_ZIP)//Zip Clothes
				    {
				        SetPVarInt(playerid, "PlayerInShop", 1);
						SetPVarInt(playerid, "PlayerEnteredShop", 1);
				    }
				    else if(BizzInfo[i][bType] == BIZZ_TYPE_PROLAPS)//Pro Laps Clothes
				    {
				        SetPVarInt(playerid, "PlayerInShop", 3);
						SetPVarInt(playerid, "PlayerEnteredShop", 1);
				    }
				    else if(BizzInfo[i][bType] == BIZZ_TYPE_SUBURBAN)//Sub Urban Clothes
				    {
				        SetPVarInt(playerid, "PlayerInShop", 4);
						SetPVarInt(playerid, "PlayerEnteredShop", 1);
				    }
				    else if(BizzInfo[i][bType] == BIZZ_TYPE_SEXSHOP)
				    {
				        sexshoptimer[playerid] = SetTimerEx("ShowSexShopItems", 200, 1, "i", playerid);
		    			SetPVarInt(playerid, "PlayerInSexShop", 1);
				    }
				    SetPVarInt(playerid, "PlayerInBizz", i);
					SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
					SetPlayerVirtualWorld(playerid,BizzInfo[i][bVirtualWorld]);
					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 je platio $%d da udje u biznis %d", dood, BizzInfo[i][bEntranceCost], i);
					PayLog(string);
					//PlayerInfo[playerid][pLocal] = i;
				}
			}
			for(new i = 0; i < sizeof(EventInfo); i++)
			{
				if (IsPlayerInRangeOfPoint(playerid,3,EventInfo[i][eEntranceX], EventInfo[i][eEntranceY], EventInfo[i][eEntranceZ]))
				{
				    if(EventInfo[i][eOther1] != 1)
				    {
						SendClientMessage(playerid, COLOR_RED, "Ovaj event nema interier!");
						return 1;
					}
					if(SafeGetPlayerMoney(playerid) >= EventInfo[i][eEntranceCost])
					{
						if(EventInfo[i][eLocked] == 0)
						{
							if(i == 3)
							{
                                SetPlayerVirtualWorld(playerid,0);
								PlayerInfo[playerid][pInt] = 15;
								PlayerInfo[playerid][pLocal] = 0;
							}
							SafeGivePlayerMoney(playerid,-EventInfo[i][eEntranceCost]);
							EventInfo[i][eTill] += EventInfo[i][eEntranceCost];
							SetPlayerPos(playerid,EventInfo[i][eExitX],EventInfo[i][eExitY],EventInfo[i][eExitZ]);
							SetPlayerInterior(playerid,EventInfo[i][eInterior]);
						}
						else
						{
                            GameTextForPlayer(playerid, "~r~Zatvoreno", 2000, 1);
                            return 1;
						}
					}
					else
					{
						GameTextForPlayer(playerid, "~r~Nemate novaca", 2000, 1);
					}
				}
			}
			for(new i = 0; i < sizeof(SBizzInfo); i++)
			{
				if (IsPlayerInRangeOfPoint(playerid,3,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
				{
					if(PlayerInfo[playerid][pPbiskey] == i || SafeGetPlayerMoney(playerid) >= SBizzInfo[i][sbEntranceCost])
					{
						if(PlayerInfo[playerid][pPbiskey] != i)
						{
							if(SBizzInfo[i][sbLocked] == 1)
							{
								GameTextForPlayer(playerid, "~r~Zatvoreno", 5000, 1);
								return 1;
							}
							if(SBizzInfo[i][sbDestroyed] != 0)
							{
							    SendClientMessage(playerid, COLOR_RED, "Ovaj biznis je unisten i ceka renoviranje!");
							    return 1;
							}
							if(SBizzInfo[i][sbProducts] == 0)
							{
								GameTextForPlayer(playerid, "~r~Nema produkta", 5000, 1);
								return 1;
							}
							else if(i == 11)
							{
							    SetPVarInt(playerid, "PlayerKarting", 1);
							    SendClientMessage(playerid, TEAM_GROVE_COLOR, "Sada sudjelujete u Karting utrci, uzmite Kart.");
							}
							else
							{
							    return 1;
							}
							SafeGivePlayerMoney(playerid,-SBizzInfo[i][sbEntranceCost]);
							SetPVarInt(playerid, "gSpentCash", SafeGetPlayerMoney(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 je platio $%d da udje u biznis %d", dood, SBizzInfo[i][sbEntranceCost], i);
							PayLog(string);
						}
					}
					else
					{
						GameTextForPlayer(playerid, "~r~Nemate novaca", 5000, 1);
					}
				}
			}
			if (IsPlayerInRangeOfPoint(playerid, 3, 1183.0424,-1796.5673,33.6363)) // Auto Skola Enter
			{
				SetPlayerPos(playerid, -2026.8711,-105.0209,1035.1719);
				SetPlayerInterior(playerid, 3);
				SetPlayerVirtualWorld(playerid, 25);
				PlayerInfo[playerid][pLocal] = 25;
				PlayerInfo[playerid][pInt] = 3;
		    }
			else if (IsPlayerInRangeOfPoint(playerid, 5, 1654.9797,-1806.2512,13.5450)) // Street Racers Enter u tunel (kanalizacija) /enter
			{
				SetPlayerInterior(playerid,3);
				SetPlayerPos(playerid,520.8687,661.4235,600.4985);
			}
			else if (IsPlayerInRangeOfPoint(playerid, 5, 1488.6545,-1722.0299,8.1969)) // SR
			{
				SetPlayerInterior(playerid,3);
				SetPlayerPos(playerid,580.1227,718.6010,597.3470);
			}
			else if (IsPlayerInRangeOfPoint(playerid, 3, 1528.5972,-1683.2820,30149.5664)) // PD /enter za skladiste
			{
				GameTextForPlayer(playerid, "~g~PD Skladiste", 5000, 1);
				SetPlayerInterior(playerid,3);
				SetPlayerVirtualWorld(playerid, 33);
				SetPlayerPos(playerid,1583.3042,-1772.2577,30133.1855);
			}
			else if (IsPlayerInRangeOfPoint(playerid, 4, 1522.6476,-1687.0415,30149.5664)) // PD /enter za sastanak
			{
				GameTextForPlayer(playerid, "~g~Soba za sastanke", 5000, 1);
				SetPlayerInterior(playerid,3);
				SetPlayerVirtualWorld(playerid, 33);
				SetPlayerPos(playerid,1596.6632,-1613.5913,30153.7148);
			}
			else if (IsPlayerInRangeOfPoint(playerid, 3, 1527.9299,-1687.3544,30149.5664)) // PD /enter hodnik prema zatvoru
			{
				GameTextForPlayer(playerid, "~g~Hodnik", 5000, 1);
				SetPlayerInterior(playerid,3);
				SetPlayerVirtualWorld(playerid, 33);
				SetPlayerPos(playerid,1470.4375,-1614.2186,30147.0742);
			}
			else if (IsPlayerInRangeOfPoint(playerid, 4, 1478.1338,-1608.6088,30142.7051)) // PD /enter  zatvoru
			{
				GameTextForPlayer(playerid, "~g~Zatvor", 5000, 1);
				SetPlayerInterior(playerid,3);
				SetPlayerVirtualWorld(playerid, 33);
				SetPlayerPos(playerid,1492.9790,-1604.9498,30143.9004);
			}
		}
		return 1;
	}

Neke slike/video za lakse dobivanje pomoci(neobavezno)://