IsPlayerInArea
#1

I have a system war and put three different areas where as a red square. I want that when group members out of the red square marked decrease to 5 hp to 2 seconds.

I tried with "IsPlayerInArea" but did not succeed.

HELP ME PLEASE!!!
Sorry for my bad english.
Reply
#2

Are you using streamer dynamic areas or something else? if you are using something else then provide the code.

If you are using streamer then:

pawn Код:
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
     if(areaid == (your areaid))
     {
         // code
     }
}
Reply
#3

Do not use dynamic zones

My areas are so:

1
Код:
new GangZoneFlash1, GangZoneFlash2, GangZoneFlash3;
2 (OnPlayerSpawn)
Код:
if(IsWar == true && warzone == 1) GangZoneFlashForPlayer(playerid, GangZoneFlash1, COLOR_RED);
	    else if(IsWar == true && warzone == 2) GangZoneFlashForPlayer(playerid, GangZoneFlash2, COLOR_RED);
	    else if(IsWar == true && warzone == 3) GangZoneFlashForPlayer(playerid, GangZoneFlash3, COLOR_RED);
3. (OnGamemodeInit)
Код:
GangZoneFlash1 = GangZoneCreate(351.5625,-9.375,103.125,-295.3125);
	GangZoneFlash2 = GangZoneCreate(1675.78125,-1207.03125,1867.96875,-1050);
	GangZoneFlash3 = GangZoneCreate(1054.6875,-1058.59375,1269.53125,-875);
These areas are marked with red.
Reply
#4

Then create dynamic areas with the same coordinates that you have for gang zones ( squares ) and it should work fine for you, as I believe that there's no such function for gang zones to detect if the player has left the zone or not, streamer will so the job for you; There are several types of dynamic areas, choose square..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)