SA-MP Forums Archive
OnPlayerEnterArea - 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: OnPlayerEnterArea (/showthread.php?tid=87975)



OnPlayerEnterArea - V1ceC1ty - 23.07.2009

can someone make the callback OnPlayerEnterArea and OnPlayerExitArea?

ive searched 15 pages cant find anything that works or link works.

EDIT: ahh shit wrong section Mod please move if you can


Re: OnPlayerEnterArea - iLinx - 23.07.2009

Quote:
Originally Posted by ssǝן‾ʎ
>.>

iirc the areas.inc with onplayerenterarea never worked for me but you could still search it up if you wanted

heres a isplayerinarea i made a while ago though, if its any use
Код:
forward IsPlayerInArea(playerid, x1, x2, y1, y2);
public IsPlayerInArea(playerid,x1, x2, y1, y2)
{
	new Float:xx, Float:yy, Float:zz; GetPlayerPos(playerid, xx, yy, zz);
	if(xx > x1 && xx < x2 && yy > y1 && yy < y2) return 1;
	else return 0;
}
it returns 1 if true and 0 if false, you could incorporate timers + area id's if say you wanted to make a deathmatch zone or a safe zone