General > Developers Corner

How to run a ULX command whenever someone joins

(1/2) > >>

ryanlaw4:
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.

Cobalt:
hook.Add( "PlayerInitialSpawn", "lol", function( ply )
if ply:SteamID() == "his steamid" then
RunConsoleCommand( "ulx", "crash", ply:Nick() )
end )

ryanlaw4:
Sorry for me sucking at lua, but where would I place this into? Or could I use lua run?

Cobalt:

--- Quote from: ryanlaw4 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?

--- End quote ---
anywhere in autorun/server

ryanlaw4:
Can I use this as a luarun?

Navigation

[0] Message Index

[#] Next page

Go to full version