Dynamic Area
#1

Hi,

How to create a dynamic area with function? i tried a few ways but i dont get it

DmMapInfo[Nitro] = CreateDynamicSphere(x,y,z,2);

how can i call it?
Reply
#2

You can add functions in
Код:
forward OnPlayerEnterDynamicArea(playerid, STREAMER_TAG_AREA areaid);
forward OnPlayerLeaveDynamicArea(playerid, STREAMER_TAG_AREA areaid);
publics.

For example:

Код:
public OnPlayerEnterDynamicArea(playerid, STREAMER_TAG_AREA areaid);
{
	if(areaid == DmMapInfo[Nitro])
	{
		SendClientMessage(playerid, 0xFFFFFF, "You have entered the area.");
	}
	return 1;
}

public OnPlayerLeaveDynamicArea(playerid, STREAMER_TAG_AREA areaid);
{
	if(areaid == DmMapInfo[Nitro])
	{
		SendClientMessage(playerid, 0xFFFFFF, "You have left the area.");
	}
	return 1;
}
Reply
#3

You can create it at OnGameModeInit or where ever the creation of a dynamic area becomes necessary.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)