AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   How to remove Hostages and Bomb in one round? (https://forums.alliedmods.net/showthread.php?t=75374)

exvel 08-04-2008 07:41

How to remove Hostages and Bomb in one round?
 
Tryed to use raydan's code:
Code:

stock RemoveMapObj()
{
        decl maxent,i;
        decl String:Class[65];
        maxent = GetMaxEntities();
        for (i=0;i<=maxent;i++)
        {
                if(IsValidEdict(i) && IsValidEntity(i))
                {
                        GetEdictClassname(i, Class, sizeof(Class));
                        if(StrContains("func_bomb_target_hostage_entity_func_hostage_rescue",Class) != -1)
                        {
                                RemoveEdict(i);
                        }
                }
        }
}

It works well but it completly removes hostages and bomb.
The problem is that I need them back after round restart. :)

raydan 08-04-2008 08:50

Re: How to remove Hostages and Bomb in one round?
 
there entity won't come back after round restart!

may be hostage can:mrgreen:

exvel 08-04-2008 09:02

Re: How to remove Hostages and Bomb in one round?
 
ahrrr... so, is there an another way to remove hostages? :)

raydan 08-04-2008 11:26

Re: How to remove Hostages and Bomb in one round?
 
remove hostage at OnMapStart(), then restart round, see hostages are still there or not

exvel 08-04-2008 11:28

Re: How to remove Hostages and Bomb in one round?
 
There are no hostages after round restart.
Or what you mean in "remove hosatges"? Another method?

teame06 08-05-2008 02:05

Re: How to remove Hostages and Bomb in one round?
 
Move the hostage to a location where they can't be touch/used. As for bomb You can just remove the bomb from the player and remove that.

exvel 08-05-2008 07:12

Re: How to remove Hostages and Bomb in one round?
 
teame06, thanks. But how can I do it? :)

exvel 08-05-2008 07:47

Re: How to remove Hostages and Bomb in one round?
 
Used this code:
Code:

new Float:TeleportVector[3] = {0.0,0.0,0.0};
TeleportEntity(i, TeleportVector, NULL_VECTOR, NULL_VECTOR);

This code teleported hostages somewhere but on new round start they didn't come back. :(

p.s. also tried
TeleportVector[3] = {1.0, 1.0, 1.0};

exvel 08-05-2008 08:05

Re: How to remove Hostages and Bomb in one round?
 
LOOOL, i am nub ))
Didn't disable Stripper Source :)
The code in the first post works perfect.

bl4nk 08-05-2008 14:02

Re: How to remove Hostages and Bomb in one round?
 
In my HideNSeek plugin I just remove the hostage_entity every round. As for the bomb, I just strip their 5th slot.


All times are GMT -4. The time now is 20:02.

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