Forum

> > CS2D > Scripts > i need commands
Forums overviewCS2D overview Scripts overviewLog in to reply

English i need commands

3 replies
To the start Previous 1 Next To the start

old i need commands

umad541
User Off Offline

Quote
Hi Guys,

Can someone help me in my lua. my problem is i cant find someone to help me how to put @listusers, @public, @mix or @1vs1 command..if you guys know how to add it on the lua script please tell me thanks..

old Re: i need commands

DC
Admin Off Offline

Quote
Maybe take a look at the scripts of one of the thousand server admin scripts in the file archive.

old Re: i need commands

sheeL
User Off Offline

Quote
what is @public? and @listusers

i Created this simple script for you.
Commands : @mix and @1vs1 ...
Good Luck.

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
-- // 1vs1 script / mix script --

YOUR_PW = "123" -- Server password

function totable(t,match)
local cmd = {}
	if not match then match = "[^%s]+" end
		for word in string.gmatch(t, match) do
		table.insert(cmd, word)
	end
	return cmd
end

addhook("say","OnSay") -- @1vs1 <ID1> <ID2> --
function OnSay(id,text)
	local words = totable(text)
	local cmd = tostring(words[1])
	local id1 = tonumber(words[2])
	local id2 = tostring(words[3])
		if cmd == "@1vs1" then
			for A = 1,32 do
			parse("makespec "..A);
			msg("©000255000 New 1vs1 , ID : "..id1.." and "..id2);
			parse("maket "..id1);
			parse("makect "..id2);
			return 1
			end
		elseif cmd == "@mix" then
			msg("©255000255[SERVER] - MIX ");
			for A = 1,32 do
			parse("makespec "..A);
			parse("sv_password "..YOUR_PW);
			parse("sv_fow 1");
			parse("mp_autoteambalance 1");
			parse("mp_roundtime 5");
			end
		return 1
	end
end

old Re: i need commands

umad541
User Off Offline

Quote
@sheel, when you use the command @1vs1 the server name, password will change right? then if you use @public the server will change to Public. Thanks for this btw.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview