SA-MP Forums Archive
Gang Zone message - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Gang Zone message (/showthread.php?tid=144726)



Gang Zone message - ruckfules99 - 28.04.2010

I have a gang zone for the army team.






But i'd like to make it so that, As soon as a player enters the purple, it shows a message with a countdown saying:


"You are on Army grounds, Please leave or you will be attacked" With a countdown of lets say 10 seconds.

Can someone help me with that



Re: Gang Zone message - Las Venturas CNR - 28.04.2010

Hmm... I need to know this too, but make you wanted instead


Re: Gang Zone message - aircombat - 29.04.2010

use IsPlayerIsInRangeOfPoint


Re: Gang Zone message - ruckfules99 - 29.04.2010

Quote:
Originally Posted by Etch ❽ H
use IsPlayerIsInRangeOfPoint
How would i do it for the whole army zone?


Re: Gang Zone message - maij - 29.04.2010

To answer this question, so far there is only 1 way possible that I know of.

Create an updating timer that holds the variables whether you are inside a zone or not and which zone that is.
use update for every 1,5-2,0 second(s) should be fine
It takes some computer effort but the server can keep up.

OnPlayerEnterZone
if id of the zone equals to your military zone, then createtimer to show message.
OnPlayerZoneLeave
Destroy the created timer, but check if there was one to begin with, you never know.

This is the concept, now for you the time to actually write it, cuz I am not crazy enough to do it for you.




Re: Gang Zone message - Ibanez - 29.04.2010

Theres a function lurking around called IsPlayerInArea, search for it. As for the message you can find some countdown code somewhere on the forum too and use it with the IsPlayerInArea function