Raised This Month: $ Target: $400
 0% 

is it a hostage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
whosyourdaddy
Senior Member
Join Date: Apr 2008
Old 12-30-2008 , 19:18   is it a hostage
Reply With Quote #1

how can i do something like is_user_hostage(id) or something like that?
whosyourdaddy is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 12-30-2008 , 19:22   Re: is it a hostage
Reply With Quote #2

.. People aren't hostages? What are you trying to do? Find the hostage entity?
Styles is offline
Send a message via AIM to Styles
whosyourdaddy
Senior Member
Join Date: Apr 2008
Old 12-30-2008 , 19:51   Re: is it a hostage
Reply With Quote #3

well im trying to use the ham module to stop hostages from being damages so i wanted to do something like is_user_hostage(iVictim) then return the supercede thing so hostages dont get damaged
whosyourdaddy is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-30-2008 , 19:54   Re: is it a hostage
Reply With Quote #4

Code:
public plugin_init() {     RegisterHam(Ham_TakeDamage, "hostage_entity", "FwdHostageDamage"); } public FwdHostageDamage(client, inflictor, attacker, Float:damage, damagebits) {     SetHamParamFloat(4, 0.0);     return HAM_HANDLED; }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
L//
Senior Member
Join Date: Aug 2008
Location: Not found
Old 12-30-2008 , 19:58   Re: is it a hostage
Reply With Quote #5

PHP Code:
stock is_user_hostage(entity)
{
    new 
classname[32]
    
pev(entitypev_classnameclassnamesizeof classname 1)
    
    if(
equal(classname"hostage_entity"))
        return 
true

    
return false

__________________
L// is offline
Send a message via MSN to L//
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-30-2008 , 19:59   Re: is it a hostage
Reply With Quote #6

Note:
If you are using Ham_TakeDamage for "player" entities, that forward will not be triggered for hostages.
You must use my code if you want to use HamSandwich.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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 09:10.


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