[Help] Area
#1

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
Reply
#2

[INC]Areas... who made it?
Reply
#3

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
Reply
#4

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?
Reply
#5

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);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)