While my friend (DeltaOps101) and I were messing around on my server, we had an idea. Instead of the normal blind, the ability to place the kitten overlay on someone's screen. Simply add the following code to the bottom of ulx/fun.lua, then use these commands:
say !kittens <user> [time] -- Puts the overlay on the user for [time] seconds (If no time, default is 10)
console ulx kittens <user> [time] -- Same args as above
And for the code:
function ulx.cc_kittens( userid, args, argv, argc )
if argc < 1 then
ULib.tsay( userid, ulx.LOW_ARGS )
return
end
local amt
if not argv[ 2 ] then
amt = 10
else
amt = tonumber( argv[ 2 ] )
end
if not amt then
ULib.tsay( userid, "\"" .. argv[ 2 ] .. "\" is an invalid amount!" )
return
end
local targets, err = ULib.getUsers( argv[ 1 ], _, true, ulx.ucl, userid ) -- Enable keywords
if not targets then
ULib.tsay( userid, err )
return
end
for _, v in ipairs( targets ) do
ULib.sendRect( v, 301, 0, 0, 1, 1, amt, 255, 255, 255, 255, "matsys_regressiontest/background.vmt")
end
end
ulx.CONCOMMAND( "kittens", ulx.cc_kittens, "<user> [<time> - LOL KITTIES", ACCESS_SLAY, "!kittens" )