IsPlayerInZone - 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)
+--- Thread: IsPlayerInZone (
/showthread.php?tid=340431)
IsPlayerInZone -
Visio - 07.05.2012
Код:
SetTimer("pezona",500, true);
forward pezona();
public pezona()
{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
for(new i=0; i<sizeof(ZoneInfo); i++)
{
if(IsPlayerInZone(playerid, i) && ZoneInfo[i][zTeam] == 12)
{
GameTextForPlayer(playerid, "bla bla",5000, 1);
return 1;
}
else if(IsPlayerInZone(playerid, i) && ZoneInfo[i][zTeam] == 13)
{
GameTextForPlayer(playerid, "bla bla",5000, 1);
return 1;
}
else if(IsPlayerInZone(playerid, i) && ZoneInfo[i][zTeam] == 14)
{
GameTextForPlayer(playerid, "bla bla",5000, 1);
return 1;
}
else if(IsPlayerInZone(playerid, i) && ZoneInfo[i][zTeam] == 15)
{
GameTextForPlayer(playerid, "bla bla",5000, 1);
return 1;
}
}
return 1;// hйhй
}
the problem is: if i am id 0 is show to me that message"bla bla" but i'am id 0+..(1,2.....)isn't show it!
Re: IsPlayerInZone -
Jonny5 - 07.05.2012
pawn Код:
SetTimer("pezona",500, true);
forward pezona();
public pezona()
{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
for(new i=0; i<sizeof(ZoneInfo); i++)
{
if(IsPlayerInZone(playerid, i) && ZoneInfo[i][zTeam] == 12)
{
GameTextForPlayer(playerid, "bla bla",5000, 1);
return 1;
}
else if(IsPlayerInZone(playerid, i) && ZoneInfo[i][zTeam] == 13)
{
GameTextForPlayer(playerid, "bla bla",5000, 1);
return 1;
}
else if(IsPlayerInZone(playerid, i) && ZoneInfo[i][zTeam] == 14)
{
GameTextForPlayer(playerid, "bla bla",5000, 1);
return 1;
}
else if(IsPlayerInZone(playerid, i) && ZoneInfo[i][zTeam] == 15)
{
GameTextForPlayer(playerid, "bla bla",5000, 1);
return 1;
}
}
}
return 1;// hйhй
}
try this
Re: IsPlayerInZone -
Visio - 07.05.2012
thx,i try now to see that is working[rep + for you]
edit
is idem
is show only i'm id 0
Re: IsPlayerInZone -
Jonny5 - 07.05.2012
i dont understand what your saying.
Re: IsPlayerInZone -
Visio - 07.05.2012
I used your script but still does not work
if i am id 0 is working
work only for id 0
Re: IsPlayerInZone -
Visio - 07.05.2012
bump
Re: IsPlayerInZone -
ViniBorn - 07.05.2012
Delete the return
pawn Код:
public pezona()
{
for(new playerid; playerid != MAX_PLAYERS; playerid++)
for(new i; i<sizeof(ZoneInfo); i++)
{
if(IsPlayerInZone(playerid, i) && ZoneInfo[i][zTeam] == 12)
{
GameTextForPlayer(playerid, "bla bla",5000, 1);
}
else if(IsPlayerInZone(playerid, i) && ZoneInfo[i][zTeam] == 13)
{
GameTextForPlayer(playerid, "bla bla",5000, 1);
}
else if(IsPlayerInZone(playerid, i) && ZoneInfo[i][zTeam] == 14)
{
GameTextForPlayer(playerid, "bla bla",5000, 1);
}
else if(IsPlayerInZone(playerid, i) && ZoneInfo[i][zTeam] == 15)
{
GameTextForPlayer(playerid, "bla bla",5000, 1);
}
}
return 1;// hйhй
}
Re: IsPlayerInZone -
Visio - 07.05.2012
error 010: invalid function or declaration
return 1;// hйhй
Re: IsPlayerInZone -
ViniBorn - 07.05.2012
Try again
Re: IsPlayerInZone -
Visio - 07.05.2012
perfect working,thx man
i have 1 questions
how can i do sho message only time per teritory?