Forum

> > CS2D > Scripts > freeze & kick players ( no admin )
Forums overviewCS2D overview Scripts overviewLog in to reply

English freeze & kick players ( no admin )

8 replies
To the start Previous 1 Next To the start

old freeze & kick players ( no admin )

StrikerD2000
BANNED Off Offline

Quote
hello guys
today i want just freeze & kick command without admin, that's mean all can use it

example !freeze (id)
example !kick (id)

don't ask why
i know what i am saying
and i know what i will do with it


just send for me the code
edited 1×, last 01.02.17 09:45:56 am

old Re: freeze & kick players ( no admin )

Baloon
GAME BANNED Off Offline

Quote
You cannot even write a simple lua, you need to learn Lua in these site:

http://cs2d.com/help.php
https://www.lua.org/manual/5.1/

After learn from above links, this is the code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("say","sayhook")
function sayhook(id,t)
	if t:sub(1,5)=="!kick" then
		parse("kick "..t:sub(7,8))
		msg2(id,"You kicked "..player(t:sub(7,8),"name")
		msg(player(id,"name").." kicked "..player(t:sub(7,8),"name"))
	elseif t:sub(1,7)=="!freeze" then
		parse("speedmod "..t:sub(9,10).." -100")
		msg2(id,"You freezed "..player(t:sub(9,10,),"name")
		msg(player(id,"name").." freezed "..player(t:sub(9,10),"name"))

		-- Delete the "else" if this you have another say hook

	else msg2(id,"Error, wrong say command!")
	end
end

old Re: freeze & kick players ( no admin )

RIP-HereRestsPlookerbooy
BANNED Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
addhook("say","sayhook")
function sayhook(id,t)
	if t:sub(1,1)=="!" then
		if t:sub(1,5)=="!kick" then
			parse("kick "..t:sub(7,8))
			msg2(id,"You kicked "..player(t:sub(7,8),"name")
			msg(player(id,"name").." kicked "..player(t:sub(7,8),"name"))
		elseif t:sub(1,7)=="!freeze" then
			parse("speedmod "..t:sub(9,10).." -100")
			msg2(id,"You freezed "..player(t:sub(9,10,),"name")
			msg(player(id,"name").." freezed "..player(t:sub(9,10),"name"))
		else
			msg2(id,"Error, wrong say command!")
		end
		return
	end
end

old Re: freeze & kick players ( no admin )

Rainoth
Moderator Off Offline

Quote
This guy took it to the next level. If you're a scripter with at least a tiny fraction of common sense, don't write the whole thing for him. You'll earn respect from me (and likely others) √
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview