Author Topic: StatueMod V2  (Read 14778 times)

0 Members and 2 Guests are viewing this topic.

Offline Zegyn

  • Newbie
  • *
  • Posts: 10
  • Karma: 1
StatueMod V2
« 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

« Last Edit: April 05, 2011, 09:28:18 AM by Zegyn »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: StatueMod V2
« Reply #1 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. :)
Experiencing God's grace one day at a time.

Offline Zegyn

  • Newbie
  • *
  • Posts: 10
  • Karma: 1
Re: StatueMod V2
« Reply #2 on: March 13, 2011, 11:38:32 AM »
Thanks!  :D and I will edit the description little bit
« Last Edit: March 13, 2011, 11:40:38 AM by Zegyn »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: StatueMod V2
« Reply #3 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.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Zegyn

  • Newbie
  • *
  • Posts: 10
  • Karma: 1
Re: StatueMod V2
« Reply #4 on: March 17, 2011, 11:26:19 AM »
What do you mean? >_<

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: StatueMod V2
« Reply #5 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.



"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Zegyn

  • Newbie
  • *
  • Posts: 10
  • Karma: 1
Re: StatueMod V2
« Reply #6 on: March 18, 2011, 07:27:25 AM »
Ah ok  :D

Offline Zegyn

  • Newbie
  • *
  • Posts: 10
  • Karma: 1
Re: StatueMod V2
« Reply #7 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

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: StatueMod V2
« Reply #8 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.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Zegyn

  • Newbie
  • *
  • Posts: 10
  • Karma: 1
Re: StatueMod V2
« Reply #9 on: March 20, 2011, 04:45:33 AM »
Thanks! Now I understand  ;D

Offline Zegyn

  • Newbie
  • *
  • Posts: 10
  • Karma: 1
Re: StatueMod V2
« Reply #10 on: March 23, 2011, 12:47:51 PM »
Can someone do this for me?

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: StatueMod V2
« Reply #11 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.
« Last Edit: March 24, 2011, 07:35:26 PM by Aaron113 »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: StatueMod V2
« Reply #12 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)
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Zegyn

  • Newbie
  • *
  • Posts: 10
  • Karma: 1
Re: StatueMod V2
« Reply #13 on: March 24, 2011, 12:24:00 PM »
Thanks Aaron  ;D

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: StatueMod V2
« Reply #14 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." )
« Last Edit: March 26, 2011, 06:51:35 AM by Aaron113 »