So I'm making a database were you use a "DListView" To click on players which will open a derma panel and allow you to see stuff about that player... But the only thing is I don't know what I could use apart from LocalPlayer(), I've been looking all over the wiki for 2 days
I have the DListView and derma panel coded I just don't know how I would go about getting a players unique stats (Is he wanted/Arrested/Warrant)
I have tried LocalPlayer():GetDarkRPVar("wanted")
but when I test with my friends it just shows my info.
try a lower case g,
LocalPlayer():getDarkRPVar("wanted")
Yeah my code does have a lowecase G I'm just stupid and wrote it like that.
I know the Vars.
The problem is LocalPlayer() Pretty sure its recognising me as LocalPlayer(), I need it to recognise the player I click form the DListView
Thanks anyways.
I see, sorry I misunderstood what you wanted.
You will need to use a for loop,
for key, val in pairs(player.GetAll()) do
val:getDarkRPVar("wanted")
end
You can use this when creating a button,
local main = {}
local wantedinfo
main.frame = vgui.Create("DFrame")
....
for key, val in pairs(player.GetAll()) do
main.frame.button = main.frame:Add("DButton")
....
main.frame.button.DoClick = function()
wantedinfo = val:getDarkRPVar("wanted")
end
end
Thanks man I'll try it.
Sorry, you need to Log In to post a reply to this thread.