Script that bans a player for 1 minute for saying the word "bottle"
18 replies, posted
Title says all
...why?
why not?
Because of the glass and cutting and hurting :saddowns:
[code]function Bottlezarebad4yourhealth( talker, demtxt, team )
if string.find(demtxt,"bottle") then
talker:Ban(1, "NOT THE BOTTLEZ!")
end
end
hook.Add("PlayerSay","Bottlezarebad4yourhealthlololo",Bottlezarebad4yourhealth)[/code]
Untested, But it should work.
looks like a bottle of *BANNED*
[QUOTE=_Zoey_;25085117]Because of the glass and cutting and hurting :saddowns:
[code]function Bottlezarebad4yourhealth( talker, demtxt, team )
if string.find(demtxt,"bottle") then
talker:Ban(1, "NOT THE BOTTLEZ!")
end
end
hook.Add("PlayerSay","Bottlezarebad4yourhealthlololo",Bottlezarebad4yourhealth)[/code]
Untested, But it should work.[/QUOTE]
Thankyou very much Zoey. :3:
he could just type Bottle so do
[lua]function Bottlezarebad4yourhealth( talker, demtxt, team )
if string.find(string.lower(demtxt),"bottle") then
talker:Ban(1, "NOT THE BOTTLEZ!")
end
end
hook.Add("PlayerSay","Bottlezarebad4yourhealthlololo",Bottlezarebad4yourhealth)[/lua]
Instead.
Would this work if it was part of a scentance, such as " this is my bottle "? If so, I'm going to implement his into my server, with a 1 hour ban time for saying ni**er
[QUOTE=masonrulz;25098831]Would this work if it was part of a scentance, such as " this is my bottle "? If so, I'm going to implement his into my server, with a 1 hour ban time for saying ni**er[/QUOTE]
you mean nigger?
[QUOTE=NEUFDANIELS;25099011]nigger[/QUOTE]
He's not using it in a racist way, such as referring to a group of CERTAIN people as 'Niggers', is he?
It is just a redneck American pronunciation of negro. The Spanish/French word for black.
[QUOTE=NEUFDANIELS;25099011]you mean nigger?[/QUOTE]
No he's fine with that, it's just people saying ni**er he doesn't like.
[QUOTE=masonrulz;25098831]Would this work if it was part of a scentance, such as " this is my bottle "? If so, I'm going to implement his into my server, with a 1 hour ban time for saying ni**er[/QUOTE]
Yeah. It would..
[lua]
function NiggaBans( talker, text, team )
if string.find(string.lower(text),"nigger") and not talker:IsAdmin() then
talker:Ban(60, "nigga?!")
end
end
hook.Add("PlayerSay","NiggaBan",NiggaBans) [/lua]
included admin immunity
lol
I'm going to trial this with the word furry
wait can it be tabled to ref from a list of words?
Why have ; at the "end"s? end; instead of end?
[QUOTE=Freze;25149514]Why have ; at the "end"s? end; instead of end?[/QUOTE]
It's for people who script PHP purely. There is no actual reason to have it in.
In php, the end of a line is signified by a ";" and for the sake of people not inputting them each time, Garry just made them do the same thing in php even though they're not needed.
[QUOTE]
local bannedWordList = {
"bottle",
"nigger"
}
function bannedWords( talker, text, team )
for k,v in pairs( bannedWordList )do
if ( string.find(string.lower(text), v) and not talker:IsAdmin() ) then
talker:Ban(60, "Using the word " .. v)
break
end
end
end
hook.Add("PlayerSay","bannedWords",bannedWords);
[/QUOTE]
nice, i was already writing the same thing in code lol
Sorry, you need to Log In to post a reply to this thread.