RolePlayScript (aka RadishPickin'Script)

Name says it all. It’s an[other] RP gamemode :wink:

This is basically GMC’s SGPRP converted to Gmod10.


SQLite saving*****

  • Money, job, team and pay are saved to Gmod’s SQLite database. Very VERY quick!

Dynamic Console Commands (prefix for commands can be changed and so on)*****

  • Console commands are dynamically generated. Console prefix can be changed, and the help content is created from whatever console commands are added.

Money system with optional paydays*****

  • The usual money system found in every RP script. Nothing special.
  • Paydays can be turned on and off

Advanced Configuration (includes saving/loading of custom config files)*****

  • Very in-depth config file for quick editing of almost everything! Custom configs can be saved to a file for easy backup, and loaded again later.
  • Changes to the config aren’t overwritten with an update, new variables just get added on.
  • Temporary and permanent changes to the config can be done ingame with a command.

Module system

  • Easily create modules for RPS, instead of editing the base code and having it overwritten with an update.
  • Full documentation available on release


  • Again, nothing too special, cop/mayor system the same as SGPRP’s.

Voting system (votespammers end up banned)

  • Once again, similar to SGPRP’s. Except votespammers get tortured.

Gun store system (same as SGPRP?)

  • Could be the same as SGPRP’s, or different. We’ll see how it goes :wink:

Door system

  • SGPRP’s unique door system re-written for Gmod10!
  • Choices of LightRP style owning, or mayor-assigned keys.
  • Option to have doors saved or lost on disconnect.

And more to come!

***** = completed/implemented.

I started this yesterday, but there’s no guarantees on when it’ll be done. It’s for public release too, mainly 'cos everyone here wants something like this.

This is:

  • A simple RP script
  • Easy to modify
  • Aimed at giving a feeling of good ol’ times to certain people
  • A small attempt at clearing away the terrible standards brought on by DarkRP
  • An RP script
  • Cleanly coded (I’m hoping newer coders will be able to learn something from this, due to it’s simplicity, clean code and various comments)

This is not:

  • LightRP V2
  • TacoScript V2
  • iShady
  • The best script in the world
  • An RPG script (no stats, inventory etc)

Things which would help speed the release up

  • A simple custom scoreboard (template available)
  • Not asking for features from TacoScript

Please let me complete the above features before making any big suggestions.

So you need help huh? Well, if you don’t have chatcommands, here’s an example:

– I took this from GLX; just changed it a little so it will work without it

local chcmds={}
ChatCommand = {} – Functions
function ChatCommand.Add(name, help, admin, func)

chcmds[name] = {help, admin, func}


function ChatCommand.Remove(name)

chcmds[name] = nil


hook.Add(“PlayerSay”, “CHATCOMMANDS_PLAYERSAY”, function(ply,txt)

local w = string.Explode(" ", txt) – Easier to access
local cmd, args = w[1], table.remove(w, 1) – Args are w[2]-w[#w]
local tb = chcmds[cmd]

if( not tb ) then
return txt – Not a command, we can return the text

local h, a, f = tb[1],tb[2],tb[3] – Help, Admin-only, Function

if( a and not ply:IsAdmin() ) then ply:ChatPrint(“You’re not admin!”) return “” end
if( args[1] == “?” ) then ply:ChatPrint(h) return “” end – Prints the help text

f(ply, args) – function f(ply, args) ply:ChatPrint(unpack(args)) end

return “”

That’s what, three credits you’ve earned already? Thanks :smiley:

I love you :love:

Great going though, keep it up and this would make an excellent base for RP scripts rather than Dark RP… which everyone by now should know is terrible.


local panel

panel = { }

function panel:Init( )
self.Font = “TargetID”

function panel:Paint( )
local k, v, color, name, job, widestname, widestjob, widestping, w, h, r, n, x, y, j, n, teams, negative, totalwidth, textheight

x, y = 0, 0
widestname  = 0
widestjob   = 0
widestping  = 0
widestgroup = 0

teams = { { }, { }, { }, { } }	

surface.SetFont( self.Font )

//First, get all the information needed

for k, v in pairs( player.GetAll( ) ) do
	w, h = surface.GetTextSize( "     " .. v:Nick( ) )

	if widestname < w then
		widestname = 10 + w

	w, h = surface.GetTextSize( v:Job( ) )
	if widestjob < w then
		widestjob = 10 + w
	w, h = surface.GetTextSize( v:Ping( ) )
	if widestping < w then
		widestping = 10 + w
	table.insert( teams[ v:Team( ) ], v )

totalwidth = widestname + widestjob + widestping
textheight = h

r, n = self:GetSize( )

surface.SetDrawColor( 255, 255, 255, 255 )
surface.DrawRect( 0, 0, r, n )

surface.SetDrawColor( 000, 000, 000, 255 )
surface.DrawRect( 1, 1, r - 2, n - 2 )

surface.SetDrawColor( 255, 255, 255, 255 )
surface.DrawRect( 2, 2, r - 4, n - 4 )

x, y = 3, 3

//Now, we loop through the teams and draw the board

for k, v in pairs( teams ) do
	color = team.GetColor( k )
	negative = Color( 255 - color.r, 255 - color.g, 255 - color.b, color.a )

	surface.SetDrawColor( color.r, color.g, color.b, color.a )
	surface.DrawRect( x, y, totalwidth, textheight )

	draw.DrawText( team.GetName( k ), self.Font, x, y, negative, 0 )

	y = y + textheight

	for j, n in pairs( v ) do
		surface.DrawRect( x, y, totalwidth, textheight )

		draw.DrawText( "     " .. n:Nick( ), self.Font, x, y, negative, 0 )

		x = x + widestname
		draw.DrawText( n:Job( ), self.Font, x, y, negative, 0 )

		x = x + widestjob
		draw.DrawText( n:Ping( ), self.Font, x, y, negative, 0 )

		y = y + textheight
		x = 3

self:SetSize( totalwidth + 6, y + 3 )


vgui.Register( “my_scoreboard”, panel )

That’s about as simple as a scoreboard gets, but it gives you the idea.


local files, k, v, j, n, modules

files = file.Find( “…/gamemodes/thisgamemode/gamemode/module/*.lua” )
GAMEMODE.Modules = { }
for k, v in pairs( files ) do
modules = { }
include( “module/” … v )

GAMEMODE.Modules[ k ] = v

for j, n in pairs( modules ) do
if type( n ) == “function” then
hook.Add( j, k … “:” … j, function( … ) n( unpack{ … } ) end )


And then, assuming that works, this could be an abuse module:

function modules:Think( )
local k, v
for k, v in pairs( player.GetAll( ) ) do
v:TakeDamage( 1, v, v )

function modules:Move( pl, movedata )
movedata:SetVelocity( 50000 * Vector( math.random( ), math.random( ), math.random( ) ) )

See what I mean there?

I know the scoreboard works, but I don’t know if the module system would work at all - it’s an example to show how I would try to do it.

I want to see this completed :keke:.

Chat commands are for people that have no idea how to use VGUI. It really isn’t that hard.

I don’t know about you garry, but chat commands are EASIER for the user. It might be easier for some people to whip through a menu and find a button, give a text box focus and start typing in it, then find another button.

Of course that’s easier than typing /namedoor <name> in the chat box.

But still, it’s a good point - not all things need to be chat commands and can be instead hooked to the F* keys or have a constant panel on screen that manages that , which would be just as easy as chat commands code-wise.

It’s preference, really, versus the ease of use for the players.

This script looks good and I lookforward to it. I’m sorry I can’t help but good luck with designing and completing it as I know you will, at some point. This mode looks good since there is no Weapon’s hopfully. For Cop’s ok… but for citizens & all that hopfully none so :stuck_out_tongue: Yay! Finally an RP script that looks good and should be uber. Also, just a little side note but, try to make your hud look cooler. Cause a nice looking hud makes people enjoy it more also >.> The plain fact’s unfortunately. A nice looking hud and gamemode as well, this could be an uber gamemode, people who like RP have to agree :smiley:

Seems like it’s easier to press c, right click on the door and choose “name” from a popup menu, then type the name in the dialogue that pops up asking for the new name.

You know, that’s actually a pretty good idea. I wasn’t thinking of it like that, was imagining a less friendly interface that I usually end up seeing.

Player Wilfred 'Wilfred' Wilfred has joined the server
Wilfred 'Wilfred' Wilfred has changed job to: Bear
[GMC] SomeAdmin: You can't be a bear.
Wilfred 'Wilfred' Wilfred: GRAAAAAGGGHGHH
Wilfred 'Wilfred' Wilfred killed [GMC] SomeAdmin using weapon_teeth

Do i sense the second coming of my ULTIMATE SRS ROLEPLAY GUIDE?

This actually sounds much much better than a chat command could be. I dare say, this would be much better with this kind of menu, for some other things as well. This could be the most uber role play script ever :smiley:

Depends how fast you can type. It’d be a lot quicker to look at it and type /name door1xxxtreme for me.

Same here but, isn’t everyone just looking for some kind of fancy looking menu that compel’s them stare in amazment at their screen’s for about ten minutes until they realise they got killed by a mingebag about… ten minutes ago? I mean menu’s are helpful but in my opinion I can type faster so the “/name this is my door do not open!” thing would be easier but I’d prefer a nice little menu that makes thing’s look nicer and more presentable in a kind of way :smiley: It’s really up to the guy making this to decide upon what he does, he did say a unique way of naming door’s so it might be something different from all out ideas / suggestions. Who knows? (Well he might) regardless I’m backing this all the way :smiley: This could be the only fully functioning RP script if it gets out soon and more on that note, probably the best one. Even compared to tacoscript (regardless of its high reputation) this is one hell of a gamemode / roleplay script. I look forward to this badly! I need this gamemode :stuck_out_tongue: It looks so… epicly uber!

Hardly user friendly though. It seems like all roleplay mods are coded like CS server plugins. We can do better.

Correct, I have no idea how to use VGUI. Plus the idea for this script is simplicity in both using and coding terms.


Depends how you’d define user friendly too. Most RPers are used to chat commands, and that’s what they’d expect.

Obviously a flashy VGUI system wouldn’t be bad, but why code all that when you can do things the traditional way for a bit?

I’m looking to learn VGUI however, so depending on how I get on, this script might be a little more ground-breaking than I intended.

I disagree, I think that type /namedoor bob is much quicker and easier.

VGUI is great for menus; but you don’t need a menu for that garry, come on.

Really? This is like Windows vs Command Prompt really. It’s obvious that a good context specific panel can make stuff a lot quicker and easier. Firstly it’d list your options for you to choose, rather than have to read long command lists. Secondly you can probably click the button A LOT quicker than you can type /namedoor when you know where it is.

VGUI really couldn’t be easier to code now…

local menu = DermaMenu()

menu:AddOption( "Option One", MenuItemSelected )
menu:AddOption( "Option 2", MenuItemSelected )

local submenu = menu:AddSubMenu( "Option Free" )
	submenu:AddOption( "Submenu 1", MenuItemSelected )
	submenu:AddOption( "Submenu 2", MenuItemSelected )


Where MenuItemSelected is any Lua function you want to be called when that option gets selected


It’s the idiots way of doing things.

Well, garry, if it’s really that easy, can I join the conversation and ask how that will look?