Forum

> > CS2D > Scripts > Lockt, lockct, unlockall
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lockt, lockct, unlockall

6 replies
To the start Previous 1 Next To the start

old Lockt, lockct, unlockall

Logged
User Off Offline

Quote
Hello, I'm searching these three COMMANDS. Please help me.

I found this script, but anybody who types @lockt, @lockct or @unlockall can use it:

Quote
lockt = false
lockct = false

if(t=="@lockt") then lockt = true
elseif(t=="@lockct") then lockct = true
elseif(t=="@unlockall") then
lockt = false
lockct = false
else return 0 end
return 1
end

addhook("team","change")
function change(id, team)
if team == 1 then
if lockt == true then
msg2(id,"©255000000This team is locked!")
return 1
end
elseif team == 2 then
if lockct == true then
msg2(id,"©255000000This team is locked!")
return 1
end
end
end



Please help me. I prefer COMMANDS.

old Re: Lockt, lockct, unlockall

EP
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
admins = {xxxxx,xxxxx} --Put your usgn, also you can put more separated by comma

lock_ct = {}
lock_tt = {}

addhook("say","Cmd")
function Cmd(id,t)
a = player(id,"usgn")
for adm = 1,#admins do
if a == admins[adm] and t == "!lockct" then
   lock_ct=1
   msg("©255000000Counter-Terrorist team has been locked!@C")
   return 1
elseif a == admins[adm] and t == "!unlockct" then
   lock_ct=0
   msg("©000255000Counter-Terrorist team has been unlocked!@C")
   return 1
elseif a == admins[adm] and t == "!locktt" then
   lock_tt=1
   msg("©255000000Terrorist team has been locked!@C")
   return 1
elseif a == admins[adm] and t == "!unlocktt" then
   lock_tt=0
   msg("©000255000Terrorist team has been unlocked!@C")
   return 1
   end
   end
   end


addhook("team","lol")
function lol(id,team)
if  team == 1 then
   if lock_tt == 1 then
   msg2(id,"©255000000This team is blocked!")
   return 1
   end   
elseif team == 2 then
   if lock_ct == 1 then
      msg2(id,"©255000000This team is blocked!")
   return 1
   end
   end
   end

old Re: Lockt, lockct, unlockall

Logged
User Off Offline

Quote
Yes sorry, but I don't use my usgn. Can you do it with RCon without modifying the console?
Sorry for my bad English.

user EP 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
admins = {xxxxx,xxxxx} --Put your usgn, also you can put more separated by comma

lock_ct = {}
lock_tt = {}

addhook("say","Cmd")
function Cmd(id,t)
a = player(id,"usgn")
for adm = 1,#admins do
if a == admins[adm] and t == "!lockct" then
   lock_ct=1
   msg("©255000000Counter-Terrorist team has been locked!@C")
   return 1
elseif a == admins[adm] and t == "!unlockct" then
   lock_ct=0
   msg("©000255000Counter-Terrorist team has been unlocked!@C")
   return 1
elseif a == admins[adm] and t == "!locktt" then
   lock_tt=1
   msg("©255000000Terrorist team has been locked!@C")
   return 1
elseif a == admins[adm] and t == "!unlocktt" then
   lock_tt=0
   msg("©000255000Terrorist team has been unlocked!@C")
   return 1
   end
   end
   end


addhook("team","lol")
function lol(id,team)
if  team == 1 then
   if lock_tt == 1 then
   msg2(id,"©255000000This team is blocked!")
   return 1
   end   
elseif team == 2 then
   if lock_ct == 1 then
      msg2(id,"©255000000This team is blocked!")
   return 1
   end
   end
   end


It works, but it doesn't work on my other PC.
Sorry for my bad English again.

old Re: Lockt, lockct, unlockall

sheeL
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
admins = {45813,xxxxx}
lock_ct = {}
lock_tt = {}

addhook("say","tr")
function tr(id,t)
a = player(id,"usgn")
for adm = 1,#admins do
if a == admins[adm] and t == "!lockct" then
lock_ct=1
msg("©255000000Counter-Terrorist team has been locked!@C")
return 1
elseif a == admins[adm] and t == "!unlockct" then
lock_ct=0
msg("©000255000Counter-Terrorist team has been unlocked!@C")
return 1
elseif a == admins[adm] and t == "!locktt" then
lock_tt=1
msg("©255000000Terrorist team has been locked!@C")
return 1
elseif a == admins[adm] and t == "!unlocktt" then
lock_tt=0
msg("©000255000Terrorist team has been unlocked!@C")
return 1
end
end
end


addhook("team","blockforcel")
function blockforcel(id,team)
if team == 1 then
if lock_tt == 1 then
msg2(id,"©255000000Player Locked!")
return 1
end 
elseif team == 2 then
if lock_ct == 1 then
msg2(id,"©255000000Player Locked!")
return 1
end
       end
              end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview