+attack + AddCommandListener make's it to an "event", it sure registers it but not the actual key pressed, thanks for pointing it out. Think this should do it slightly better:
PHP Code:
#include <sdktools>
#pragma semicolon 1
public void OnMapStart()
{
CreateTimer(1.5, Timer_Recheck, _, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);
}
public Action Timer_Recheck(Handle hTimer)
{
for (int i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i))
{
if (IsPlayerAlive(i))
{
if (GetClientButtons(i) == IN_USE)
{
GivePlayerAmmo(i);
}
}
}
}
return Plugin_Continue;
}