Forum

> > CS2D > Scripts > say prefix
Forums overviewCS2D overview Scripts overviewLog in to reply

English say prefix

3 replies
To the start Previous 1 Next To the start

old say prefix

princeofpersia
User Off Offline

Quote
hi guys .

i need a prefix lua whit <!>

thats works for only some commands

example :

if i say !kick <id> then - - server kick the id

but

if i or any others say!<any things others> then server answer : wrong command

old Re: say prefix

princeofpersia
User Off Offline

Quote
@user Talented Doge: i didnt find any thing . i cant understand other admin lua(thats complex) i need only this part of lua . so help me or give me a link of a lua that i want if you can find this

old Re: say prefix

minos
User Off Offline

Quote
@user princeofpersia: simple one:
1
2
3
4
5
6
7
8
9
10
11
12
13
addhook("say","say_hook")
function say_hook(id, text)
if string.sub(text,1,1)=="!" then
if string.sub(text,2,6)=="kick " then
local kid = tonumber(string.sub(text,7,8))
parse("kick "..kid)
return 1
else
msg2(id,"Error:Command unkown")
return 1
end
end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview