Posts: 60
Threads: 16
Joined: Dec 2011
Reputation:
0
Hola, queria pedir el comando jail con las variables : Informacion[playa][ICarcel] , Informacion[playa][ITiempo].
PD : yo se crearlo pero nose como restarle el tiempo cada segundo/minuto.
Posts: 1,461
Threads: 71
Joined: Oct 2010
Quote:
Originally Posted by Bu11Sh0t
Pon un timer de un segundo, y baja las variables en un valor:
pawn Код:
//OnGameModeInit SetTimer("Todos", 1000, 1); // forward Todos(); public Todos() {
for(new playa = 0; playa < GetMaxPlayers(); playa++) Informacion[playa][ICarcel] --; return 1; }
|
Este decrece los minutos y no nada mas los segundos
pawn Код:
//OnGameModeInit
SetTimer("Todos", 1000, 1);
//
new Segundos[MAX_PLAYERS],
Minutos[MAX_PLAYERS];
forward Todos();
public Todos()
{
static i;
for(new pid = 0, p_max = GetMaxPlayers(); pid < p_max; pid++) if(IsPlayerConnected(pid))
{
if(Segundos[pid] == 0 && Minutos[pid] == 0) continue;
if(Segundos[pid] == 0 && Minutos[pid] >= 1) Segundos[pid] = 60, Minutos[pid] --;
if(Segundos[pid] >= 1) Segundos[pid]--;
if((i++) == 60)
{
i = 0;
if(Minutos[pid] != 0 && Segundos[pid] != 0) Segundos[pid] = 60;
}
//printf("%d-%d", Minutos[pid], Segundos[pid]);
}
return 1;
}
Posts: 1,461
Threads: 71
Joined: Oct 2010
Son minutos nada mas o tambien tienes la variable de segundos ?