Good evening ,or morning...don't know
I wanna make plugin which shows message if player defused bomb 1 second before explosion, but I encountered an error. How can I make value, that uses not only in one public? Hope you understood.
Code:
#include <amxmodx>
#include <amxmisc>
public plugin_init() {
register_plugin("unnamed","1.0","unnamed")
register_logevent("BombPlantComplete",3,"2=Planted_The_Bomb")
register_logevent("BombDefused",3,"2=Defused_The_Bomb")
}
public BombPlantComplete(){
new Float:BombTimer = get_gametime()
new Float:cooldown = BombTimer + 29.0
}
public BombDefused(){
if(BombTimer >= cooldown)
client_print(0,print_chat,"Message")
}
Error is "undefined symbol BombTimer and cooldown", but I defined them in BombPlantComplete.
Thanks for participating