12.03.2009, 08:06
How to show gangzone to all on server start...
public OnPlayerConnect(playerid)
{
new gangzone;
gangzone = GangZoneCreate(1248.011, 2072.804, 1439.348, 2204.319);
GangZoneShowForAll(gangzone,COLOR_RED);
return 1;
}

public WarArea(playerid)
{
GangZoneShowForAll(Ter, COLOR_YELLOW);
if (IsPlayerInArea(playerid, -291.9469, 2627.522, -163.4902, 2755.979) && gTeam[playerid] == TEAM_NASA)
{
GangZoneShowForAll(Ter, COLOR_BLUE);
}
}
public OnGameModeInit()
{
[...]
SetTimer("WarArea", 500, 0);
// or even better, just call it directly
// WarArea();
[...]
return 1;
}
public OnPlayerSpawn(playerid)
{
[...]
// show the gangzone to everyone once they connect
GangZoneShowForPlayer(playerid, Ter, COLOR_YELLOW);
[...]
return 1;
}
// timer you already have
public WarArea(playerid)
{
if (IsPlayerInArea(playerid, -291.9469, 2627.522, -163.4902, 2755.979) && gTeam[playerid] == TEAM_NASA)
GangZoneShowForPlayer(playerid,Ter, COLOR_BLUE);
else
GangZoneShowForPlayer(playerid, Ter, COLOR_YELLOW);
return 1;
}