Forum

> > CS2D > Scripts > say !makespec
Forums overviewCS2D overview Scripts overviewLog in to reply

English say !makespec

7 replies
To the start Previous 1 Next To the start

old say !makespec

Spook MQ Hacker
BANNED Off Offline

Quote
guys can you make a SCRIPT?

can you make a script like
if you say !makespec only at ipairs {ADMINLIST} then the id will go spec example !makespec 5 then the id 5 will go spec.. please help me.!.!.!.!.!.!.?

old Re: say !makespec

Starkkz
Moderator 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
ADMINLIST = {63171}

function table.find(t,val)
	for k, v in pairs(t) do
		if v == val then
			return k
		end
	end
end

addhook("say","onSay")
function onSay(id,txt)
	if string.sub(txt,1,1) == "!" then
		if string.sub(txt,1,9) == "!makespec" and table.find(ADMINLIST,player(id,"usgn")) then
			local p = tonumber(string.sub(txt,11))
			if p then
				parse("makespec "..p)
			end
		end
		return 1
	end
end

old Re: say !makespec

Bobakrome
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
ADMINLIST = {63171}

function table.find(t,val)
     for k, v in pairs(t) do
          if v == val then
               return k
          end
     end
end

addhook("say","onSay")
function onSay(id,txt)
     if string.sub(txt,1,1) == "!" then
          if string.sub(txt,1,9) == "!makespec" and      table.find(ADMINLIST,player(id,"usgn")) then
               local p = tonumber(string.sub(txt,11))
               if p then
                    parse("makespec "..p)
msg(""..player(id,"name").." Made "..name[..p] A Spectator)
               end
          end
          return 1
     end
end

Untested -.-
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview