Check if mouse fire button has been clicked 5 times
#1

How can i check if the playerid has pressed the default fire button (Left Mouse Button) 5 times?

Thanks
Reply
#2

easy
pawn Код:
new press[MAX_PLAYERS]; // put this in the tp of the script
public OnStateKeyChange(playerid, newkeys, oldkeys)
{
  if(newkeys == KEY_FIRE)
  {
    press[playerid] += 1;
    return 1;
  }
  if(press[playerid] == 5)
  {
    // your action...
  }
}
// script

Reply
#3

thx a hole bunch =]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)