AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   remove hostage + bombsite (https://forums.alliedmods.net/showthread.php?t=59373)

kp_uparrow 08-12-2007 20:46

remove hostage + bombsite
 
how can i remove hostages and bombsites?

i have looked at no objectives + no round timer, i want the round timer and i want the round to end @ 0:00, but this plugin checks every entity spawn which is not the way i want it to

so i just want to find hostage entity and bomb site entity and remove them

can i do this?

Code:
new const g_objective_ents[][] = {     "func_bomb_target",     "info_bomb_target",     "hostage_entity",     "monster_scientist",     "func_hostage_rescue",     "info_hostage_rescue",     "info_vip_start",     "func_vip_safetyzone",     "func_escapezone" } ..... new items for (i = 0; i < sizeof g_objective_ents; ++i) { //++i or i++?  items = find_ent_by_class(-1, g_objective_ents[i])     while(items)     {         remove_entity(items)         items = find_ent_by_class(items, g_objective_ents[i])     } }

VEN 08-13-2007 00:48

Re: remove hostage + bombsite
 
Simple hostage remove should be potential to crash. You can try to request CHostage::Remove(void) implementation for Ham Sandwich module.

thats the way it is 08-13-2007 08:46

Re: remove hostage + bombsite
 
i think thare is a plugin for this to set the hostage life with that u can set the hostage life to 0 so thay die on the begin of the map

kp_uparrow 08-13-2007 16:14

Re: remove hostage + bombsite
 
i can just move the hostages away

but would that script work and it has to be executed every round right?

hmrsmpsn 08-13-2007 17:11

Re: remove hostage + bombsite
 
i noticed after trying to remove hostages that renaming the entity works

so you give each hostage entity a new classname like old_hostage

and then you remove all old_hostage.

doesnt crash or nothin :)

_Master_ 08-14-2007 02:11

Re: remove hostage + bombsite
 
I would test that with bots on server if I were you... just to be safe...

Pro Patria Finland 08-14-2007 03:33

Re: remove hostage + bombsite
 
Quote:

Originally Posted by kp_uparrow (Post 517609)
i can just move the hostages away

but would that script work and it has to be executed every round right?

I remember reading some plugin source, where hostages are simply moved to some origin that is not on the map. That should work, and yes it should be executed every round (atleast I think it should).

hmrsmpsn 08-14-2007 07:15

Re: remove hostage + bombsite
 
i tested that with bots and it works fine :)
i suggest you test it too :)

[X]-RayCat 08-14-2007 08:01

Re: remove hostage + bombsite
 
Kill hostages with trigger_hurt or move them under the floor.

hmrsmpsn 08-14-2007 17:18

Re: remove hostage + bombsite
 
ugh well as you said my server got unstable :/ (it wasnt before)
so i changed it and moved the hostages instead engfunc(engfunc_setorigin,ent,{4096.0,4096.0, 4096.0})


All times are GMT -4. The time now is 07:58.

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