[ DarkRP ] F4 + Car NPC

F4 MENU:

replace with darkrp/gamemode/client/vgui

Next:

replace with darkrp/gamemode/client/showteam

Next:

replace with darkrp/gamemode/server/gamemode_funictions

Next:
Go to gamemodes/darkrp/gamemode/cl.init

Then at the top u can see

GM.Version = “2.4.3”
GM.Name = “DarkRP”
GM.Author = “asdddddddddddddd”

DeriveGamemode(“sandbox”)
util.PrecacheSound(“earthquake.mp3”)

Under Earthquake put this

CUR = “$” Then it should work :slight_smile:

All credits goes to Hans http://steamcommunity.com/id/xavux/
Support: http://steamcommunity.com/id/Ficidy/
Report bugs to me: http://steamcommunity.com/id/Ficidy/
Or hans if he wants to help lol

CAR NPC:

http://forum.facepunch.com/showthread.php?t=1282416&p=41224107&viewfull=1#post41224107

Well now it ain’t custom… :confused:

Oh my, now where did I put my puke bucket?

Download updated.

Sorry Sgt I love you anyways:(

So you are alt of Chef Ramsay ? (According to the pics)

Yep, And I spoke to the moderator
He banned the Chef acc so i can use this ;X And thats off topic. :X

Could you [t] your images?

Getting Lua errors when i go to the f4 Shop tab

[editline]26th June 2013[/editline]

Well it says too many lua errors and kicks me :’(

[ERROR] gamemodes/darkrp/gamemode/client/vgui.lua:1039: attempt to concatenate global ‘CUR’ (a nil value)

  1. Refresh - gamemodes/darkrp/gamemode/client/vgui.lua:1039
  2. OpenTab - gamemodes/darkrp/gamemode/client/vgui.lua:487
    3. DoClick - gamemodes/darkrp/gamemode/client/vgui.lua:970
    4. unknown - lua/vgui/dlabel.lua:206
    lua errors :frowning:

Sorry guys!

Go to gamemodes/darkrp/gamemode/cl.init

Then at the top u can see

GM.Version = “2.4.3”
GM.Name = “DarkRP”
GM.Author = “asdddddddddddddd”

DeriveGamemode(“sandbox”)
util.PrecacheSound(“earthquake.mp3”)

Under Earthquake put this

CUR = “$” Then it should work :slight_smile:

[editline]26th June 2013[/editline]

My plans on realeing later!

Automatic donation system
:smiley:

top job.

Why don’t you give proper credit to the authors of these mods?

The F4 Menu was coded by Hans Leid and the scoreboard was made by DrakeHawke.

some kind of issue when pressing f2. I think it’s related to this area.

[ERROR] gamemodes/darkrp/gamemode/client/vgui.lua:1269: attempt to call method ‘ReadBool’ (a nil value)

  1. unknown - gamemodes/darkrp/gamemode/client/vgui.lua:1269
  2. unknown - gamemodes/darkrp/gamemode/cl_init.lua:237

This is why Falco is against people editing the core files of DarkRP. You can easily create a new F4 Menu without touching any of the core files. That’s what modules are for.

http://cloud-2.steampowered.com/ugc/577867289662712253/3621EBA7363B57DD2EE922B8FB767C714C8D420D/

Your name is overlapping your money. Great job.

Also the F4 Menu breaks F2 functions.

–snip–
a temp fix
[lua]
local KeyFrameVisible = false
local function KeysMenu(um)
local Vehicle = LocalPlayer():GetEyeTrace().Entity
Vehicle = IsValid(Vehicle) and Vehicle:IsVehicle()
if KeyFrameVisible then return end
local trace = LocalPlayer():GetEyeTrace()
local Frame = vgui.Create(“DFrame”)
KeyFrameVisible = true
Frame:SetSize(200, 470)
Frame:Center()
Frame:SetVisible(true)
Frame:MakePopup()

function Frame:Think()
	local ent = LocalPlayer():GetEyeTrace().Entity
	if not IsValid(ent) or (not ent:IsDoor() and not string.find(ent:GetClass(), "vehicle")) or ent:GetPos():Distance(LocalPlayer():GetPos()) > 200 then
		self:Close()
	end
	if (!self.Dragging) then return end
	local x = gui.MouseX() - self.Dragging[1]
	local y = gui.MouseY() - self.Dragging[2]
	x = math.Clamp( x, 0, ScrW() - self:GetWide() )
	y = math.Clamp( y, 0, ScrH() - self:GetTall() )
	self:SetPos( x, y )
end
local Entiteh = "door"
if Vehicle then
	Entiteh = "vehicle"
end
Frame:SetTitle(Entiteh .. " options")

function Frame:Close()
	KeyFrameVisible = false
	self:SetVisible( false )
	self:Remove()
end

if trace.Entity:OwnedBy(LocalPlayer()) then
	if not trace.Entity.DoorData then return end -- Don't open the menu when the door settings are not loaded yet
	local Owndoor = vgui.Create("DButton", Frame)
	Owndoor:SetPos(10, 30)
	Owndoor:SetSize(180, 100)
	Owndoor:SetText("Sell " .. Entiteh)
	Owndoor.DoClick = function() RunConsoleCommand("darkrp", "/toggleown") Frame:Close() end

	local AddOwner = vgui.Create("DButton", Frame)
	AddOwner:SetPos(10, 140)
	AddOwner:SetSize(180, 100)
	AddOwner:SetText("Add owner")
	AddOwner.DoClick = function()
		local menu = DermaMenu()
		menu.found = false
		for k,v in pairs(player.GetAll()) do
			if not trace.Entity:OwnedBy(v) and not trace.Entity:AllowedToOwn(v) then
				menu.found = true
				menu:AddOption(v:Nick(), function() RunConsoleCommand("darkrp", "/ao", v:SteamID()) end)
			end
		end
		if not menu.found then
			menu:AddOption("Noone available", function() end)
		end
		menu:Open()
	end

	local RemoveOwner = vgui.Create("DButton", Frame)
	RemoveOwner:SetPos(10, 250)
	RemoveOwner:SetSize(180, 100)
	RemoveOwner:SetText("Remove owner")
	RemoveOwner.DoClick = function()
		local menu = DermaMenu()
		for k,v in pairs(player.GetAll()) do
			if (trace.Entity:OwnedBy(v) and not trace.Entity:IsMasterOwner(v)) or trace.Entity:AllowedToOwn(v) then
				menu.found = true
				menu:AddOption(v:Nick(), function() RunConsoleCommand("darkrp", "/ro", v:SteamID()) end)
			end
		end
		if not menu.found then
			menu:AddOption("Noone available", function() end)
		end
		menu:Open()
	end

	local DoorTitle = vgui.Create("DButton", Frame)
	DoorTitle:SetPos(10, 360)
	DoorTitle:SetSize(180, 100)
	DoorTitle:SetText("Set "..Entiteh.." title")
	if not trace.Entity:IsMasterOwner(LocalPlayer()) then
		RemoveOwner.m_bDisabled = true
	end
	DoorTitle.DoClick = function()
		Derma_StringRequest("Set door title", "Set the title of the "..Entiteh.." you're looking at", "", function(text)
			LocalPlayer():ConCommand("darkrp /title ".. text)
			if ValidPanel(Frame) then
				Frame:Close()
			end
		end,
		function() end, "OK!", "CANCEL!")
	end

	if (FAdmin and FAdmin.Access.PlayerHasPrivilege(LocalPlayer(), "rp_doorManipulation") or LocalPlayer():IsAdmin()) and not Vehicle then
		Frame:SetSize(200, Frame:GetTall() + 110)
		local SetCopsOnly = vgui.Create("DButton", Frame)
		SetCopsOnly:SetPos(10, Frame:GetTall() - 110)
		SetCopsOnly:SetSize(180, 100)
		SetCopsOnly:SetText("Edit Door Group")
		SetCopsOnly.DoClick = function()
			local menu = DermaMenu()
			local groups = menu:AddSubMenu("Door Groups")
			local teams = menu:AddSubMenu("Jobs")
			local add = teams:AddSubMenu("Add")
			local remove = teams:AddSubMenu("Remove")

			menu:AddOption("None", function() RunConsoleCommand("darkrp", "/togglegroupownable") Frame:Close() end)
			for k,v in pairs(RPExtraTeamDoors) do
				groups:AddOption(k, function() RunConsoleCommand("darkrp", "/togglegroupownable", k) Frame:Close() end)
			end

			if not trace.Entity.DoorData then return end

			for k,v in pairs(RPExtraTeams) do
				if not trace.Entity.DoorData.TeamOwn or not trace.Entity.DoorData.TeamOwn[k] then
					add:AddOption( v.name, function() RunConsoleCommand("darkrp", "/toggleteamownable", k) Frame:Close() end )
				else
					remove:AddOption( v.name, function() RunConsoleCommand("darkrp", "/toggleteamownable", k) Frame:Close() end )
				end
			end

			menu:Open()
		end
	end
elseif not trace.Entity:OwnedBy(LocalPlayer()) and trace.Entity:IsOwnable() and not trace.Entity:IsOwned() and not trace.Entity.DoorData.NonOwnable then
	if not trace.Entity.DoorData.GroupOwn then
		Frame:SetSize(200, 140)
		local Owndoor = vgui.Create("DButton", Frame)
		Owndoor:SetPos(10, 30)
		Owndoor:SetSize(180, 100)
		Owndoor:SetText("Buy " .. Entiteh)
		Owndoor.DoClick = function() RunConsoleCommand("darkrp", "/toggleown") Frame:Close() end
	end

	if (FAdmin and FAdmin.Access.PlayerHasPrivilege(LocalPlayer(), "rp_doorManipulation") or LocalPlayer():IsAdmin()) then
		if trace.Entity.DoorData.GroupOwn then
			Frame:SetSize(200, 250)
		else
			Frame:SetSize(200, 360)
		end

		local DisableOwnage = vgui.Create("DButton", Frame)
		DisableOwnage:SetPos(10, Frame:GetTall() - 220)
		DisableOwnage:SetSize(180, 100)
		DisableOwnage:SetText("Disallow ownership")
		DisableOwnage.DoClick = function() Frame:Close() RunConsoleCommand("darkrp", "/toggleownable") end

		local SetCopsOnly = vgui.Create("DButton", Frame)
		SetCopsOnly:SetPos(10, Frame:GetTall() - 110)
		SetCopsOnly:SetSize(180, 100)
		SetCopsOnly:SetText("Edit Door Group")
		SetCopsOnly.DoClick = function()
			local menu = DermaMenu()
			local groups = menu:AddSubMenu("Door Groups")
			local teams = menu:AddSubMenu("Jobs")
			local add = teams:AddSubMenu("Add")
			local remove = teams:AddSubMenu("Remove")

			menu:AddOption("None", function() RunConsoleCommand("darkrp", "/togglegroupownable") Frame:Close() end)
			for k,v in pairs(RPExtraTeamDoors) do
				groups:AddOption(k, function() RunConsoleCommand("darkrp", "/togglegroupownable", k) Frame:Close() end)
			end

			if not trace.Entity.DoorData then return end

			for k,v in pairs(RPExtraTeams) do
				if not trace.Entity.DoorData.TeamOwn or not trace.Entity.DoorData.TeamOwn[k] then
					add:AddOption(v.name, function() RunConsoleCommand("darkrp", "/toggleteamownable", k) if Frame.Close then Frame:Close() end end)
				else
					remove:AddOption(v.name, function() RunConsoleCommand("darkrp", "/toggleteamownable", k) Frame:Close() end)
				end
			end

			menu:Open()
		end
	elseif not trace.Entity.DoorData.GroupOwn then
		RunConsoleCommand("darkrp", "/toggleown")
		Frame:Close()
		KeyFrameVisible = true
		timer.Simple(0.3, function() KeyFrameVisible = false end)
	end
elseif not trace.Entity:OwnedBy(LocalPlayer()) and trace.Entity:AllowedToOwn(LocalPlayer()) then
	Frame:SetSize(200, 140)
	local Owndoor = vgui.Create("DButton", Frame)
	Owndoor:SetPos(10, 30)
	Owndoor:SetSize(180, 100)
	Owndoor:SetText("Co-own " .. Entiteh)
	Owndoor.DoClick = function() RunConsoleCommand("darkrp", "/toggleown") Frame:Close() end

	if (FAdmin and FAdmin.Access.PlayerHasPrivilege(LocalPlayer(), "rp_doorManipulation") or LocalPlayer():IsAdmin()) then
		Frame:SetSize(200, Frame:GetTall() + 110)
		local SetCopsOnly = vgui.Create("DButton", Frame)
		SetCopsOnly:SetPos(10, Frame:GetTall() - 110)
		SetCopsOnly:SetSize(180, 100)
		SetCopsOnly:SetText("Edit Door Group")
		SetCopsOnly.DoClick = function()
			local menu = DermaMenu()
			local groups = menu:AddSubMenu("Door Groups")
			local teams = menu:AddSubMenu("Jobs")
			local add = teams:AddSubMenu("Add")
			local remove = teams:AddSubMenu("Remove")

			menu:AddOption("None", function() RunConsoleCommand("darkrp", "/togglegroupownable") Frame:Close() end)
			for k,v in pairs(RPExtraTeamDoors) do
				groups:AddOption(k, function() RunConsoleCommand("darkrp", "/togglegroupownable", k) Frame:Close() end)
			end

			if not trace.Entity.DoorData then return end

			for k,v in pairs(RPExtraTeams) do
				if not trace.Entity.DoorData.TeamOwn or not trace.Entity.DoorData.TeamOwn[k] then
					add:AddOption( v.name, function() RunConsoleCommand("darkrp", "/toggleteamownable", k) Frame:Close() end )
				else
					remove:AddOption( v.name, function() RunConsoleCommand("darkrp", "/toggleteamownable", k) Frame:Close() end )
				end
			end

			menu:Open()
		end
	else
		RunConsoleCommand("darkrp", "/toggleown")
		Frame:Close()
		KeyFrameVisible = true
		timer.Simple(0.3, function() KeyFrameVisible = false end)
	end
elseif (FAdmin and FAdmin.Access.PlayerHasPrivilege(LocalPlayer(), "rp_doorManipulation") or LocalPlayer():IsAdmin()) and trace.Entity.DoorData.NonOwnable then
	Frame:SetSize(200, 250)
	local EnableOwnage = vgui.Create("DButton", Frame)
	EnableOwnage:SetPos(10, 30)
	EnableOwnage:SetSize(180, 100)
	EnableOwnage:SetText("Allow ownership")
	EnableOwnage.DoClick = function() Frame:Close() RunConsoleCommand("darkrp", "/toggleownable") end

	local DoorTitle = vgui.Create("DButton", Frame)
	DoorTitle:SetPos(10, Frame:GetTall() - 110)
	DoorTitle:SetSize(180, 100)
	DoorTitle:SetText("Set "..Entiteh.." title")
	DoorTitle.DoClick = function()
		Derma_StringRequest("Set door title", "Set the title of the "..Entiteh.." you're looking at", "", function(text) LocalPlayer():ConCommand("darkrp /title ".. text) Frame:Close() end, function() end, "OK!", "CANCEL!")
	end
elseif (FAdmin and FAdmin.Access.PlayerHasPrivilege(LocalPlayer(), "rp_doorManipulation") or LocalPlayer():IsAdmin()) and not trace.Entity:OwnedBy(LocalPlayer()) and trace.Entity:IsOwned() and not trace.Entity:AllowedToOwn(LocalPlayer()) then
	Frame:SetSize(200, 250)
	local DisableOwnage = vgui.Create("DButton", Frame)
	DisableOwnage:SetPos(10, 30)
	DisableOwnage:SetSize(180, 100)
	DisableOwnage:SetText("Disallow ownership")
	DisableOwnage.DoClick = function() Frame:Close() RunConsoleCommand("darkrp", "/toggleownable") end

	local SetCopsOnly = vgui.Create("DButton", Frame)
	SetCopsOnly:SetPos(10, Frame:GetTall() - 110)
	SetCopsOnly:SetSize(180, 100)
	SetCopsOnly:SetText("Edit Door Group")
		SetCopsOnly.DoClick = function()
			local menu = DermaMenu()
			local groups = menu:AddSubMenu("Door Groups")
			local teams = menu:AddSubMenu("Jobs")
			local add = teams:AddSubMenu("Add")
			local remove = teams:AddSubMenu("Remove")

			if not trace.Entity.DoorData then return end

			menu:AddOption("None", function() RunConsoleCommand("darkrp", "/togglegroupownable") Frame:Close() end)
			for k,v in pairs(RPExtraTeamDoors) do
				groups:AddOption(k, function() RunConsoleCommand("darkrp", "/togglegroupownable", k) Frame:Close() end)
			end

			for k,v in pairs(RPExtraTeams) do
				if not trace.Entity.DoorData.TeamOwn or not trace.Entity.DoorData.TeamOwn[k] then
					add:AddOption( v.name, function() RunConsoleCommand("darkrp", "/toggleteamownable", k) Frame:Close() end )
				else
					remove:AddOption( v.name, function() RunConsoleCommand("darkrp", "/toggleteamownable", k) Frame:Close() end )
				end
			end

			menu:Open()
		end
else
	Frame:Close()
end

Frame:SetSkin(GAMEMODE.Config.DarkRPSkin)

end
GM.ShowTeam = KeysMenu
usermessage.Hook(“KeysMenu”, KeysMenu)[/lua]

Starting from the line “local dialog” in your working copy, just paste what I put all the way down to the end. It should work. This is the vgui.lua file.

:confused:

It’s a shame to see little to no recognition for the creators…

Really off topic but Your avatar is spectacular xD

Furthermore, he sold some of this stuff to people, and refused to help them set it up.

On topic:
The green looks disgusting, and I get the feeling you’re trying to advertise ‘punch gaming’…? I think people would know ingame what server they’re on, and with punchgaming pretty much everywhere…

Edit:
I got to look on his website to see how green it is…
http://puu.sh/3pmUq.jpg