Author Topic: How to run a ULX command whenever someone joins  (Read 2652 times)

0 Members and 1 Guest are viewing this topic.

Offline ryanlaw4

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
How to run a ULX command whenever someone joins
« on: February 13, 2014, 01:50:44 PM »
There is this guy that I hate with a passion. I want to use one of Cobalts commands, ULX Crash, on that person everytime he joins the server. Thank you.

Offline Cobalt

  • Full Member
  • ***
  • Posts: 216
  • Karma: 44
  • http://steamcommunity.com/id/__yvl/
Re: How to run a ULX command whenever someone joins
« Reply #1 on: February 13, 2014, 02:00:06 PM »
hook.Add( "PlayerInitialSpawn", "lol", function( ply )
if ply:SteamID() == "his steamid" then
RunConsoleCommand( "ulx", "crash", ply:Nick() )
end )

Offline ryanlaw4

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Re: How to run a ULX command whenever someone joins
« Reply #2 on: February 13, 2014, 02:27:21 PM »
Sorry for me sucking at lua, but where would I place this into? Or could I use lua run?

Offline Cobalt

  • Full Member
  • ***
  • Posts: 216
  • Karma: 44
  • http://steamcommunity.com/id/__yvl/
Re: How to run a ULX command whenever someone joins
« Reply #3 on: February 13, 2014, 02:46:51 PM »
Sorry for me sucking at lua, but where would I place this into? Or could I use lua run?
anywhere in autorun/server

Offline ryanlaw4

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Re: How to run a ULX command whenever someone joins
« Reply #4 on: February 14, 2014, 09:02:25 AM »
Can I use this as a luarun?

Offline Cobalt

  • Full Member
  • ***
  • Posts: 216
  • Karma: 44
  • http://steamcommunity.com/id/__yvl/
Re: How to run a ULX command whenever someone joins
« Reply #5 on: February 14, 2014, 12:42:54 PM »
Can I use this as a luarun?
Uh, I guess so, but it would go away when the map changes.

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Re: How to run a ULX command whenever someone joins
« Reply #6 on: February 15, 2014, 08:36:46 AM »
What is the correct syntax if you want multiple ids?

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given