Forum

> > CS2D > Scripts > say !makespec
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch say !makespec

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt say !makespec

Spook MQ Hacker
BANNED Off Offline

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

alt Re: say !makespec

Starkkz
Moderator 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
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

alt Re: say !makespec

Bobakrome
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
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 -.-
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht