Advertisement
CoolOppo

ULX Crash

Nov 30th, 2012
767
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- place in addons/ULX/lua/ulx/modules/sh/crash.lua
  2.  
  3. -- lol, why I made this I don't know.
  4.  
  5. local function ulx_CrashTheGuy( slayer, ply, comment )
  6.  
  7.     ply:SendLua("cam.End3D()")
  8.  
  9. end
  10.  
  11. local CATEGORY_NAME = "Utility"
  12.  
  13. local function ulx_lolcrash( ply, target, comment )
  14.     if not comment or comment == "" or comment == "StringArg" then
  15.         ulx.fancyLogAdmin( ply, "#A crashed #T without a reason.", target )
  16.         pcall( ulx_CrashTheGuy, ply, target, "" )
  17.     else
  18.         ulx.fancyLogAdmin( ply, "#A crashed #T with the reason #s", target, comment )
  19.         pcall( ulx_CrashTheGuy, ply, target, comment )
  20.     end
  21. end
  22.  
  23. local lolcrash = ulx.command( CATEGORY_NAME, "ulx crash", ulx_lolcrash, "!crash" )
  24. lolcrash:defaultAccess( ULib.ACCESS_SUPERADMIN )
  25. lolcrash:help( "Crashes the victim's game." )
  26. lolcrash:addParam{ type=ULib.cmds.PlayerArg }
  27. lolcrash:addParam{ type=ULib.cmds.StringArg, ULib.cmds.optional, ULib.cmds.takeRestOfLine }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement