Promised and delivered. Sorry for the delay. I adjusted it as I seen fit.
-- ULX Statue by Team DarkRP
function ulx.cc_goldstatue( ply, plys )
for _, v in pairs( plys ) do
if not v:Alive() then
ULib.tsay( ply, v:Nick() .. " is dead!", true )
return
end
if v.ragdoll then
ULib.tsay( ply, v:Nick() .. " is a ragdoll.", true )
return
end
if v:InVehicle() then
local vehicle = v:GetParent()
v:ExitVehicle()
end
v:Lock()
v:DisallowSpawning( true )
v:SetMaterial( "models/shiny" )
v:SetColor( 165, 145, 65, 255 )
v:ConCommand( "play physics/metal/metal_box_impact_bullet1.wav" )
ulx.setNoDie( v, true )
end
ulx.fancyLogAdmin( ply, "#A turned #T into a gold statue", plys )
end
local statue = ulx.command( "Fun", "ulx goldstatue", ulx.cc_goldstatue, "!goldstatue" )
statue:addParam{ type=ULib.cmds.PlayersArg, hint="<user(s)>" }
statue:defaultAccess( ULib.ACCESS_ADMIN )
statue:help( "Turns players into a golden statue." )
function ulx.cc_bronzestatue( ply, plys )
for _, v in pairs( plys ) do
if not v:Alive() then
ULib.tsay( ply, v:Nick() .. " is dead!", true )
return
end
if v.ragdoll then
ULib.tsay( ply, v:Nick() .. " is a ragdoll.", true )
return
end
if v:InVehicle() then
local vehicle = v:GetParent()
v:ExitVehicle()
end
v:Lock()
v:DisallowSpawning( true )
v:SetMaterial( "models/shiny" )
v:SetColor( 109, 67, 45, 255 )
v:ConCommand( "play physics/metal/metal_box_impact_bullet3.wav" )
ulx.setNoDie( v, true )
end
ulx.fancyLogAdmin( ply, "#A turned #T into a bronze statue", plys )
end
local bstatue = ulx.command( "Fun", "ulx bronzestatue", ulx.cc_bronzestatue, "!bronzestatue" )
bstatue:addParam{ type=ULib.cmds.PlayersArg, hint="<user(s)>" }
bstatue:defaultAccess( ULib.ACCESS_ADMIN )
bstatue:help( "Turns players into a bronze statue." )
function ulx.cc_silverstatue( ply, plys )
for _, v in pairs( plys ) do
if not v:Alive() then
ULib.tsay( ply, v:Nick() .. " is dead!", true )
return
end
if v.ragdoll then
ULib.tsay( ply, v:Nick() .. " is a ragdoll.", true )
return
end
if v:InVehicle() then
local vehicle = v:GetParent()
v:ExitVehicle()
end
v:Lock()
v:DisallowSpawning( true )
v:SetMaterial( "models/shiny" )
v:SetColor( 130, 128, 120, 255 )
v:ConCommand( "play physics/metal/metal_box_impact_bullet2.wav" )
ulx.setNoDie( v, true )
end
ulx.fancyLogAdmin( ply, "#A turned #T into a silver statue", plys )
end
local sstatue = ulx.command( "Fun", "ulx silvertatue", ulx.cc_silverstatue, "!silverstatue" )
sstatue:addParam{ type=ULib.cmds.PlayersArg, hint="<user(s)>" }
sstatue:defaultAccess( ULib.ACCESS_ADMIN )
sstatue:help( "Turns players into a silve statue." )
function ulx.cc_unstatue( ply, plys )
for _, v in pairs( plys ) do
if v:InVehicle() then
local vehicle = v:GetParent()
v:ExitVehicle()
end
v:UnLock()
v:DisallowSpawning( false )
v:SetMaterial( "" )
v:SetColor( 255, 255, 255, 255 )
v:ConCommand( "play player/suit_sprint.wav" )
ulx.setNoDie( v, false )
end
ulx.fancyLogAdmin( ply, "#A unstatued #T", plys )
end
local unstatue = ulx.command( "Fun", "ulx unstatue", ulx.cc_unstatue, "!unstatue" )
unstatue:addParam{ type=ULib.cmds.PlayersArg, hint="<user(s)>" }
unstatue:defaultAccess( ULib.ACCESS_ADMIN )
unstatue:help( "Unstatues a player." )