Mingebag Pacifier
5 replies · 3 participants
Nov 7, 2009, 10:52 PM#1
Mingebag Pacifier - An Expression 2 designed to counter abuse coming from Moglizorz' Balls of Steel/Props Madness.
Please note that this is an ADMIN ONLY E2. Before you can use it you must enable Wire Expression 2 to interface with console commands. Type wire_expression2_concmd 1 into the console.
I know it looks a bit noobish, but asides from mucking about with wheels and hydraulics inputs/outputs, this is my first serious E2 code. Could do with some optimisation too.
Please note that this is an ADMIN ONLY E2. Before you can use it you must enable Wire Expression 2 to interface with console commands. Type wire_expression2_concmd 1 into the console.
#Mingebag Pacifier - Its purpose: To auto kick mingebags when ever they are abusing Balls of Steel/Props Madness
@name Mingebag Pacifier by dark_messenger84
@inputs Player:entity
@outputs
@persist Name:string
interval(10)
runOnChat(1)
runOnTick(1)
if (chatClk()) {
I = 0
NumPlayers = 12
findByClass("player")
while (I < NumPlayers) {
Target = findResult(I)
PlayerName = Target:name()
LastSaidL = Target:lastSaid():lower()
if (chatClk()) {
if (LastSaidL:find("!attack")) {
concmd("say \"!kick " + PlayerName + " \'Balls of Steel is not permitted.\'")
}
}
I = I + 1
}
}
I know it looks a bit noobish, but asides from mucking about with wheels and hydraulics inputs/outputs, this is my first serious E2 code. Could do with some optimisation too.
Nov 8, 2009, 09:02 AM#2
[This post has been redacted in the archive]
Nov 8, 2009, 06:35 PM#3
You got the picture
Nov 8, 2009, 11:10 PM#4
Could do with some optimisation too.
# Mingebag Pacifier
# Auto kicks mingebags when ever they are abusing Balls of Steel/Props Madness
@name Mingebag Pacifier by dark_messenger84
if (first()) { runOnChat(1) }
if (chatClk()) {
Target = lastSpoke()
PlayerName = Target:name()
LastSaidL = Target:lastSaid():lower()
if (LastSaidL:find("!attack")) {
concmd("say \"!kick " + PlayerName + " \'Balls of Steel is not permitted.\'")
}
}I haven't tested it, but it looks alright.
Nov 9, 2009, 08:46 PM#5
Oh wow you made it even more simpler, thanks dude ^_^ I'll give you cred in my code. Also, temp banning a steam id proves to be a lot more reliable than looking for a username to kick