09.01.2013, 22:19
Bem, meu code /Contar quando coloco 10 segundos, se tiver somente eu, conta normal, se tiver 2 players, vai pulando do 10 para o 8 dai pro 6 .... e etc
pawn Code:
public Contagem5()
{
new string[20];
new Float:posx, Float:posy, Float:posz;
if(tContagem > 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, posx, posy, posz);
format(string, sizeof(string),"%d", tContagem);
GameTextForAll(string,1000,3);
PlayerPlaySound(i,1056, posx, posy, posz);
SetTimer("Contagem5", 1000, false);
TogglePlayerControllable(i, 0);
}
}
}
else if(tContagem == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TogglePlayerControllable(i, 1);
GameTextForAll("] Go Go Go ]", 1000, 3);
tContagem = 0;
if(ContagemIniciada == true)
{
ContagemIniciada = false;
}
GetPlayerPos(i, posx, posy, posz);
PlayerPlaySound(i, 1057, posx, posy, posz);
}
}
}
return tContagem--;
}