29.06.2009, 21:40
How can i check if the playerid has pressed the default fire button (Left Mouse Button) 5 times?
Thanks
Thanks
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