
Go to DarkRP/gamemode/a, open up your editors find box, and put in /g. Here I'm going to show you how you can create your own group chats, or add jobs to the current ones. I'd suggest you back-up your a somewhere before you do this, just in case it doesn't work and you don't know what to change back. Also, this tutorial was created using the DarkRP SVN Revision 596, the code may vary slightly with earlier versions, however the editing of it should be quite similar. NOTE: This tutorial is not a customizable feature of DarkRP, it's a direct edit of the DarkRP code and so you should be VERY careful whilst editing it. Reason for deletion: Not what Garry wants the wiki to be used for See more pages nominated for deletion here. Deletion is due within approximately 30 days from nomination, unless the deletion has been disputed on the talk page. In this script, we add a chat command that creates cash from nothing.This page has been nominated for deletion. Otherwise, all players will see the chatcommand and arguments in their chat boxes! When using DarkRP chat commands, you must return a empty string. Trace.endpos = trace.start + ply:GetAimVector ( ) * 85Īnd finally, we create the money using the trace information:ĭarkRPCreateMoneyBag (tr.HitPos, amount )

Next, we create a trace object of where the playing is looking at. Ply:ChatPrint ( "You are not authorized to use this chat command!" ) return end Notify (ply, 1, 4, string.format (LANGUAGE.invalid_x, "argument", "" ) ) return "" end if ply:IsSuperAdmin ( ) then Local amount = math.floor ( tonumber (args ) ) if amount <= 1 then

Next, we check if the value they are trying to create is lower than 1, or if the player that is trying to create cash, is not a superadmin. Local function CreateCash (ply, args ) if args = "" then return "" end if not tonumber (args ) then return "" end local amount = math.floor ( tonumber (args ) ) if amount

It should work just the same, but the work wont get lost at updates.Īdd the following code to the bottom of a: You could also paste this in a new lua file in gamemodes/modules. In this tutorial we will be using the default DarkRP a file! I will be showing you how to add a new chat command that creates money from nothing!

Welcome to the tutorial, in this tutorial.
