Raised This Month: $ Target: $400
 0% 

Spread Values


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Wasc
Junior Member
Join Date: Apr 2011
Old 10-25-2011 , 14:10   Spread Values
Reply With Quote #1

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
Wasc is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode