21.01.2014, 19:03
Quote:
//EDIT: forgot to change the params of the control structure from wiki in my first post, sorry! fixed that by now
well, you don't really have to #define it. You can write comments to the area lines in the switch of the function but yeah, that's how it works ![]() also, just coded that, in case you need to get a area id: pawn Код:
|
pawn Код:
CMD:claimturf(playerid)
{
if(IsInArea(playerid,0))
{
SendClientMessage(playerid, COLOR_NEWBIE, "This is the Wang Family's home turf, you can not /claimturf here!");
}
else if(IsInArea(playerid,1))
{
GangZoneFlashForAll(GangZone1, COLOR_WHITE);
SetTimerEx("GangZoneTimer", 300000, false, "i", playerid);
}
else if(IsInArea(playerid,2))
{
GangZoneFlashForAll(GangZone2, COLOR_WHITE);
SetTimerEx("GangZoneTimer", 300000, false, "i", playerid);
}
return 1;
}
pawn Код:
public GangZoneTimer(playerid)
{
return 1;
}
pawn Код:
for (new i; i < MAX_PLAYERS; i++)
if(IsInArea(i, areaid)