progress bar help
#1

Hello, I've been working on a vehicle damage progress bar and I don't seem to be getting it working, I could use a little bit of help. thanks, code:
pawn Код:
#include <a_samp>
#include <progress>

new Bar:Vhealthbar[MAX_PLAYERS];
forward OnVehicleUpdate();

public OnFilterScriptInit()
{
    for(new playerid; playerid < MAX_PLAYERS; playerid++)
    {
        Vhealthbar[playerid] = CreateProgressBar(500.00, 122.00, 106.50, 5.50, 16777215, 100.0);
    }
    return 1;
}

public OnFilterScriptExit()
{
    for(new playerid; playerid < MAX_PLAYERS; playerid++)
    {
        DestroyProgressBar(Vhealthbar[playerid]);
    }
    return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    ShowProgressBarForPlayer(playerid, Vhealthbar[playerid]);
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    HideProgressBarForPlayer(playerid, Vhealthbar[playerid]);
    return 1;
}

public OnVehicleUpdate()
{
    for(new playerid; playerid < MAX_PLAYERS; playerid++)
    {
        new Float:health, veh = GetPlayerVehicleID(playerid);
        GetVehicleHealth(veh, health);
        SetProgressBarValue(Vhealthbar[playerid], GetVehicleHealth(veh, health));
        UpdateProgressBar(Vhealthbar[playerid], playerid);
        return 1;
    }
    return 1;
}
It is showing the bar, but it doesn't progress nor does it show the progression, it's just a blank bar, thanks if you're able to help me out here!
Reply


Messages In This Thread
progress bar help - by LeXuZ - 31.12.2014, 16:46
Re: progress bar help - by ball - 31.12.2014, 18:26
Re: progress bar help - by LeXuZ - 31.12.2014, 19:57
Re: progress bar help - by LeXuZ - 01.01.2015, 19:21
Re: progress bar help - by ball - 01.01.2015, 20:37
Re: progress bar help - by LeXuZ - 01.01.2015, 20:58
Re: progress bar help - by Schneider - 01.01.2015, 21:02
Re: progress bar help - by ball - 01.01.2015, 21:16
Re: progress bar help - by LeXuZ - 01.01.2015, 23:53

Forum Jump:


Users browsing this thread: 1 Guest(s)