Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » !afk command for lua
Re: !afk command for lua [message #412816 is a reply to message #412814] Tue, 01 December 2009 05:17 Go to previous messageGo to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma:
General (3 Stars)
jnz wrote on Tue, 01 December 2009 07:14

"Daniel"

A better AFK command would be this...


function OnChat(PlayerId, Type, Message, Target)
   local command = string.lower(string.match(Message, "%S+"))
   if command == "!afk" then
      local pName = Get_Player_Name_By_ID(PlayerId)
      Console_Input(string.format("kick %d", PlayerId))
      Console_Input(string.format("allow %s", pName))
      Console_Input(string.format("msg %s has been kicked for: AFK", pName))
   end
   return 1
end







Yes, use that! Very Happy



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: problem with lua scripts
Next Topic: !spy command help
Goto Forum:
  


Current Time: Tue Jul 02 16:36:31 MST 2024

Total time taken to generate the page: 0.00782 seconds