ULib isnt compatible with anything, get rid of the file causing the error, ULib and ULX is very bloated
[QUOTE=Tobba;25084715]ULib isnt compatible with anything, get rid of the file causing the error, ULib and ULX is very bloated[/QUOTE]
Can't you read? It has nothing to do with ULib.
I require some assistance. I am trying to get DarkRP to work with a MySQL DB. The username, password, db name and server ip are all correct but each time I start up the server and then connect to it I get this error
[code]
Lua Error: [@gamemodes\darkrp\gamemode\data.lua:71] Connection failed! [Database:17318CF8]
[/code]
[QUOTE=FPtje;25069092]No one wants FAdmin.[/QUOTE]
Yes, there is. But then there's people, like me, who wants to use another admin tool instead.
Maybe you could make one with FAdmin included, and one without FAdmin. Then the ones who likes FAdmin could download the one with FAdmin included, and the ones who wants to have another admin tool could download the one without FAdmin.
[QUOTE=ceribik;25084966]Can't you read? It has nothing to do with ULib.[/QUOTE]
Timer Error: [addons\ulib\lua\ulib\server\hook.lua:139] attempt to index local 'gm' (a number value)
Have to belive it does, ULib overwrites functions, and breaks stuff in them thats supposed to work, thus causing the error
Falco's done ULX compatibility updates loads of times before, I'm sure he can do it again.
Megiddo said he would work on a CPPI.
whats CPPI?
[QUOTE=Drakehawke;25088566]Falco's done ULX compatibility updates loads of times before, I'm sure he can do it again.[/QUOTE]
That ULX file breaks 60% of all addons that use hook.Call, so its not just DarkRP
[QUOTE='dope [DK];25089892']whats CPPI?[/QUOTE]
I wanna know that too
[QUOTE=Tobba;25092288]That ULX file breaks 60% of all addons that use hook.Call, so its not just DarkRP[/QUOTE]
What's so special about their implementation of hook.Call? would removing it break any ulx/ulib?
Also, according to Megiddo, it's darkrp's fault for using an invalid argument: "Something outside of Ulysses is calling hook.Call with an invalid arg. You'd get a similar error without ULib installed."
Regardless, is there anyway i can debug it and figure out which actual call is broken? The error doesn't actually say where hook.call is being called from.
[QUOTE=FPtje;25089019]Megiddo said he would work on a CPPI.[/QUOTE]
Hasn't he?
[url]http://www.facepunch.com/showthread.php?t=488410[/url]
[url]http://ulyssesmod.net/archive/CPPI_v1-2_PROPOSED.pdf[/url]
Although he say's not to implement it yet, not much would (if ever) change.
[QUOTE=Rambomst;25086603]I require some assistance. I am trying to get DarkRP to work with a MySQL DB. The username, password, db name and server ip are all correct but each time I start up the server and then connect to it I get this error
[code]
Lua Error: [@gamemodes\darkrp\gamemode\data.lua:71] Connection failed! [Database:17318CF8]
[/code][/QUOTE]
Just to add on to what I said before. I have plugin on the same server connecting to the same MySQL server which is able to connect and retrieve data fine.
[QUOTE='dope [DK];25089892']whats CPPI?[/QUOTE]
Simply put, CPPI stands for Common Prop Protection Interface. It basically is a standard for how prop protection calls are made. CPPI was established by Team Ulysses.
[QUOTE=Rambomst;25098790]Just to add on to what I said before. I have plugin on the same server connecting to the same MySQL server which is able to connect and retrieve data fine.[/QUOTE]
Is that plugin mysqloo or another module?
mysqloo is broken totally for me, no matter what server I connect from it won't work, yet when I use another MySQL client I can connect remotely fine.
[QUOTE=Drakehawke;25108202]Is that plugin mysqloo or another module?
mysqloo is broken totally for me, no matter what server I connect from it won't work, yet when I use another MySQL client I can connect remotely fine.[/QUOTE]
I am using mysqloo, I didn't even realise there was another one. I will give that a try.
*edit*
Could you please give me a link to this other one.
[QUOTE=deadeye536;25099046]Simply put, CPPI stands for Common Prop Protection Interface. It basically is a standard for how prop protection calls are made. CPPI was established by Team Ulysses.[/QUOTE]
He's working on that, but for admin mods. I say CPPI because people know the name. It should be name CAMI (Common Admin Mod Interface).
When he implements that, shit will be much easier to fix.
[QUOTE=Rambomst;25118079]I am using mysqloo, I didn't even realise there was another one. I will give that a try.
*edit*
Could you please give me a link to this other one.[/QUOTE]
You'd have to re-write parts of DarkRP to use it, I was merely asking in case you had done it already.
Azuisleet's tmysql is the other one I know of.
hmm, so you obviously listened to what I said and deleted rating.lua ? Guess we're never going back to that. Kinda missed it, oh well, must keep moving forward I guess. But, my DarkRP Is fucked up now. The SVN has a yellow warning sign on it now :P
Also: wouldn't line 88 in init.lua not be needed anymore? Code:
[lua]
include("rating.lua")
[/lua]
I really didn't want to double post. I know, I know, I could just edit my previous post, but this needs attention. [b]I need to know where Eusion is[/b] For those of you who don't know who he is, he is a darkrp coder. The current coder of darkrp (fptje) could do this, but I would rather the creator of this to do it. I can't hold this in any longer. There is a trade system in darkrp. I bet almost nobody knows about it. There's a clientside and serverside I found. The clientside is in file:
[code]cl_vgui.lua[/code]
The code is this:
[lua]
--Begin Client-side trade system - By Eusion.
local TradeMenus = {}
local function TradeMenuClient(handler, id, encoded, decoded)
local items = decoded
local TradeFrame = vgui.Create("DFrame")
TradeFrame:SetSize((#items * 64)+20, 110)
TradeFrame:Center()
TradeFrame:SetTitle("Initialize a trade")
TradeFrame:MakePopup()
TradeFrame:SetSkin("DarkRP")
local ItemsForm = vgui.Create("DPanelList", TradeFrame)
ItemsForm:SetSize((#items * 64), 64)
ItemsForm:SetPos(10, 31)
ItemsForm:SetSpacing(0)
ItemsForm:EnableHorizontal(true)
ItemsForm:EnableVerticalScrollbar(true)
for k, v in pairs(items) do
if ValidEntity(v) then
local k = vgui.Create("SpawnIcon")
k:SetModel(v:GetModel())
k.DoClick = function()
LocalPlayer():ConCommand("rp_tradeitem " .. v:EntIndex())
TradeFrame:Close()
CloseDermaMenus()
end
k:SetToolTip(v:GetClass())
k:SetIconSize(64)
ItemsForm:AddItem(k)
end
end
end
datastream.Hook("darkrp_trade", TradeMenuClient)
local function TradeMenuRecipient(um)
local client = um:ReadEntity()
local recipient = um:ReadEntity()
local trade = um:ReadEntity()
local id = um:ReadShort()
if not ValidEntity(client) then return end
if not ValidEntity(recipient) then return end
if not ValidEntity(trade) then return end
local TradeFrame = vgui.Create("DFrame")
TradeFrame:SetSize(ScrW()/4, 250)
TradeFrame:Center()
TradeFrame:SetTitle("Trade interface")
TradeFrame:MakePopup()
TradeFrame:SetSkin("DarkRP")
function TradeFrame:Close()
LocalPlayer():ConCommand("rp_killtrade " .. id)
self:Remove()
end
local ItemsForm = vgui.Create("DPanel", TradeFrame)
ItemsForm:SetSize((TradeFrame:GetWide())-20, 209)
ItemsForm:SetPos(10, 31)
ItemsForm.Paint = function()
surface.DrawLine(ItemsForm:GetWide()/2, 21, (ItemsForm:GetWide()/2), 209)
end
local ClientLabel = vgui.Create("DLabel", ItemsForm)
ClientLabel:SetText("Trade: " .. client:Name())
ClientLabel:SetPos(5, 5)
ClientLabel:SizeToContents()
local RecipientLabel = vgui.Create("DLabel", ItemsForm)
RecipientLabel:SetText("Trade: " .. recipient:Name())
RecipientLabel:SetPos((ItemsForm:GetWide()/2)+15, 5)
RecipientLabel:SizeToContents()
local TradeClient = vgui.Create("SpawnIcon", ItemsForm)
TradeClient:SetModel(trade:GetModel())
TradeClient:SetToolTip(trade:GetClass())
TradeClient:SetPos(5, 10+ClientLabel:GetTall())
TradeRecipient = vgui.Create("SpawnIcon", ItemsForm)
TradeRecipient:SetModel(trade:GetModel())
TradeRecipient:SetToolTip(trade:GetClass())
TradeRecipient:SetPos((ItemsForm:GetWide()/2)+15, 10+RecipientLabel:GetTall())
if LocalPlayer() == recipient then
end
end
usermessage.Hook("darkrp_trade", TradeMenuRecipient)
local function TradeRequest(um)
local id = um:ReadShort()
local client = um:ReadEntity()
local trade = um:ReadEntity()
LocalPlayer():EmitSound("Town.d1_town_02_elevbell1", 100, 100)
local panel = vgui.Create("DFrame")
panel:SetPos(3 + PanelNum, ScrH() / 2 - 50)
panel:SetTitle("Trade")
panel:SetSize(140, 140)
panel:SetSizable(false)
panel.btnClose:SetVisible(false)
panel:SetDraggable(false)
function panel:Close()
PanelNum = PanelNum - 140
VoteVGUI[id .. "_trade"] = nil
local num = 0
for k,v in SortedPairs(VoteVGUI) do
v:SetPos(num, ScrH() / 2 - 50)
num = num + 140
end
for k,v in SortedPairs(QuestionVGUI) do
v:SetPos(num, ScrH() / 2 - 50)
num = num + 300
end
LocalPlayer():ConCommand("rp_killtrade " .. id)
self:Remove()
end
panel:SetKeyboardInputEnabled(false)
panel:SetMouseInputEnabled(true)
panel:SetVisible(true)
local label = vgui.Create("Label")
label:SetParent(panel)
label:SetPos(5, 30)
label:SetSize(180, 40)
label:SetText(client:Name() .. "\nWants to trade:\n" .. trade:GetClass())
label:SetVisible(true)
local divider = vgui.Create("Divider")
divider:SetParent(panel)
divider:SetPos(2, 80)
divider:SetSize(180, 2)
divider:SetVisible(true)
local ybutton = vgui.Create("Button")
ybutton:SetParent(panel)
ybutton:SetPos(25, 100)
ybutton:SetSize(40, 20)
ybutton:SetCommand("!")
ybutton:SetText("Yes")
ybutton:SetVisible(true)
ybutton.DoClick = function()
LocalPlayer():ConCommand("rp_tradevote " .. id .. " yes")
panel:Close()
end
local nbutton = vgui.Create("Button")
nbutton:SetParent(panel)
nbutton:SetPos(70, 100)
nbutton:SetSize(40, 20)
nbutton:SetCommand("!")
nbutton:SetText("No")
nbutton:SetVisible(true)
nbutton.DoClick = function()
LocalPlayer():ConCommand("rp_tradevote " .. id .. " no")
panel:Close()
end
PanelNum = PanelNum + 140
VoteVGUI[id .. "_trade"] = panel
panel:SetSkin("DarkRP")
timer.Simple(20, function()
LocalPlayer():ConCommand("rp_tradevote " .. id .. " no")
panel:Close()
end)
end
usermessage.Hook("darkrp_treq", TradeRequest)
local function KillTrade(um)
end
usermessage.Hook("darkrp_killtrade", KillTrade)
[/lua]
from lines 517 - 694
Server side is apparently incomplete.
Serverside is in file:
[code]sv_gamemode_functions.lua[/code]
and this is lua code:
[lua]
--Begin trading server-side (Although this appears to be unstable, don't worry, I've planned the system out, I've just not implemented the update completely).
--Note: Uncomplete; Please leave for Eusion to complete :).
if ValidEntity(tr.Entity) and tr.Entity:IsPlayer() then
ply.Trading = nil
local recipient = tr.Entity
local items = {}
for k, v in pairs(ents.GetAll()) do
local owner = (v.dt and v.dt.owning_ent) or nil
if owner and ValidEntity(owner) and owner == ply then
table.insert(items, v)
end
end
if #items > 0 then
datastream.StreamToClients(ply, "darkrp_trade", items)
items = {}
ply.Trading = recipient
else
Notify(ply, 1, 4, "You have no items that you can trade.")
end
end
end*/
end
local AllowedTrades = {"money_printer"}
concommand.Add("rp_tradeitem", function(ply, cmd, args)
local ent = Entity(tonumber(args[1]))
local owner = (ent.dt and ent.dt.owning_ent) or nil
local recipient = ply.Trading or nil
if owner and owner == ply and ValidEntity(ent) and recipient and ValidEntity(recipient) then
if table.HasValue(AllowedTrades, ent:GetClass()) then
vote:Trade(tonumber(ply:EntIndex()), ply, recipient, ent)
else
Notify(ply, 1, 4, "An administrator has forbidden trades using this item!")
end
else
Notify(ply, 1, 4, "Can't trade at this time.")
end
end)
concommand.Add("rp_killtrade", function(ply, cmd, args)
local id = args[1]
if not Trades[id] then return end
local recipient = Trades[id].recipient
local client = Trades[id].client
if not recipient then return end
if not client then return end
if not id then return end
if (ply == client or ply == recipient) then
local rf = RecipientFilter()
rf:AddPlayer(client)
rf:AddPlayer(recipient)
umsg.Start("darkrp_killtrade", rf)
umsg.Entity(ply) --Send the player who declined.
umsg.End()
Trades[id] = {}
table.remove(Trades, id)
end
end)
[/lua]
lines 149 - 206
Please, fix this up if it's broken. Also, I was trying it out on people, I couldn't really figure out [b]how[/b] to use it. Enjoy this, I found it while looking through the code.
Hey, I would like to know if there are any dedicated servers for DarkRP, IP addresses would be highly appriciated. :)
you missed adding the FAdmin shit to auto download. this is probably not the best way to do it, but....
[lua]local FAdmin = {}
FAdmin[0] = "back"
FAdmin[1] = "IconView"
FAdmin[2] = "ListView"
-- Icons
local FAdminIcons = {}
FAdminIcons[0] = "access"
FAdminIcons[1] = "ban"
FAdminIcons[2] = "changeteam"
FAdminIcons[3] = "chatmute"
FAdminIcons[4] = "cleanup"
FAdminIcons[5] = "cloak"
FAdminIcons[6] = "disable"
FAdminIcons[7] = "freeze"
FAdminIcons[8] = "god"
FAdminIcons[9] = "ignite"
FAdminIcons[10] = "jail"
FAdminIcons[11] = "kick"
FAdminIcons[12] = "Message"
FAdminIcons[13] = "MOTD"
FAdminIcons[14] = "noclip"
FAdminIcons[15] = "PickUp"
FAdminIcons[16] = "ragdoll"
FAdminIcons[17] = "RCON"
FAdminIcons[18] = "ServerSetting"
FAdminIcons[19] = "slap"
FAdminIcons[20] = "slay"
FAdminIcons[21] = "spectate"
FAdminIcons[22] = "teleport"
FAdminIcons[23] = "voicemute"
FAdminIcons[24] = "weapon"
for i=0,#FAdmin do
resource.AddFile("materials/FAdmin/" .. FAdmin[i] .. ".vmt")
print("Adding '" .. FAdmin[i] .. "' to redirect.")
end
for i=0,#FAdminIcons do
resource.AddFile("materials/FAdmin/icons/" .. FAdminIcons[i] .. ".vmt")
print("Adding '" .. FAdminIcons[i] .. "' to redirect.")
end[/lua]
lua/autorun/server/FAdmin_Resources.lua
[url=http://solidfiles.com/d/5cc5/]Download FAdmin_Resources.zip[/url]
Bullshit.
Do you think this code:
[lua]local function AddDir(dir) // recursively adds everything in a directory to be downloaded by client
local List = file.FindDir("../"..dir.."/*")
for _, fdir in pairs(List) do
if fdir != ".svn" then // don't spam people with useless .svn folders
AddDir(dir.."/"..fdir)
end
end
for k,v in pairs(file.Find("../"..dir.."/*")) do
resource.AddFile(dir.."/"..v)
end
end
AddDir("materials/fadmin")[/lua]
doesn't send the materials to the players?
[editline]07:46PM[/editline]
[QUOTE=uberpwns;25199607]I really didn't want to double post. I know, I know, I could just edit my previous post, but this needs attention. [b]I need to know where Eusion is[/b] For those of you who don't know who he is, he is a darkrp coder. The current coder of darkrp (fptje) could do this, but I would rather the creator of this to do it. I can't hold this in any longer. There is a trade system in darkrp. I bet almost nobody knows about it. There's a clientside and serverside I found. The clientside is in file:
Please, fix this up if it's broken. Also, I was trying it out on people, I couldn't really figure out [b]how[/b] to use it. Enjoy this, I found it while looking through the code.[/QUOTE]
This is Eusion's WIP project. He's working on it.
didnt work for me until i did that. no need to get nasty with me, sorry for trying to help...
Really? He's still working on it? :o
Also FPtje, if you're not going to fix the glitch with rp_strictsuicide, then we're all fucked if it gets out.
I sent you a pm about it before, you didn't respond. also, this is the file in which you should edit to fix the glitch. If you deleted my pm, just ask again, I will do it nicely but irritantly. But this is the file:
[code]sv_gamemode_functions.lua[/code]
A little bit farther down from the serverside trade system, I saw this;
lua code:
[lua]
function GM:PlayerSelectSpawn(ply)
local POS = self.BaseClass:PlayerSelectSpawn(ply)
if POS.GetPos then
POS = POS:GetPos()
else
POS = ply:GetPos()
end
local CustomSpawnPos = DB.RetrieveTeamSpawnPos(ply)
if GetConVarNumber("customspawns") == 1 and not RPArrestedPlayers[ply:SteamID()] and CustomSpawnPos then
POS = CustomSpawnPos[math.random(1, #CustomSpawnPos)]
end
-- Spawn where died in certain cases
if (GetConVarNumber("strictsuicide") == 1 or RPArrestedPlayers[ply:SteamID()]) and ply:GetTable().DeathPos then
POS = ply:GetTable().DeathPos
end
if not IsEmpty(POS) then
local found = false
for i = 40, 300, 15 do
if IsEmpty(POS + Vector(i, 0, 0)) then
POS = POS + Vector(i, 0, 0)
--Yeah I found a nice position to put the player in!
found = true
break
end
end
if not found then
for i = 40, 300, 15 do
if IsEmpty(POS + Vector(0, i, 0)) then
POS = POS + Vector(0, i, 0)
found = true
break
end
end
end
if not found then
for i = 40, 300, 15 do
if IsEmpty(POS + Vector(0, -i, 0)) then
POS = POS + Vector(0, -i, 0)
found = true
break
end
end
end
if not found then
for i = 40, 300, 15 do
if IsEmpty(POS + Vector(-i, 0, 0)) then
POS = POS + Vector(-i, 0, 0)
--Yeah I found a nice position to put the player in!
found = true
break
end
end
end
-- If you STILL can't find it, you'll just put him on top of the other player lol
if not found then
POS = POS + Vector(0,0,70)
end
end
return self.BaseClass:PlayerSelectSpawn(ply), POS
end
[/lua]
from lines 497 - 560 I believe.
-snip-
Please, Remove the FAdmin. Let people add their own custom admin mod. I can't edit Darkrp without having a conflict with FAadmin and i am already using ULX. (Fixed all bugs with ULX) Or at least make it so their is an easy removal.
[QUOTE=AngelofDeath114;25204256]Please, Remove the FAadmin. Let people add their own custom admin mod. I can't edit Darkrp without having a conflict with FAadmin and i am already using ULX. (Fixed all bugs with ULX)[/QUOTE]
'FAadmin'
Yes falco, remove 'FAadmin'.
FAdmin on the other hand, is pretty cool.
You should release FAdmin and remove it from DarkRP so if people want to use it they can individually get FAdmin and implent it into DarkRP.
fadmin_enabled 1/0
[editline]12:01AM[/editline]
add that pls
You guys think that when you have FAdmin installed, you can't use any other admin mod. this is not true.
You can still use ULX, evolve or even ASS, I don't care, it's possible.
There are just some compatibility bugs between FAdmin and ULX. But megiddo and I are working on that.
I don't know where you got the horrible idea of "one admin mod at a time"
Sorry, you need to Log In to post a reply to this thread.