10.01.2012, 17:54
(
Последний раз редактировалось GtaO_Magnifico; 10.01.2012 в 18:58.
)
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
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;
}

