How do I make a loop that skips a player?
#1

How do I make a loop that skips a a selected player? I'm trying to make a GetClosestPlayer function but when it loops it always says the player is closest to the player. Obviously, I need to skip checking that player.
Reply
#2

Lemme see some code!
Reply
#3

pawn Код:
foreach(Player, i)
{
    if(i == playerid) continue;
}
Reply
#4

for(new i=0;i<=MAX_PLAYERS;i++)
{
if(i != playerid)
{
//stuff here
}
}
Reply
#5

thanks man
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)