Forum

> > CS2D > Scripts > Lock Spector
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Lock Spector

20 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt Lock Spector

sheeL
User Off Offline

Zitieren
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

alt Re: Lock Spector

Apache uwu
User Off Offline

Zitieren


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.

alt Lock Spector- RE

sheeL
User Off Offline

Zitieren
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?

alt Re: Lock Spector

SilentDash
User Off Offline

Zitieren
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...

alt Lock Spector

sheeL
User Off Offline

Zitieren
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

alt Re: Lock Spector

Bowlinghead
User Off Offline

Zitieren
user Apache uwu hat geschrieben
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.

alt Lock Spector

sheeL
User Off Offline

Zitieren
But Work?

Necessary of a Script that functions I go to give more 1 example Lock (ID) unlock (ID) Please it arranges me 1
1× editiert, zuletzt 28.10.11 21:39:39

alt Re: Lock Spector

Yates
Reviewer Off Offline

Zitieren
user sheeL hat geschrieben
But Work?

But try?
user sheeL hat geschrieben
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.

alt Lock Spector

sheeL
User Off Offline

Zitieren
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
1× editiert, zuletzt 28.10.11 21:56:09

alt Re: Lock Spector

Seekay
Reviewer Off Offline

Zitieren
user sheeL hat geschrieben
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.

alt Re: Lock Spector

Apache uwu
User Off Offline

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

alt Lock Spector

sheeL
User Off Offline

Zitieren
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)

alt Lock Spector

sheeL
User Off Offline

Zitieren
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 ?

alt Re: Lock Spector

Bowlinghead
User Off Offline

Zitieren
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!

alt Re: Lock Spector

sheeL
User Off Offline

Zitieren
user Bowlinghead hat geschrieben
user Apache uwu hat geschrieben
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?
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht