Forum

> > CS2D > Scripts > Only Admins can join ct
Forums overviewCS2D overview Scripts overviewLog in to reply

English Only Admins can join ct

9 replies
To the start Previous 1 Next To the start

old Only Admins can join ct

Computerguy419
User Off Offline

Quote
I would like to make a script so that only players in that I have in my variable: adminlist, can join the ct. I need to be able to use the usgn #.

Thanks,
√ Computerguy419

old LOL

MikuAuahDark
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
adminlist = {86418}	-- Adminlist separated by comma

addhook("team","checker")
function checker(id,team)
	if team==2 then
		for _, hasil in ipairs(adminlist) do
			if player(id,"usgn")==hasil then
				return 0
			else
				parse("maket "..id)
				return 1
			end
		end
	end
end
edited 1×, last 09.03.12 10:47:14 am

old Re: Only Admins can join ct

blazeranger
User Off Offline

Quote
can i get that script but there would be a variable which chooses which team only admins can join? i would do it myself but i cant

edit; oh i saw the 2 and i think thats the team? am i right i just change it to 1?

old Re: Only Admins can join ct

EngiN33R
Moderator Off Offline

Quote
Well, the team==2 is obviously the team number (2 is CT, 1 is T). If you want a variable, then it would look something like
1
2
3
adminteam = 1
-- code... --
if team==adminteam then

old Re: Only Admins can join ct

blazeranger
User Off Offline

Quote
thanks, but i was asking for the actual code, i cant code
so all i have to do is
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
adminlist = {86418}     -- Adminlist separated by comma

addhook("team","checker")
function checker(id,team)
     if team==1 then
          for _, hasil in ipairs(adminlist) do
               if player(id,"usgn")==hasil then
                    return 0
               else
                    parse("maket "..id)
                    return 1
               end
          end
     end
end

with all the spaces etc. am i correct?
and i just change the 2 to a 1 and put my USGN in?

old Re: Only Admins can join ct

EngiN33R
Moderator Off Offline

Quote
That will make it so that only admins can join T, yes, but you also need to change
1
parse("maket "..id)
to
1
parse("makect "..id)
if you want it like that.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview