Forum

> > CS2D > Scripts > Open door x y
Forums overviewCS2D overview Scripts overviewLog in to reply

English Open door x y

10 replies
To the start Previous 1 Next To the start

old Open door x y

Flame
BANNED Off Offline

Quote
Is it possible to make that only admins write !uopen and the walls open in the x y

old Re: Open door x y

Infinite Rain
Reviewer Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
adminlist = {}
trigger_name = 'admin_trigger'

addhook('say', 'say')
function say(id, message)
	if message == '!uopen' then
		for n, w in ipairs(adminlist) do
			if w == player(id, 'usgn') then
				parse('trigger '.. trigger_name)
			else
				msg2(id, 'You are not allowed to use this command!')
			end
		end
		return 1
	end
end
trigger name is a trigger that will be actived if admin told "!uopen"
adminlist = admin list
edited 1×, last 07.09.11 11:32:14 am

old Re: Open door x y

kalis
User Off Offline

Quote
hi doctor rainbow
@factis699
small error
chamge
1
parse('trigger '.. trigger_name
to
1
parse('trigger '.. trigger_name)

@doctor rainbow
go editor
take name of your door in map
copy and past in trigger_name = 'name_button_here'
edited 1×, last 07.09.11 11:32:42 am

old Re: Open door x y

Infinite Rain
Reviewer Off Offline

Quote
Dont need X Y here
Place Env_Dynwall at the map and name it like emm... "Bitch"

and on my script

trigger_name = "Bitch"
Thx kalis fixed.

old Re: Open door x y

Flame
BANNED Off Offline

Quote
adminlist = {}
trigger_name = 'admin_trigger'

addhook('say', 'say')
function say(id, message)
if message == '!uopen' then
for n, w in ipairs(adminlist) do
if w == player(id, 'usgn') then
parse('trigger '.. stars)
else
msg2(id, 'You are not allowed to use this command!')
end
end
return 1
end
end

But wait why it dosent work ...

old Re: Open door x y

kalis
User Off Offline

Quote
right code :
1
trigger_name = 'stars'

change
1
parse('trigger '..stars)
to
1
parse('trigger '..trigger_name)
or
1
2
parse('trigger stars')
dont need trigger_name = '  '

old Re: Open door x y

Flame
BANNED Off Offline

Quote
I fixed and it works but ewrywone can open the door!
edited 1×, last 07.09.11 12:34:24 pm

old Re: Open door x y

DannyDeth
User Off Offline

Quote
Add your USGN IDs to the adminlist table like so:
1
administ = {123,456}
Obviously your USGN ID is not 123, just add it accordingly.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview