17.05.2010, 00:48
Definitely not in OnPlayerUpdate. That gets called very quickly. You could call it if you wanted to but it's really unnecessary and might make your server lag. Just use a timer. Call it every second or second and a half or so.
Try that out. Don't forget to put the range in.
pawn Код:
//At the top
forward Teleport();
//OnGameModeInit
SetTimer("Teleport",1500,1);
public Teleport()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i,3453535,3453.45345,345.34)
{
SetPlayerPos(i,3453.345.,3453,45.345,3434);
}
}
return 1;
}

