SA-MP Forums Archive
[HELP] death match zone 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: [HELP] death match zone area (/showthread.php?tid=487975)



[HELP] death match zone area - Luca12 - 16.01.2014

Hello how can I make if player leave death math zone but he is inside then if he leave that someone specific area then if he leave death match zone then he go back how can I make that if you know what I mean? Thanks


Re: [HELP] death match zone area - CH | FuDo - 16.01.2014

First of all, make the zone.

Код:
new YourZone;

public OnGameModeInit()
{
        YourZone = CreateDynamicRectangle(minx, miny, maxx, maxy, -1, -1, -1);
        return 1;
}
Then, add this:

Код:
forward OnPlayerEnterDynamicArea(playerid, areaid);
public OnPlayerEnterDynamicArea(playerid, areaid)
{
if(areaid == YourZone)
    {
      GameTextForPlayer(playerid, "You are in ZONE!", 4000, 3);//text in the screen of the player 
      ResetPlayerWeapons(playerid);//this remove arms
      }
      return 1;
}
This code was for entering zone, now making for leaving zone:

Код:
forward OnPlayerLeaveDynamicArea(playerid, areaid);
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
     if(areaid == YourZone)
    {
        GameTextForPlayer(playerid, "You're exit of the area, permitted weapons!", 4000, 3);//Text in the Screen
        //You can add more funcions how GivePlayerWeapon..
        }
    return 1;
}
Hope it helped.


Re: [HELP] death match zone area - Luca12 - 16.01.2014

what is minx miny maxx maxy and how to get it? Thanks


Re: [HELP] death match zone area - CH | FuDo - 18.01.2014

It is same as creating GangZone, minx, miny, maxx and maxy are floats on map


Re: [HELP] death match zone area - Luca12 - 18.01.2014

yes I try add that and I make zone in gangzone maker for zone but I go to the zone and leave the zone with hydra and nothing happens it should check if I go from death match zone it should be spawn player again in zone but nothing happens* Thanks