where to put this ?
#5

Well 'i' is part of the for loop I made. That would loop through all the players and check if any of them are in the range of the point. If you used the code you just posted, it would only work for playerid 0 because that's what it would be by default. And you could do the area way also.

pawn Код:
public Teleport()
{
   new Float:x,Float:y,Float:z;
   for(new i; i<MAX_PLAYERS; i++)
   {
     GetPlayerPos(i,x,y,z);
     if((x > min_x) && (x < max_x) && (y > min_y) && (y < max_y))
     {
        SetPlayerPos(i,3453.345.,3453,45.345,3434);
     }
   }
   return 1;
}
You would have to replace 'min_x' with the maximum x of the area, etc.
Reply


Messages In This Thread
where to put this ? - by AlbanianGuy - 17.05.2010, 00:38
Re: where to put this ? - by Backwardsman97 - 17.05.2010, 00:48
Re: where to put this ? - by AlbanianGuy - 17.05.2010, 00:55
Re: where to put this ? - by AlbanianGuy - 17.05.2010, 01:04
Re: where to put this ? - by Backwardsman97 - 17.05.2010, 01:23
Re: where to put this ? - by AlbanianGuy - 17.05.2010, 01:35
Re: where to put this ? - by Backwardsman97 - 17.05.2010, 01:43
Re: where to put this ? - by AlbanianGuy - 17.05.2010, 01:45
Re: where to put this ? - by AlbanianGuy - 17.05.2010, 02:11
Re: where to put this ? - by Backwardsman97 - 17.05.2010, 02:52

Forum Jump:


Users browsing this thread: 1 Guest(s)