AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   is it a hostage (https://forums.alliedmods.net/showthread.php?t=82836)

whosyourdaddy 12-30-2008 19:18

is it a hostage
 
how can i do something like is_user_hostage(id) or something like that?

Styles 12-30-2008 19:22

Re: is it a hostage
 
.. People aren't hostages? What are you trying to do? Find the hostage entity?

whosyourdaddy 12-30-2008 19:51

Re: is it a hostage
 
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

Exolent[jNr] 12-30-2008 19:54

Re: is it a hostage
 
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; }

L// 12-30-2008 19:58

Re: is it a hostage
 
PHP Code:

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

    
return false



Exolent[jNr] 12-30-2008 19:59

Re: is it a hostage
 
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.


All times are GMT -4. The time now is 09:10.

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