04.11.2014, 21:30
Este es un ejemplo de un fs que antes me funcionaba, y es el que ahora no me funciona, al igual que todosl os demas.
pawn Код:
#include <progressbar>
new Bar:barrahungry[MAX_PLAYERS];
new variablehungry[MAX_PLAYERS] = 100;
new tiempohungry[MAX_PLAYERS];
public OnPlayerDisconnect(playerid, reason)
{
HideProgressBarForPlayer(playerid, barrahungry[playerid]);
DestroyProgressBar(barrahungry[playerid]);
KillTimer(tiempohungry[playerid]);
return 1;
}
public OnPlayerSpawn(playerid)
{
barras(playerid);
tiempohungry[playerid] = SetTimerEx("bhungry", 1000, true, "i", playerid);
ShowProgressBarForPlayer(playerid, barrahungry[playerid]);
return 1;
}
forward barras(playerid);
public barras(playerid)
{
barrahungry[playerid] = CreateProgressBar(540.00, 375.00, 50.00, 05.00, 0xFFFF00AA, 100.0);
SetProgressBarMaxValue(barrahungry[playerid], 100.0);
SetProgressBarValue(barrahungry[playerid], 0);
return 1;
}
forward bhungry(playerid);
public bhungry(playerid) {
variablehungry[playerid] --;
SetProgressBarValue(barrahungry[playerid], variablehungry[playerid] );
UpdateProgressBar(barrahungry[playerid], playerid);
if(variablehungry[playerid] == 0)
{
variablehungry[playerid] = 100;
SetProgressBarValue(barrahungry[playerid], variablehungry[playerid]);
UpdateProgressBar(barrahungry[playerid], playerid);
}
return 1;
}