Forum

> > CS2D > Scripts > Warn
Forums overviewCS2D overview Scripts overviewLog in to reply

English Warn

5 replies
To the start Previous 1 Next To the start

old Warn

NanuPlayer
User Off Offline

Quote
Hello guys, i need warn say script.

I tried to do it by myself but i failed.
I want the command by like this: !warn <id> <reason>

And when player reach 3 warns he get kicked

Can someone help me ?
edited 2×, last 17.05.18 10:48:22 am

old Re: Warn

Gaios
Reviewer Off Offline

Quote
What Admin Script do you currently use?

old Re: Warn

NanuPlayer
User Off Offline

Quote
It's okay i fixed it after 3 hours of searching for problems
edited 1×, last 17.05.18 10:59:27 am

old Re: Warn

_oops
User Off Offline

Quote
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
warn = {}


addhook("say","wsay")
function wsay(id,txt)
 if string.sub(txt:lower(),1,5) == "!warn" then
 local s, targ, reas = txt:find(" ",7)
 targ,  reas = tonumber(txt:sub(7,s-1)), txt:sub(s+1)
  if targ and reas then 
  warn[targ]=warn[targ]+1
   if warn[targ]>=3 then
   parse("kick "..targ.." \""..reas.."\"")
   else
   msg2(targ,"You've been warned for such reason! : "..reas)
   end
  else
  msg2(id,"Error: Target is missing or the reason.")
  end
 end
end

addhook("leave","winit")
addhook("join","winit")
function winit(id)
warn[id]=0
end

oh no I'm too late

old Re: Warn

NanuPlayer
User Off Offline

Quote
@user _oops:

No you are not, actually you fixed my warn script, after i fixed it the "reason" started glitching and you fixed it for me

Thank you bro

old Re: Warn

Gaios
Reviewer Off Offline

Quote
This one may work (didn't test) with admin list table.

Spoiler >
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview