IsPlayerInZone
#1

Код:
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!
Reply
#2

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
Reply
#3

thx,i try now to see that is working[rep + for you]
edit
is idem
is show only i'm id 0
Reply
#4

i dont understand what your saying.
Reply
#5

I used your script but still does not work
if i am id 0 is working
work only for id 0
Reply
#6

bump
Reply
#7

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й
}
Reply
#8

error 010: invalid function or declaration
return 1;// hйhй
Reply
#9

Try again
Reply
#10

perfect working,thx man
i have 1 questions
how can i do sho message only time per teritory?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)