AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Call/Execute GameEventType? (https://forums.alliedmods.net/showthread.php?t=237531)

LukeyB 03-25-2014 17:57

Call/Execute GameEventType?
 
Does anyone know how to call/execute a GameEventType? These ones in particular?

PHP Code:

enum GameEventType_t
{
    
GameEventType_BOMB_BEEP,
    
GameEventType_BOMB_DEFUSING
}
const 
IsDefusing = (1<<8)
#define is_user_defusing(%0)    (get_pdata_int(%0,232,5) & IsDefusing)
public client_PreThink(id)
{
    new 
bombplanted fm_find_ent_by_model(-1"grenade""models/w_c4.mdl")
    if(
is_user_alive(id) && is_user_bot(id) && bombplanted)
    {
        
set GameEventType_BOMB_BEEP to 1 allow bots to hear bomb beeping regardless of distance from the bomb
    
}
    if(!
bombplanted)
    {
        
set GameEventType_BOMB_BEEP back to 2 NULL
    
}
    if(
is_user_alive(id) && is_user_defusing(id))
    {
        
set GameEventType_BOMB_DEFUSING to 1 allow bots to know someone is defusing regardless of distance from the bomb
    
}
    if(
is_user_alive(id) && !is_user_defusing(id))
    {
        
set GameEventType_BOMB_DEFUSING back to 2 NULL
    
}



LukeyB 04-11-2014 20:43

Re: Call/Execute GameEventType?
 
So no one has any idea how to do this? I just want the bots to know where the bomb is when it's planted and if someone is defusing it. I'd be very grateful for any ideas. Thanks!


All times are GMT -4. The time now is 05:56.

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