Dinossauro Posted September 10, 2012 Share Posted September 10, 2012 Hello I made a script to log out of the server. Players write / exit and passed 5 seconds come out! function KickPlayer(thePlayer,reason) kickPlayer ( thePlayer, "Console", reason ) end function kickPlayerHandler ( sourcePlayer, commandname, kickedname, reason ) local reason = "You came out successfully." outputChatBox ( "You will leave the server, in 5 seconds" ) setTimer ( KickPlayer, 5000, 1, sourcePlayer,reason ) end addCommandHandler ( "exit", kickPlayerHandler) But I wanted a player that you see in writing / exit, writes up / reconnect or / quit, were fined. That is lost deaths in the five tab ... Help, thanks. Link to comment
Castillo Posted September 11, 2012 Share Posted September 11, 2012 You want to punish these who use "/reconnect" or "/quit"? Link to comment
cs8898 Posted September 11, 2012 Share Posted September 11, 2012 what is with /logout ? why not use that Link to comment
myonlake Posted September 11, 2012 Share Posted September 11, 2012 As far as I know, you are not able to cancel such commands as /exit, /quit, /reconnect, /connect. Link to comment
Dinossauro Posted September 11, 2012 Author Share Posted September 11, 2012 If not that, I will like to cancel commands, / quit and / reconnect. But I liked that there was punishment for those who wear them, for example, lost 5 kills. Link to comment
TwiX! Posted September 11, 2012 Share Posted September 11, 2012 HelloI made a script to log out of the server. Players write / exit and passed 5 seconds come out! function KickPlayer(thePlayer,reason) kickPlayer ( thePlayer, "Console", reason ) end function kickPlayerHandler ( sourcePlayer, commandname, kickedname, reason ) local reason = "You came out successfully." outputChatBox ( "You will leave the server, in 5 seconds" ) setTimer ( KickPlayer, 5000, 1, sourcePlayer,reason ) end addCommandHandler ( "exit", kickPlayerHandler) But I wanted a player that you see in writing / exit, writes up / reconnect or / quit, were fined. That is lost deaths in the five tab ... Help, thanks. you made it? you use my code viewtopic.php?f=91&t=47747 i won't help you anymore Link to comment
Dinossauro Posted September 11, 2012 Author Share Posted September 11, 2012 Yes, sorry. You created it, but could help? By the way, it works perfectly. Link to comment
Castillo Posted September 11, 2012 Share Posted September 11, 2012 You can try detecting both commands with the event: onPlayerCommand, I'm not sure if it'll work with these two though. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now