

",ĭescription = "The player that gives the money. definePrivilegedChatCommand( "addmoney ", "DarkRP_SetMoney ", ccAddMoney)ĭescription = "Called when a player gives another player money. getPhrase( "could_not_find ", args))ĭarkRP. formatMoney(target: getDarkRPVar( "money ")), " "))ĭarkRP. getPhrase( "x_set_your_money ", ply: EntIndex() = 0 and "Console " or ply: Nick(), DarkRP. getPhrase( "you_gave ", target: Nick(), DarkRP. definePrivilegedChatCommand( "setmoney ", "DarkRP_SetMoney ", ccSetMoney)ĭarkRP. getPhrase( "you_set_x_money ", target: Nick(), DarkRP. Call( "playerWalletChanged ", GAMEMODE, target, amount - target: getDarkRPVar( "money "), target: getDarkRPVar( "money ")) or amountĭarkRP. getPhrase( "could_not_find ", tostring(args)))Īmount = hook. defineChatCommand( "check ", CreateCheque, 0.3) - for those of you who can't spell defineChatCommand( "cheque ", CreateCheque, 0.3)ĭarkRP. Call( "playerDroppedCheque ", nil, ply, recipient, min_amount, Cheque)ĭarkRP. If IsValid(ply) and IsValid(recipient) thenĭarkRP. If ply: customEntityLimitReached(chequeTable) thenĭarkRP. defineChatCommand( "moneydrop ", DropMoney, 0.3) defineChatCommand( "dropmoney ", DropMoney, 0.3)ĭarkRP. Call( "playerDroppedMoney ", nil, ply, amount, moneybag)ĭarkRP. Ply: DoAnimationEvent(ACT_GMOD_GESTURE_ITEM_DROP) defineChatCommand( "give ", GiveMoney, 0.2)ĭarkRP. getPhrase( "you_gave ", ent2: Nick(), DarkRP. getPhrase( "has_given ", ply: Nick(), DarkRP. Call( "playerGaveMoney ", nil, ply, ent2, amount)ĭarkRP. If not IsValid(ent2) or not ent2: IsPlayer() or ent2: GetPos(): DistToSqr(ply: GetPos()) >= 22500 then return end Ply: DoAnimationEvent(ACT_GMOD_GESTURE_ITEM_GIVE)ĭarkRP. getPhrase( "must_be_looking_at ", DarkRP. If not IsValid(ent) or not ent: IsPlayer() or ent: GetPos(): DistToSqr(ply: GetPos()) >= 22500 thenĭarkRP. Partial(SafeRemoveEntity, moneybag))ĭarkRP. getPhrase( "payday_missed "))įunction DarkRP.createMoneyBag( pos, amount)


Call( "playerGetSalary ", GAMEMODE, self, amount) Local suppress, message, hookAmount = hook. retrieveSalary( self, function( amount)Īmount = math.floor(amount or GAMEMODE. DarkRPUnInitialized then return endįunction DarkRP.payPlayer( ply1, ply2, amount)ĭarkRP. Call( "playerWalletChanged ", GAMEMODE, self, amount, self: getDarkRPVar( "money ")) or total Local total = self: getDarkRPVar( "money ") + amount pm - Private message a player (/pm Player1 Hey you're pretty cool!).-[[. y or /yell - Yell out, your text appearing in a larger area. or /ooc - Out Of Character (Global Chat). Ecosystemīecause DarkRP is used so widely a lot of paid and non-paid addons support it unlike other Roleplay Gamemodes that are out there making it perfect for a quick plug and play server. Modifying the default DarkRP gamemode into other gamemodes is not recommended and you should use a different Roleplay Base designed to be modified or use the DarkRP Derived. GamemodesĭarkRP is expansive even beyond the DarkRP gamemode itself, people modify it into other Roleplay gamemodes such as the following. Modifying DarkRPs default settings is simplified by using an addon called DarkRP Modification created by FPtje to stop people from editing the core files and breaking stuff.
#Darkrp gamemode code mod#
DarkRP is a non-serious roleplay gamemode developed by FPtje (Falco Peijnenburg) over the course of the last 8 years, over this time it has grown into one of, if not the biggest gamemode in all of Garry's Mod.ĭarkRP by default has an Administration Mod called FAdmin and a Prop Protection System called FPP (Falco's PP). Heres the code for the Admin class if you would like to use it, read the guide on adding custom jobs if youre unsure.
