Quote:
Originally Posted by Loinal
PHP код:
new Used[MAX_PLAYERS];
if(PRESSED(KEY_JUMP))
{
Used[playerid] += 1;
if(Used[playerid] >= 3)
{
new string[100];
format(string, sizeof(string), "*** %s (ID:%d) has used the JUMP KEY more than 3 times", GetName(playerid), playerid);
SendClientMessageToAll(-1, string);
}
}
You should have the stock GetName
Код:
stock GetName(playerid)
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
return Name;
}
|
How do you expect that work correctly without checking the times between presses? No resetting of the variable either.
The best thing to do would be to create your own system that allows defining custom key combo detection.