Forum

> > CS2D > Scripts > freeze & kick players ( no admin )
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch freeze & kick players ( no admin )

8 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt freeze & kick players ( no admin )

StrikerD2000
BANNED Off Offline

Zitieren
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
1× editiert, zuletzt 01.02.17 09:45:56

alt Re: freeze & kick players ( no admin )

Baloon
GAME BANNED Off Offline

Zitieren
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

alt Re: freeze & kick players ( no admin )

RIP-HereRestsPlookerbooy
BANNED Off Offline

Zitieren
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

alt Re: freeze & kick players ( no admin )

Rainoth
Moderator Off Offline

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