[HELP] death match zone area
#1

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
Reply
#2

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.
Reply
#3

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)