PHP Code:
bool:CheckPlayer(id, Float:flDelay = 1.0, bool:bHasToBeAlive = true)
{
if( bHasToBeAlive && !is_user_alive(id) )
{
ColorChat(id, RED, "[kz#] ^x01You must be alive to use this command...")
return false
}
new Float:flTime = get_gametime()
new Float:flDifference = flTime - g_flNextCmd[id]
if(flDifference > 0)
{
ColorChat(id, RED, "[kz#] ^x01You have to wait %.1s to use this command...", flDifference)
return false
}
g_flNextCmd[id] = flTime + flDelay
return true
}
__________________