Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ulx.slay( calling_ply, target_plys )
- local affected_plys = {}
- for i=1, #target_plys do
- local v = target_plys[ i ]
- if ulx.getExclusive( v, calling_ply ) then
- ULib.tsayError( calling_ply, ulx.getExclusive( v, calling_ply ), true )
- elseif not v:Alive() then
- ULib.tsayError( calling_ply, v:Nick() .. " is already dead!", true )
- elseif v:IsFrozen() then
- ULib.tsayError( calling_ply, v:Nick() .. " is frozen!", true )
- else
- v:Kill()
- table.insert( affected_plys, v )
- end
- end
- ulx.fancyLogAdmin( calling_ply, "#A slayed #T", affected_plys )
- end
- local slay = ulx.command( CATEGORY_NAME, "ulx slay", ulx.slay, "!slay" )
- slay:addParam{ type=ULib.cmds.PlayersArg }
- slay:defaultAccess( ULib.ACCESS_ADMIN )
- slay:help( "Slays target(s)." )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement