[HELP] death match zone area
#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


Messages In This Thread
[HELP] death match zone area - by Luca12 - 16.01.2014, 08:33
Re: [HELP] death match zone area - by CH | FuDo - 16.01.2014, 09:28
Re: [HELP] death match zone area - by Luca12 - 16.01.2014, 09:43
Re: [HELP] death match zone area - by CH | FuDo - 18.01.2014, 12:50
Re: [HELP] death match zone area - by Luca12 - 18.01.2014, 18:18

Forum Jump:


Users browsing this thread: 1 Guest(s)