07.06.2013, 18:43
Simple Deathmatch Zones Include
By: Yuryfury
What is it?By: Yuryfury
This is an old include that I dug up that I thought some of you might find useful (particularly if you have stunt/freeroam servers). This includes makes it simple to create "deathmatch zones" and regulate what happens when a player either enters or leaves on of these zones.
What functions/callbacks are included?
Functions:
pawn Code:
native CreateDeathmatchZone(Float:minx,Float:miny,Float:maxx,Float:maxy);
native DestroyDeathmatchZone(dmzoneid);
native IsPlayerInDMZone(playerid,dmzoneid);
native IsPlayerInAnyDMZone(playerid);
native GetPlayerDMZone(playerid);
pawn Code:
OnPlayerEnterDeathmatchZone(playerid,dmzoneid)
OnPlayerLeaveDeathmatchZone(playerid,dmzoneid)
Simply add the include to the include folder, add "#include<SimpleDMZones>" to any gamemode/filterscript and add the following callbacks:
pawn Code:
public OnPlayerEnterDeathmatchZone(playerid,dmzoneid)
{
return 1;
}
public OnPlayerLeaveDeathmatchZone(playerid,dmzoneid)
{
return 1;
}
Pastebin
simply paste into notepad and save as a .inc