Raised This Month: $ Target: $400
 0% 

is_hostage_alive(ent)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-11-2009 , 05:04   Re: is_hostage_alive(ent)
Reply With Quote #10

Dont know how you tryed but it worked pefect for me.
PHP Code:
#include <amxmodx>
#include <fakemeta>

public plugin_init() {
    
register_clcmd"say /host""cmdLol" );
}

public 
cmdLolid ) {
    if( 
is_hostage_alive155 ) )    // hardcoding indexes not save, just did for test, it was hostage for me @ cs_assualt, maxplayers 5.
        
client_print0print_chat"Hostage is alive." );
    else
        
client_print0print_chat"Hostage is dead." );
}

stock bool:is_hostage_aliveiEntity ) {
    if( !
pev_validiEntity ) )
        return 
false;
    
    new 
szClassname32 ];
    
peviEntitypev_classnameszClassname31 );
    
    if( !
equalszClassname"hostage_entity" ) )
        return 
false;
    
    if( 
peviEntitypev_health ) > )
        return 
true;
    
    return 
false;

__________________
xPaw is offline
 



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 02:19.


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