Now before I get started I want to let anyone who helps me know in advance, thank you dearly.
Alright, so I have a GMOD13 Darkrp server and I am going to try to explain exactly what I need help with.
I am attempting to create a HUD button on the RP menu which will allow you to “sell” or mostly just remove your vehicles.
Now the code I believe is responsible for removing entities of a players is:
local function removeDelayed(ent, ply) local removedelay = GAMEMODE.Config.entremovedelay ent.deleteSteamID = ply:SteamID() timer.Create("Remove"..ent:EntIndex(), removedelay, 1, function() for _, pl in pairs(player.GetAll()) do if IsValid(pl) and IsValid(ent) and pl:SteamID() == ent.deleteSteamID then ent.SID = pl.SID ent.deleteSteamID = nil return end end SafeRemoveEntity(ent) end) end
I have been having issues with it. For 1, I know that I can call the entremovetime thingy. 2nd, the ent:EntIndex() probably needs to specify the players vehicles. 3rd, I haven’t even imaged how to morph this into a HUD. Now I am a very basic coder so it would be nice to know where to put it, how to create a HUD button, and mostly how do make it remove the vehicles.
By the way, if DarkRP is already equip with this, I am terribly sorry :suicide: