English How to remove hostages?

6 replies
Goto Page
To the start Previous 1 Next To the start
06.12.19 08:32:18 am
Up
Crestfall
User
Offline Off
Is it possible to remove hostages through lua and create a lua object on a random hostage location?
06.12.19 12:43:53 pm
Up
What exactly would you like to spawn on hostage location?
When I make map for you feedback is apretiated (even bad one), don't be an asshole and say a litle "thank you".
06.12.19 01:56:19 pm
Up
Marcell
Super User
Offline Off
user Crestfall has written:
Is it possible to remove hostages through lua and create a lua object on a random hostage location?


http://www.cs2d.com/help.php?luacmd=hostage
http://www.cs2d.com/help.php?luacat=entity&luacmd=entity#cmd

These might help.
06.12.19 02:08:03 pm
Up
Goo
User
Offline Off
Maybe use a 1x1 pixel size explosion with enough damage to kill the hostages?

I don't know if this works but try cs2d cmd killobject as well.
07.12.19 09:42:13 am
Up
Crestfall
User
Offline Off
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?
07.12.19 12:14:12 pm
Up
Oops321
User
Offline Off
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
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 >
Lastest upload : file cs2d CSGO Graffiti Pack II (12)
07.12.19 12:52:00 pm
Up
Crestfall
User
Offline Off
Well that saves some work. Thanks!
To the start Previous 1 Next To the start