SA-MP Forums Archive
progress bar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: progress bar (/showthread.php?tid=512983)



progress bar - iBots - 13.05.2014

i have made a progress bar for clicks,when you press on key fire it dicreases the progress bar value,but it doesnt work everytime,like sometimes i click but it doesnt move,and when i click again it moves,why?


Re: progress bar - iZN - 13.05.2014

So we are meant to guess your code.


Re: progress bar - iBots - 13.05.2014

pawn Код:
if (PRESSED(KEY_FIRE))
{
        Clicks[playerid] += 1;
}



Re: progress bar - iBots - 13.05.2014

I have tried to change from kry fire to action it worked perfectly,but how could i make key fire work?


Re: progress bar - Madd92 - 13.05.2014

Are you doing this in OnPlayerKeyStateChange? I think you should do it like this:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (newkeys & KEY_FIRE)
    {
        Clicks[playerid] += 1;
    }
    return 1;
}
At least that's how I would do it.


Re: progress bar - iBots - 14.05.2014

Doesnt work