Cooldown on turfs - 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: Cooldown on turfs (
/showthread.php?tid=619445)
Cooldown on turfs -
iamjems - 17.10.2016
How can I add cooldowns for each turf in
this script? For example, if Ballas capture Grove's zone, the war is over and it can't be captured again until 5 minutes.
Also, how do I get the name the turfs for future scripting?
Thanks in advance
Re: Cooldown on turfs -
Airblog - 18.10.2016
it is hard to explain all but you should define something like zTime in eZone enum
and when war ended you should set zTime to 300 (sec) and Destroy that gangzone
+ you should add this code under public ZoneTimer() :
Код:
if(ZoneInfo[i][zTime] > 0)
{
if(ZoneInfo[i][zTime] == 1) ZoneID[i] = GangZoneCreate(ZoneInfo[i][zMinX], ZoneInfo[i][zMinY], ZoneInfo[i][zMaxX], ZoneInfo[i][zMaxY]);
ZoneInfo[i][zTime] --;
}
and which zone attack you used?
if you need more help say to explain it more