Forum

> > CS2D > Scripts > How to remove hostages?
Forums overviewCS2D overview Scripts overviewLog in to reply

English How to remove hostages?

6 replies
To the start Previous 1 Next To the start

old Re: How to remove hostages?

Crestfall
User Off Offline

Quote
I'm trying to create CS:GO hostages in CS:2D. So invincible, static hostages. CTs hold use on them to rescue them.

Also is it possible to make defuse kit buyable in hostage?

old Re: How to remove hostages?

_oops
User Playing CS2D

Quote
user Crestfall has written
Also is it possible to make defuse kit buyable in hostage?

You can't do it in an ordinary way
even cs2d cmd mp_buymenu won't help you
IMG:https://i.imgur.com/h839WAA.png


But simple trick might help, lazy to explain take a look

here's sample code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
parse("mp_buymenu |||||56");

addhook("buy","b")
function b(id,w)
	
	if ( w == 56 and player(id,"money") >= 200 ) then
		
		if not( player(id,"defusekit") ) then
		parse("spawnitem 56 "..player(id,"tilex").." "..player(id,"tiley"));
		parse("setpos "..id.." "..player(id,"x").." "..(player(id,"y")+32));
		parse("setpos "..id.." "..player(id,"x").." "..(player(id,"y")-32));
		parse("setmoney "..id.." "..player(id,"money")-200);
		end
		
	else
	
	msg2(id,"\169255000000You have insufficient funds@C");
	end
	
end
IMG:https://i.imgur.com/e9o60TO.gif



I also tried to make CS:GO Casual script including customized hostage, but couldn't find a way to remove hostage so just used cs2d lua cmd entitylist to find hostage entities and cs2d cmd explosion to eliminate them.

+ If you looking for sprite for hostages, check this
Images >
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview