progress bar
#1

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?
Reply
#2

So we are meant to guess your code.
Reply
#3

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

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

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.
Reply
#6

Doesnt work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)