English Strip weapon gate

11 replies
Goto Page
To the start Previous 1 Next To the start
17.11.17 03:05:28 am
Up
Jededias
User
Offline Off
How do strip weapon gate without scripts?
17.11.17 07:29:03 am
Up
Cure Pikachu
User
Offline Off
You can't - that is something you can only do with scripts.
IMG:https://i.imgur.com/uUrye71.png
IMG:https://i.imgur.com/xpsyQRX.png
17.11.17 11:08:19 am
Up
Gaios
Security Supporter
Offline Off
cs2d cmd strip - command
17.11.17 04:58:00 pm
Up
Jededias
User
Offline Off
Is possible use Strip command with one Trigger? like trigger IF
18.11.17 12:09:51 pm
Up
_3yrus
User
Offline Off
@user Jededias: you know lua ?
here we go !
18.11.17 05:27:42 pm
Up
Jededias
User
Offline Off
user _3yrus has written:
@user Jededias: you know lua ?

I see one strip area script in the forum. but i want do it in map editor, without the script
18.11.17 06:31:07 pm
Up
_3yrus
User
Offline Off
user Jededias has written:
user _3yrus has written:
@user Jededias: you know lua ?

I see one strip area script in the forum. but i want do it in map editor, without the script

you need to know lua if u want to do it through map editor !
here we go !
18.11.17 10:23:38 pm
Up
Jededias
User
Offline Off
If you don't help, don't say shit, you uploaded a piece of shit in the forum and think Is someone, you is a shit. Help or leave.

Admin/mod comment:

Watch your language buddy. /Borealis rules §3.1 - No Posts which offend/provoke/insult other people or groups (flame)
18.11.17 10:39:16 pm
Up
Cure Pikachu
User
Offline Off
@user Jededias: user _3yrus is right, you know. flame You actually need scripting experience to pull it off, as the map itself doesn't know who triggered any entity (Even the cs2d lua hook trigger hook doesn't either).
This is coming from a veteran, don't complain.
IMG:https://i.imgur.com/uUrye71.png
IMG:https://i.imgur.com/xpsyQRX.png
19.11.17 12:25:46 am
Up
Vehk
User
Offline Off
This script should (haven't tested it) let you define strip gates with the map editor by using Info_TeamGate entities. Copy the script to maps/<map name>.lua to have it automatically loaded.

To add a strip gate create an Info_TeamGate entity and name it STRIPGATE. You will want to add an entity Trigger_Start to trigger all entities named STRIPGATE (so they don't kill players).

The trigger for the strip gate will define what weapons to strip (or 0 for all). It should be a comma separated list of weapon IDs or names to strip.

The "Let Pass" field will determine if players of any team (Nobody) should be stripped or only a specific team.

More >
19.11.17 01:06:58 am
Up
Cure Pikachu
User
Offline Off
@user Vehk: If a piece of code is only going to be run once, you can just put it like so:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
MAP = {strip = {}}
local GATENAME = "STRIPGATE"

-- load all entities
-- 20 is Info_TeamGate
for _, e in ipairs(entitylist(20)) do
     if entity(e.x, e.y, "name") == GATENAME then
          -- strip gate entity
          local g = {x = e.x, y = e.y,
          width = tonumber(entity(e.x, e.y, "int0")),
          height = tonumber(entity(e.x, e.y, "int1")),
          team = tonumber(entity(e.x, e.y, "int2")),
          strip = {}}
          -- read weapon strip list
          strip = entity(e.x, e.y, "trigger")
          for w in string.gmatch(strip, "([%a%d]+),?") do
               g.strip[#g.strip + 1] = w
          end
          MAP.strip[#MAP.strip + 1] = g
     end
end

Good luck telling user Jededias that it can't be done any other way.
IMG:https://i.imgur.com/uUrye71.png
IMG:https://i.imgur.com/xpsyQRX.png
19.11.17 10:01:35 am
Up
_3yrus
User
Offline Off
user Jededias has written:
If you don't help, don't say shit, you uploaded a piece of shit in the forum and think Is someone, you is a shit. Help or leave.

Im not gonna argu with you, one day u will learn lua and undrastand wat a shit u asked in froum.
here we go !
To the start Previous 1 Next To the start