Forum

> > CS2D > Scripts > Lock Spector
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lock Spector

20 replies
Page
To the start Previous 1 2 Next To the start

old Lock Spector

sheeL
User Off Offline

Quote
Hello, Can someone help me, I wanted a script to lock the player into a spectator
wanted a script that works, if someone can find post? , ...., I need an URGENT
type

! Lock (ID)

! unlock (ID)

Thank you post there

old Re: Lock Spector

Apache uwu
User Off Offline

Quote


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
admins={}
lock={}

addhook("say","_say")
addhook("team","_team")

function _say(id,message)
	for _,id2 in ipairs(admins) do
		if player(id,"usgn")==id2 then
			if string.sub(message,1,6)=="!lock " then
			lock[player(string.sub(message,7),"ip")]=true
			msg("player locked")
		elseif string.sub(message,1,8)=="!unlock " then
			lock[player(string.sub(message,9),"ip")]=nil
			msg("player unlocked")
		end
		return 1
	end
end

function _team(id)
	if lock[player(id,"ip")]==true then
		msg("you are locked")
		return 1
	end
end

Untested, but the idea is good :)--if you want a more efficient script check up string.split & other stuff.

old Lock Spector- RE

sheeL
User Off Offline

Quote
But this script works? , Where this part

"admins = {}
lock = {} "

WHAT in the boot lock on admins I know (the USGN), then type in server.lua only play if it worked?

old Re: Lock Spector

SilentDash
User Off Offline

Quote
This Script doesn't work.

First: you forgot a "end" at the end of the script

and if i try to lock on there comes only a message he is just as ct/t and if he go spec he can join...

i test it on myself...

old Lock Spector

sheeL
User Off Offline

Quote
Hello, but I urgently need a script that works, kind! Lock (ID)! Unlock (ID)
URGENT
Can someone get me? Please, I need one that works

old Re: Lock Spector

Bowlinghead
User Off Offline

Quote
user Apache uwu has written
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
admins={}
lock={}

addhook("say","_say")
addhook("team","_team")

function _say(id,message)
	for _,id2 in ipairs(admins) do
		if player(id,"usgn")==id2 then
			if string.sub(message,1,6)=="!lock " then
				lock[player(string.sub(message,7),"ip")]=true
				msg("player locked")
			elseif string.sub(message,1,8)=="!unlock " then
				lock[player(string.sub(message,9),"ip")]=nil
				msg("player unlocked")
			end
		return 1
		end
	end
end

function _team(id)
	if lock[player(id,"ip")]==true then
		msg("you are locked")
		return 1
	end
end 
-- UNTESTET of course


I think that work.
I just added an end and tabed it right.
The idea is really good.

old Lock Spector

sheeL
User Off Offline

Quote
But Work?

Necessary of a Script that functions I go to give more 1 example Lock (ID) unlock (ID) Please it arranges me 1
edited 1×, last 28.10.11 09:39:39 pm

old Re: Lock Spector

Yates
Reviewer Off Offline

Quote
user sheeL has written
But Work?

But try?
user sheeL has written
Necessary of a Script that functions I go to give more 1 example Lock (ID) unlock (ID) Please it arranges me 1

Translator. HMM? - You sound so smart, but yet so dumb. I lol'd.

old Lock Spector

sheeL
User Off Offline

Quote
Hahaha just broke the first rule:,
not to offend the members or ban players = 2 days
viu no que da mexer comigo


Returning to my subject, I really wanted to lock a script spector, if someone could help me, thanks: D
edited 1×, last 28.10.11 09:56:09 pm

old Re: Lock Spector

Seekay
Reviewer Off Offline

Quote
user sheeL has written
Hahaha just broke the first rule


1.1 - illegal contents of all sorts are forbidden

----
Fail!
----

It sounds you are using a translator. Really, at the first moment I didnt understood what you want.. whatever try Bowlys script.

old Re: Lock Spector

Apache uwu
User Off Offline

Quote
lol i just typed it into the browser :), string.sub is not a good method, look up string.split.

old Lock Spector

sheeL
User Off Offline

Quote
Fact is pure, I am using translator because I'm from Brazil, and to doing an English course, then I will explain this story, NOW I WANT A SCRIPT FOR SPECTOR LOCK (LOCK IN A PLAYER SPEC) Could anyone get me? , I need a URGENT EXAMPLES

! lock (ID)
! unlock (ID)

old Lock Spector

sheeL
User Off Offline

Quote
You are talking about it for nothing, I have a problem come from Brazil?, I urgently needs a script LOCK SPECTOR, please get me n has as, someone ?

old Re: Lock Spector

Bowlinghead
User Off Offline

Quote
Delete your account please!

Do you know?
At the right there is an "bar".
You can scroll down. Its very new.
Please scroll solong down until you see a code from me.
After that thanks user Apache uwu for the script!

old Re: Lock Spector

sheeL
User Off Offline

Quote
user Bowlinghead has written
user Apache uwu has written
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
admins={}
lock={}

addhook("say","_say")
addhook("team","_team")

function _say(id,message)
	for _,id2 in ipairs(admins) do
		if player(id,"usgn")==id2 then
			if string.sub(message,1,6)=="!lock " then
				lock[player(string.sub(message,7),"ip")]=true
				msg("player locked")
			elseif string.sub(message,1,8)=="!unlock " then
				lock[player(string.sub(message,9),"ip")]=nil
				msg("player unlocked")
			end
		return 1
		end
	end
end

function _team(id)
	if lock[player(id,"ip")]==true then
		msg("you are locked")
		return 1
	end
end 
-- UNTESTET of course



________________________________________________
As well, it has over

"[quote user =: 51028] [quote = user: 44691]
[code]
admins = {}
lock = {} '

what it is to put into "lock = {}??
the ID?
ta even running this script?
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview