Ulysses

Ulysses Stuff => Releases => Ulysses Release Archives => Topic started by: Zegyn on March 13, 2011, 10:40:11 AM

Title: StatueMod V2
Post by: Zegyn on March 13, 2011, 10:40:11 AM
I have made StatueMod plugin for ulx and it can turn players into gold, bronze or silver statue.

Installation instructions: Extract into addons

Credits: lèon 25% for this idea
Me 25% for making it
Aaron113 and Megiddo 50% for making the ULX 3.50 version of this

NOTE: This is for the current release of ULX and for the SVN ULX 3.50

Title: Re: StatueMod V2
Post by: Megiddo on March 13, 2011, 11:17:29 AM
I should mention that this is for the current release version of ULX.

Good work! Looks neat. :)
Title: Re: StatueMod V2
Post by: Zegyn on March 13, 2011, 11:38:32 AM
Thanks!  :D and I will edit the description little bit
Title: Re: StatueMod V2
Post by: JamminR on March 13, 2011, 03:00:26 PM
Fun release!

You should see about being ready to convert it when we finally "release" SVN to the wild.
Reviewed the code, won't be difficult.
See our SVN area for a 'comparison' how to I wrote.
Could compare one or two of the other releases that have been done in both versions too. I think Rocket is one I thought was a good baseline.
Title: Re: StatueMod V2
Post by: Zegyn on March 17, 2011, 11:26:19 AM
What do you mean? >_<
Title: Re: StatueMod V2
Post by: JamminR on March 17, 2011, 02:13:31 PM
The code you released uses the old command style of our 'release' version from our www.ulyssesmod.net download page.
The SVN "beta" of our code, which is newer and up to date, and has fixes in it to work with many of the Gmod updates that have occurred since our release, includes awesome new GUIness (XGUI) menu, uses a totally different command structure.

Just something to keep an eye on. See our SVN section of the forum if interested in looking at it.



Title: Re: StatueMod V2
Post by: Zegyn on March 18, 2011, 07:27:25 AM
Ah ok  :D
Title: Re: StatueMod V2
Post by: Zegyn on March 19, 2011, 05:27:07 AM
I opened one lua file in SVN version of ulx and that was totally different than it was when I made StatueMod
Im not sure if I can make StatueMod work in it but I will try my best.  :P
Title: Re: StatueMod V2
Post by: JamminR on March 19, 2011, 09:56:50 AM
http://forums.ulyssesmod.net/index.php/topic,4464.msg17838.html#msg17838 (my long but descriptive 'how to' difference)
and http://www.ulyssesmod.net/docs (The current ULib documention) should always be helpful.
Title: Re: StatueMod V2
Post by: Zegyn on March 20, 2011, 04:45:33 AM
Thanks! Now I understand  ;D
Title: Re: StatueMod V2
Post by: Zegyn on March 23, 2011, 12:47:51 PM
Can someone do this for me?
Title: Re: StatueMod V2
Post by: Aaron113 on March 23, 2011, 01:20:56 PM
I'd be glad to.  I'll attach it to this post later today.  I've actually done this with a rocket command someone uploaded.

EDIT:  Sorry, will post tomorrow.

EDIT:  Sorry again, I ended up not feeling the best and just didn't get it done.  I will get it done first thing tomorrow.
Title: Re: StatueMod V2
Post by: JamminR on March 23, 2011, 01:40:41 PM
Heh, seems rocket was a fun 'learn how to convert' for all of us.
Vader and I discussed it in Ahref's Rocket here = http://forums.ulyssesmod.net/index.php/topic,3955.0.html
Ahref later added the conversion to his release post.

See the Explode release too, by MrPresident I think.
Somewhere in it's pages, it has a SVN version. (Which, I based my 'tutorial' on)
Title: Re: StatueMod V2
Post by: Zegyn on March 24, 2011, 12:24:00 PM
Thanks Aaron  ;D
Title: Re: StatueMod V2
Post by: Aaron113 on March 25, 2011, 08:27:37 PM
Promised and delivered.  Sorry for the delay.  I adjusted it as I seen fit.

Code: [Select]
-- 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." )
Title: Re: StatueMod V2
Post by: Megiddo on March 25, 2011, 09:06:06 PM
Promised and delivered.  Sorry for the delay.  I adjusted it as I seen fit.

Code: [Select]
-- 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 )
ulx.fancyLogAdmin( ply, "#A turned #T into a gold statue", plys )
end
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 )
ulx.fancyLogAdmin( ply, "#A turned #T into a bronze statue", plys )
end
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 )
ulx.fancyLogAdmin( ply, "#A turned #T into a silver statue", plys )
end
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 )
ulx.fancyLogAdmin( ply, "#A unstatued #T", plys )
end
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." )


You have your log function inside a loop. ;)
Title: Re: StatueMod V2
Post by: Aaron113 on March 26, 2011, 06:52:08 AM
Fix'd ;D
Title: Re: StatueMod V2
Post by: Zegyn on April 03, 2011, 07:39:38 AM
Thanks! I will upload it today or tomorrow (not sure) and I will also add you two into the credits.
Title: Re: StatueMod V2
Post by: Zegyn on April 05, 2011, 09:29:16 AM
I have uploaded it now. I hope it works  :-\