I'm thinking of making two SWEPs that work with ULX or any other admin mod that has the commands !ban and !kick. Would it be possible to execute a console command like "say !ban <NAME> 120" with the <NAME> replaced by the name of the player that the player holding the Ban Hammah/ Kick stick is looking at? I know it begins with
[CODE]function SWEP:PrimaryAttack()
//Event Procedure
end[/CODE]
You just need to show Lua the name of unlucky player
[code]pl:ConCommand("say !ban "..Haxor.." 120")[/code]
I just know that Durgz mod uses this code
but I think this is more useful because "activator" is the SWEP owner
[code]
activator:ConCommand("say !ban "..Haxor.." 120")
[/code]
Im just learning Lua but I know how to modify existing code...
Maybe something with
[lua]
function SWEP:Think()
local tr = self.Owner:GetEyeTrace();
--then something that gets player ID
end
[/lua]
You could look into some prop protection code that shows you the prop owner
But is there a command that gives the name of the player and places that inside that ConCommand? I'm pretty sure there is a way..
Oh, Okay, thanks for helping. I'm working on the primary stuff of both of the SWEPs, then I'll take a look at Prop Protection.
I recommend not using
say !ban
but
ban
I'm not sure how to use it 100% but look at how ulx bans
No, I'm pretty sure it's !ban <NAME> <OPTIONAL TIME>.
Thatsa only ulx, what About ass, gmanage, newadmin, moocow, flapmin
not all admin mods use !ban
what if a admin mutes you, you go to ban him, it won't work
I think the default is addip <unique id number> <time>
[lua]pl:Ban(number, "Reason")[/lua]
Sorry, you need to Log In to post a reply to this thread.