03.04.2011, 01:19
hi,
i need a solution fast pls!
everytime this loop is used everything in this loop is executed that often how many players are currently on the server.
So e.g. if there are 4 players on the server and the loop would include a SendClientMessageToAll, this message would be send 4 times!
But i only want this to be executed once, pls help!!
regards, Black.
I really need a fast solution pls
i need a solution fast pls!
everytime this loop is used everything in this loop is executed that often how many players are currently on the server.
So e.g. if there are 4 players on the server and the loop would include a SendClientMessageToAll, this message would be send 4 times!
But i only want this to be executed once, pls help!!
pawn Код:
forward pAliveChecker();//this is a timer checking how many players are still alive...
public pAliveChecker()
{
new Float:survivorhealth[MAX_PLAYERS];
for(new i=0;i < MAX_PLAYERS; i++)
{
GetPlayerHealth(i,survivorhealth[i]);
if((survivorhealth[i] > 0) && (IsPlayerConnected(i) == 1))//if only one single player is alive the round ends...
{
ChainsawEnder();//this is a stock and its executed like i wrote on top... But it shall be executed only once
}
}
return 1;
}
I really need a fast solution pls