Well, I've been trying to "Exploit" proof some of my code. But apparently player.Kick() is not working, see the following code for my example. The only success I've had as to making a player leave is by forcing the disconnect console command upon the player.
[lua]
function TestKickPly(ply)
print("Test?")
ply:Kick("Test Kick Worked!")
end
concommand.Add("TestKickPly",TestKickPly)
[/lua]
Is ply a getting a player entity?
Are you testing in SP? I don't think it works in SP.
Alright, I was in Singleplayer. But I hosted a multiplayer and had a friend join yet it still doesn't work.
It prints "Test?" but doesn't kick the player.
Maybe you should set up a derma menu with a button that kicks you. If that doesn't work, consider revising how you call the function.
-snip-
[QUOTE=jman012;19921315]The ply.kick function needs a player entity but what you are doing is sending it a string.[/QUOTE]
No he isn't.
Sorry, you need to Log In to post a reply to this thread.