Код
public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon, &subtype, &cmdnum, &tickcount, &seed, mouse[2])
{
static bool:bInUse[MAXPLAYERS+1];
if(IsPlayerAlive(client))
{
if(!(buttons & IN_USE) && bInUse[client])
{
// Игрок отпустил кнопку
bInUse[client] = false;
return Plugin_Continue;
}
if(buttons & IN_USE)
{
// Игрок нажал кнопку
bInUse[client] = true;
}
}
return Plugin_Continue;
}