Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » !afk command for lua
!afk command for lua [message #412769] Mon, 30 November 2009 21:16 Go to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

Is there a way to make it when you type !afk it give's you a message and move's you to a location that you can't be killed, and you wont be with the other team?

Also a !back command that when you say !back it tells people you are back and it moves you back to your base like in front of bar or something?

I will be looking around and trying to make it my self but if anyone would like to add something please feel free.


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: !afk command for lua [message #412802 is a reply to message #412769] Tue, 01 December 2009 03:14 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
That would be too easy for players to exploit, bad idea...


Re: !afk command for lua [message #412814 is a reply to message #412769] Tue, 01 December 2009 05:14 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
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



Re: !afk command for lua [message #412816 is a reply to message #412814] Tue, 01 December 2009 05:17 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
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



Re: !afk command for lua [message #412830 is a reply to message #412769] Tue, 01 December 2009 09:58 Go to previous messageGo to next message
Genesis2001
Messages: 1397
Registered: August 2006
Karma: 0
General (1 Star)
"Zack"

"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





oh, and this would be nice. Wink

function OnChat(PlayerId, Type, Message, Target)
   local command = string.lower(string.match(Message, "%S+"))
   if command == "!lagfix" 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: Lag Fixed", pName))
   end
   return 1
end


Re: !afk command for lua [message #412835 is a reply to message #412830] Tue, 01 December 2009 10:30 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3809
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Better yet...

function OnChat(PlayerId, Type, Message, Target)
   local command = string.lower(string.match(Message, "%S+"))
   if command != NULL 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: using chat", pName))
   end
   return 1
end



Re: !afk command for lua [message #412877 is a reply to message #412769] Tue, 01 December 2009 18:04 Go to previous message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

that is better yes i will use that !afk command that kicks you ^^ and the lag fix


I love you guys here always come up with better ideas then me ^^


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

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


Current Time: Mon Nov 11 01:58:40 MST 2024

Total time taken to generate the page: 0.00874 seconds