[Ajuda] Erro pwn
#5

No topo do seu script:
pawn Код:
new Bar: Sono[MAX_PLAYERS];
Referencia pelo tуpico oficial:
Quote:
Originally Posted by Toribio
Посмотреть сообщение
pawn Код:
#include <a_samp>
#include <progress>

new Bar:vhealth[MAX_PLAYERS] = {INVALID_BAR_ID, ...};
forward ProgressBar();

public OnFilterScriptInit()
{
    SetTimer("ProgressBar", 500, 1);
    return 1;
}

public ProgressBar() //I prefer not to use OnPlayerUpdate with textdraws
{
    for(new playerid; playerid < MAX_PLAYERS; playerid++) //I recommend foreach(Player, playerid)
    {
        new vehicleid;
        if((vehicleid = GetPlayerVehicleID(playerid)) && vhealth[playerid] != INVALID_BAR_ID)
        {
            new Float:health;
            GetVehicleHealth(vehicleid, health);
            SetProgressBarValue(vhealth[playerid], health);
            UpdateProgressBar(vhealth[playerid], playerid);
        }
    }
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_DRIVER)
    {
        DestroyProgressBar(vhealth[playerid]);
        vhealth[playerid] = INVALID_BAR_ID;
    }
    if(newstate == PLAYER_STATE_DRIVER)
    {
        vhealth[playerid] = CreateProgressBar(548.5, 36.0, _, _, 0x00FF00FF, 1000.0);
        ShowProgressBarForPlayer(playerid, vhealth[playerid]);
    }
    return 1;
}
#Edit
Acho que jб respondera essa.
Reply


Messages In This Thread
Erro pwn - by dannreis - 02.06.2016, 18:04
Re: Erro pwn - by F1N4L - 02.06.2016, 18:10
Re: Erro pwn - by dannreis - 02.06.2016, 18:35
Re: Erro pwn - by F1N4L - 02.06.2016, 18:36
Re: Erro pwn - by zSuYaNw - 02.06.2016, 18:39
Re: Erro pwn - by dannreis - 02.06.2016, 18:56
Re: Erro pwn - by F1N4L - 02.06.2016, 18:59
Re: Erro pwn - by dannreis - 02.06.2016, 19:15
Re: Erro pwn - by F1N4L - 02.06.2016, 19:17
Re: Erro pwn - by dannreis - 02.06.2016, 19:22

Forum Jump:


Users browsing this thread: 1 Guest(s)