Dynamic 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)
+--- Thread: Dynamic Area (
/showthread.php?tid=661550)
Dynamic Area -
theralio - 07.12.2018
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?
Re: Dynamic Area -
XpDeviL - 07.12.2018
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;
}
Re: Dynamic Area -
Kane - 08.12.2018
You can create it at
OnGameModeInit or where ever the creation of a dynamic area becomes necessary.