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 #412814 is a reply to message #412769] Tue, 01 December 2009 05:14 Go to previous messageGo to previous message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma:
General (3 Stars)
"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



 
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: Fri Aug 23 21:44:08 MST 2024

Total time taken to generate the page: 0.00788 seconds