SA-MP Forums Archive
Player Private Zone - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Player Private Zone (/showthread.php?tid=310110)



Player Private Zone - GtaO_Magnifico - 10.01.2012

I created a zone for player, so others cant go there, like gang zones, but it aint work, other players spawn and they got killed, i putted spawn point at the zone and nothing happens, all is ok...

It works reverse of that i need It makes players to play only in that small zone and if they get out they got AutoKilled

Here is the script


Код:
forward isPlayerInArea(playerid);

public OnPlayerConnect(playerid)
	{
	SetTimerEx("isPlayerInArea", 1000, true, "i", playerid);
	return 1;
	}
public isPlayerInArea(playerid)
	{
	new Float:areaX, Float:areaY, Float:areaZ;
        GetPlayerPos(playerid, areaX, areaY, areaZ);
        GetPlayerName(playerid, eName, sizeof(eName));
	if (areaX <= 1533.2106 && areaX >= 1117.5963 && areaY <= 2881.7175 && areaY >= 2724.4983)
		{
   		if(strfind(eName, "GtaO_Magnifico", true) != -1 || strfind(eName, "[DTK]", true) != -1)
			{
			return 1;
			}
		   else
			{
			SetPlayerHealth(playerid, 0);
			}
		}
	return 1;
	}



Re: Player Private Zone - GtaO_Magnifico - 11.01.2012

Can somebody help me? -_-