Quote:
Originally Posted by GuiKommander
Recomendo utilizar Timer Global para todos os players nesse caso.
Crie um timer com repetiзгo (false) e coloque o mesmo timer dentro do timer. Assim й mais otimizado
Exemplo:
PHP Code:
forward UpGeral();
public UpGeral()
{
for(new i; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i))
{
//
}
}
SetTimer("UpGeral", 1000, false);
}
|
Se eu usar um time para todos, quando eu bloquear o time de um nгo bloquearia de todos tbm ?
Quote:
Originally Posted by XandyMello
PHP Code:
public OnPlayerConnect(playerid)
{
// Coloque esse cуdigo na callback onde autentica a senha do usuбrio, para exibir o 'Relуgio UP' quando inserir a senha.
UPRelogio[playerid] = SetTimerEx("RelogioUP", 1000,true,"i",playerid);
PlayerStatus[playerid][20] = CreatePlayerTextDraw(playerid, 598.600097, 302.655731, "");
PlayerTextDrawLetterSize(playerid, PlayerStatus[playerid][20], 0.331000, 1.130000);
PlayerTextDrawAlignment(playerid, PlayerStatus[playerid][20], 2);
PlayerTextDrawColor(playerid, PlayerStatus[playerid][20], -1);
PlayerTextDrawSetShadow(playerid, PlayerStatus[playerid][20], 0);
PlayerTextDrawSetOutline(playerid, PlayerStatus[playerid][20], -1);
PlayerTextDrawBackgroundColor(playerid, PlayerStatus[playerid][20], 255);
PlayerTextDrawFont(playerid, PlayerStatus[playerid][20], 3);
PlayerTextDrawSetProportional(playerid, PlayerStatus[playerid][20], 1);
PlayerTextDrawSetShadow(playerid, PlayerStatus[playerid][20], 0);
return 1;
}
public OnPlayerDisconnect(playerid)
{
KillTimer(UPRelogio[playerid]);
return 1;
}
|
Jб coloquei isso, mas nгo adianta.