Аддоны

Список аддонов s&box

DarkRP (BETA)

steam-workshop.3846229017

Описание

GitHub: https://github.com/sbox-addons/DarkRP (Contributions welcome)

DarkRP for s&box

The classic Garry's Mod roleplay gamemode, rebuilt for s&box as a Sandbox addon. Jobs, money, police, a mayor, doors, money printers, hits, a full menu and a prop protection: everything you know from DarkRP, written from scratch in C# with no Garry's Mod content needed.

BETA: everything below works in testing; please report bugs in the comments.

Features

  • 10 jobs: Citizen, Civil Protection, Gangster, Mob Boss, Gun Dealer, Medic, Police Chief, Mayor, Hobo and Cook, each with its own outfit, loadout, salary and limit. Vote jobs, demotions, custom job titles and RP names
  • Economy: paydays, wallet, /give, /dropmoney, cheques, shipments, single weapons, ammo and buyable entities
  • Police: wanted and warrants (approved by the mayor), arrest and unarrest batons, stun stick, battering ram, weapon checker, jail positions
  • Mayor: laws on a law board, lockdowns, lotteries, broadcasts and agendas
  • Doors: buy, sell, lock, co-owners, door titles, police and job doors, lock picks
  • Entities: money printers (they can overheat), drug lab, gun lab, microwave, tip jar, letters
  • Hits, hunger (optional), pocket, medic kit and keys
  • DarkRP HUD: health, armour, hunger, wallet, salary timer, status, ammo and agenda. It steps aside when the Q or C menu is open
  • F4-style menu (M) with jobs, shop, mayor and admin tabs, plus local, OOC, whisper, yell, group and advert chat
  • DarkRP scoreboard (Tab): players grouped by job, with badges and click actions for admins
  • Prop protection in the style of FPP:
    • Only owners, their buddies and admins can touch a prop
    • The owner box shows on the left side of the screen
    • Anti prop-kill
    • Map props are for admins only
    • Blocked models, with wildcards
    • Cloud and mounted-game content is admin-only by default
    • Spawn delay and a size limit
    • Props are kept for players who leave and returned if they come back

For server owners: no code needed

Everything lives in Sandbox's data folder under data/darkrp/. Like DarkRP's darkrpmodification, it survives addon updates:
  • config.json: nearly 100 settings (salaries, door prices, jail time, hunger, licenses...). You can also change them live with /rpconfig or the Admin tab
  • jobs.json, shipments.json, entities.json, ammo.json, food.json: add your own content, or change any default by writing only the fields you want
  • disabled_defaults.json: like DarkRP's, every default job, shipment, entity, law and module (hunger, hits, HUD, prop protection) switches off with true
  • propprotection.json: also editable in game under Spawn menu > Utilities > Server > Prop Protection
  • reference/: everything currently loaded, in the same format, ready to copy
  • README.txt: every setting and command, generated from the version you run
Admins are Sandbox admins or players with the darkrp.admin permission. Useful commands: /setjob, /setmoney, /arrest, /setspawn, /addjailpos, /ppcleanup, /ppblock.

For developers: extend DarkRP from your own addon

Add jobs, shipments, entities, ammo, food, categories, door groups, agendas, chat commands and hooks without touching this addon:
public sealed class MyCity : GameObjectSystem
{
	public MyCity( Scene scene ) : base( scene )
	{
		DarkRP.OnLoad( scene, "mycity", () => Register() );
	}

	static void Register()
	{
		DarkRP.CreateJob( "Security Guard", new RPJob { Command = "guard", Color = "#3c78c8", Salary = 60, Max = 3 } );
		DarkRP.AddChatCommand( "shift", "Start your shift.", cmd => cmd.Reply( "Clocked in!" ) );
		DarkRP.AddHook( "playerGetSalary", "mycity_bonus", h => { if ( h.Job.Command == "guard" ) h.Amount += 10; } );
		DarkRP.RegisterEntityType( new RPEntityType { Id = "my_radio", Name = "Radio", Component = "MyRadio", Model = "models/sbox/home/tv/tv.vmdl", Touch = "physgun,pickup" } );
	}
}
  • Content: CreateJob, CreateShipment, CreateEntity, CreateAmmoType, CreateFood, CreateCategory, AddDoorGroup, CreateAgenda, CreateGroupChat, CreateDemoteGroup, AddDefaultLaw, Disable, DisableModule
  • Players and money: GetMoney, AddMoney, CanAfford, ChangeJob, IsCP, Notify, ChatTo, Config()
  • Your own entities: a component plus DarkRP's RPEntity gives owner, label, price, health and use handling
  • Prop protection, DarkRP's CPPI: DarkRP.CanTouch(player, object, "physgun") and DarkRP.GetOwner(object). Entity types choose what owners may do (Touch), and the CanTouchEntity hook overrides it

Supported hooks

Hooks get an RPHook (Player, Target, Job, Amount, Text, Reason, Entity...). They can Deny(reason), change values, or stop later hooks.
[table]
[tr][th]Area[/th][th]Hooks[/th][/tr]
[tr][td]Jobs[/td][td]canChangeJob, OnPlayerChangedTeam, onPlayerDemoted, canDemote, canChangeJobTitle, CanChangeRPName, onPlayerChangedName[/td][/tr]
[tr][td]Money[/td][td]playerGetSalary, playerWalletChanged, canGiveMoney, canDropMoney, playerPickedUpMoney, moneyPrinterPrintMoney[/td][/tr]
[tr][td]Shop[/td][td]canBuyShipment, canBuyPistol, playerBoughtShipment, playerBoughtPistol, canBuyCustomEntity, playerBoughtCustomEntity, canBuyAmmo, canBuyFood[/td][/tr]
[tr][td]Police[/td][td]canArrest, canUnarrest, playerArrested, playerUnArrested, canWanted, playerWanted, playerUnWanted, playerWarranted, playerUnWarranted, playerWeaponsChecked, playerWeaponsConfiscated, playerWeaponsReturned[/td][/tr]
[tr][td]Doors[/td][td]playerBuyDoor, playerBoughtDoor, playerSoldDoor, canDoorRam, onDoorRamUsed, canLockpick, lockpickStarted, lockpickTime, onLockpickCompleted, keypadCheck[/td][/tr]
[tr][td]Mayor and votes[/td][td]canEditLaws, addLaw, removeLaw, resetLaws, canStartLockdown, lockdownStarted, lockdownEnded, canStartVote, onVoteStarted, onVoteEnded[/td][/tr]
[tr][td]Entities[/td][td]canUseEntity, playerUsedEntity, entityDestroyed, canPocket, onPocketItemAdded, canDropWeapon[/td][/tr]
[tr][td]Hits and hunger[/td][td]canRequestHit, onHitAccepted, onHitCompleted, onHitFailed, hungerUpdate[/td][/tr]
[tr][td]Chat[/td][td]PlayerSay, onChatCommand[/td][/tr]
[tr][td]Players[/td][td]playerInitialSpawn, playerDisconnected, PlayerSpawn, PlayerLoadout, PlayerDeath, configChanged[/td][/tr]
[tr][td]Prop protection[/td][td]PlayerSpawnProp, PlayerSpawnObject, CanTouchProp, CanTouchEntity[/td][/tr]
[/table]
The full guide and a complete example addon come with the addon: Docs/API.md and Docs/examples/MyCityDarkRP.csx.

Credits and license

Based on DarkRP by Falco Peijnenburg (MIT license; the notice ships with the addon as DARKRP_NOTICE.txt). The guns and arm animations are Sandbox's (MIT, Facepunch). The stun baton, battering ram, law board and money models were made for this addon. No Garry's Mod, Half-Life 2 or Counter-Strike content is used or required.

Медиа

История подписчиков Workshop DarkRP (BETA)

37h tracked in 7d range · hourly samples

Обновления

1 update
Latest package update

Другие работы Marc

01
Миниатюра Wirebox (BETA)

https://github.com/wiremod/wire Credits are going to Wiremod for the Models and the Tool Ideas Inofficial Wiremod ported (BETA some things are missing) to S&Box What is included…

Целевая игра: Sandbox

152подписчики
8избранное
13положительные оценки
--рейтинг
02
Миниатюра WheelOfLuck [DarkRP]

🎰 WHEEL OF LUCK 🎰 Pull up a stool and try your luck! A fully working casino slot machine for Sandbox: spin the reels, land BONUS symbols to unlock free spins on the big prize…

Целевая игра: Sandbox

23подписчики
1избранное
1положительные оценки
--рейтинг