Forum

> > CS2D > Scripts > Say !kick to kick
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Say !kick to kick

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Say !kick to kick

DragonAwper
User Off Offline

Zitieren
>i want to create a lua that when i say:
!kick [id]

kick the id that i wrote

==============================================
when i say:
!kick 1
kick the id 1
==============================================

i know, it's easy but i don't know how to do this.

Help me pls

alt Re: Say !kick to kick

Patasuss
User Off Offline

Zitieren
1
2
3
4
5
6
addhook("say","saykick")
function saykick(id, txt)
	if(string.sub(txt,1,5)=="!kick") then
		parse("kick "..(tonumber(string.sub(txt,7,string.len(txt)))).." Kicked!")
	end
end
Not tested

alt Re: Say !kick to kick

omg
User Off Offline

Zitieren
why would u want a lua script for that? use rcon commands like kick (ID) its already there
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht