24.12.2010, 13:51
Asн deberнa ser:
pawn Код:
forward energiacheck(playerid);
public energiacheck(playerid)
{
if( PlayerInfo[playerid][porciento] == 0)
{
luzencendia[playerid] = 0;
}
else if( PlayerInfo[playerid][porciento] > 0)
{
luzencendia[playerid] = 1;
}
PlayerInfo[playerid][porciento] -=1; //Resta 1 al porcentaje
SetProgressBarValue(energiagenerador[playerid],PlayerInfo[playerid][porciento]); //Actualiza la barra de progreso
UpdateProgressBar(energiagenerador[playerid]);
return 1;
}