On server start,GangZoneShowForAll - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: On server start,GangZoneShowForAll (
/showthread.php?tid=68623)
On server start,GangZoneShowForAll -
xbatista - 12.03.2009
How to show gangzone to all on server start...
Re: On server start,GangZoneShowForAll -
NeRoSiS - 12.03.2009
Under OnPlayerConnect Like this
Код:
public OnPlayerConnect(playerid)
{
new gangzone;
gangzone = GangZoneCreate(1248.011, 2072.804, 1439.348, 2204.319);
GangZoneShowForAll(gangzone,COLOR_RED);
return 1;
}
This would mean whenever a player joins the server, he can see the gangzone,
Hope I helped.
Re: On server start,GangZoneShowForAll -
xbatista - 12.03.2009
Thanks for helping

But look:
InGameModInit:
SetTimer("WarArea", 500, 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);
}
}
When server started the area is YELLOW,but I need that YELLOW do just 1-time per server start,but this YELLOW is always with timer in 500milisecs.
Re: On server start,GangZoneShowForAll -
[RP]Rav - 12.03.2009
pawn Код:
public OnGameModeInit()
{
[...]
SetTimer("WarArea", 500, 0);
// or even better, just call it directly
// WarArea();
[...]
return 1;
}
https://sampwiki.blast.hk/wiki/SetTimer
Re: On server start,GangZoneShowForAll -
xbatista - 12.03.2009
If repeating 0,YELLOW gang area won't show...
Only with repeating :/
How to solve it? :/
Re: On server start,GangZoneShowForAll -
[RP]Rav - 12.03.2009
pawn Код:
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;
}