SA-MP Forums Archive
Help - Why doesn't this work? :) - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help - Why doesn't this work? :) (/showthread.php?tid=124167)



Help - Why doesn't this work? :) - CrucixTM - 29.01.2010

Код:
public OnPlayerEnterArea(playerid, areaid)
{
	if(areaid == AdminZone3)
  	{
  	  if(IsPlayerAdmin(playerid) == 0)
  	  {
  			SendClientMessage(playerid, COLOR_RED, "Warning: You are trespassing VIP Territory");
  		SetPlayerHealth(playerid, 0);
		}
  	}
	return 1;
}
Код:
#include <a_samp>

//--GangZones
new AdminZone3;

//--Forwards
forward OnPlayerEnterArea(playerid, areaid);
Код:
public OnGameModeInit()
{
//-----------------------GangZones
AdminZone3 = GangZoneCreate(1403.8168, -1393.9618, 1445.0742, -1251.5936);
Код:
public OnPlayerSpawn(playerid)
{
	GangZoneShowForPlayer(playerid,AdminZone3,COLOR_RED);
Zone works, color and area displays fine but players(non admin) don't die when they enter the zone.

Ideas?


Re: Help - Why doesn't this work? :) - Vetle - 29.01.2010

OnPlayerEnterArea isnt called