SA-MP Forums Archive
[Help] Area - 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] Area (/showthread.php?tid=68467)



[Help] Area - Viktor_Burns - 10.03.2009

Hi, im using [INC] Areas, great include.
But there's one problem, I want to make when player entering the area he will Recieve a message: Welcome to safe zone.
I've already coded it by myself, compiles fine, but when I enter the area it appears no message.

I think the problem is my messed up CreateArea, I don't think I putted the coordinates on right place.
So if anyone could make the CreateArea right for me I would appreciate that.

Here's the coordinates I have:
1722.4690,-1650.6730,20.2292,180.0000,0,0,0,0,0,0); // SMinY
1715.8813,-1655.8546,20.2229,275.8809,0,0,0,0,0,0); // EMinX
1721.9384,-1661.2452,20.2304,2.0483,0,0,0,0,0,0); // NMaxY
1726.7057,-1655.0289,20.2317,90.7225,0,0,0,0,0,0); // WMaxX


Re: [Help] Area - AiVAMAN - 10.03.2009

[INC]Areas... who made it?


Re: [Help] Area - Think - 10.03.2009

did you check if the player is in the area? if yes, in a timer? because else you would need to be there @ gamemodeinit but you cant


Re: [Help] Area - Viktor_Burns - 10.03.2009

Quote:
Originally Posted by Pandabeer1337
did you check if the player is in the area? if yes, in a timer? because else you would need to be there @ gamemodeinit but you cant
Nope, the only I have is
Код:
public OnPlayerEnterArea(playerid,areaid)//Somewhere else not in a function
{
	 if (areaid==0) SendClientMessage(playerid, COLOR_GREEN, "Welcome to safe zone");

	 return 1;
}
and
Код:
public OnPlayerExitArea(playerid,areaid)//Somewhere else not in a function
{
       if (areaid==0) SendClientMessage(playerid, COLOR_YELLOW, You left the safe zone");
	 return 1;
How would I check if the player is in the area?



Re: [Help] Area - ledzep - 16.03.2009

You probably have to make a timer that checks if the player is in the area every second or so if they are in the area it would:

Код:
CallRemoteFunction("OnPlayerEnterArea", "ii", playerid, areaid);