SA-MP Forums Archive
Gangzone problem - 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: Gangzone problem (/showthread.php?tid=550497)



Gangzone problem - ThePrince - 13.12.2014

If player enter in turfs and exit i want to send a message : Stay in gangzone or you lose HP. and timer, 5,4,3,2,1 and player lose -5HP.

Please help.


Re: Gangzone problem - Sledgehammer - 13.12.2014

You can't detect if a player has left or entered a gang zone, although there are alternative ways of detecting this.

I suggest using streamer: https://sampforum.blast.hk/showthread.php?tid=102865 and doing area checks.

pawn Код:
native CreateDynamicRectangle(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1);
pawn Код:
forward OnPlayerEnterDynamicArea(playerid, areaid);
forward OnPlayerLeaveDynamicArea(playerid, areaid);
Just like how you would create a gangzone.