Need some help with defining status through a derma panel
2 replies, posted
So i'm trying to make a police database for a server I am developing on, I can't figure this one problem out.
https://imgur.com/a/I8kB998
As you can see it says "Not Wanted" and "Not Arrested" But once I try to License and want myself I can't get it to work. I have tried
if wanted then
draw.SimpleText("Wanted","Impact",135,70,Color(52,52,52))
else
draw.SimpleText("Not-Wanted","Impact",135,70,Color(52,52,52))
end
if wantedr then
draw.SimpleText(wantedr,"Impact",215,70,Color(52,52,52))
else
draw.SimpleText("","Impact",215,70,Color(52,52,52))
end
if license then
draw.SimpleText("Licensed","Impact",135,90,Color(52,52,52))
else
draw.SimpleText("Unlicensed","Impact",135,90,Color(52,52,52))
end
if arrested then
draw.SimpleText("Arrested","Impact",135,110,Color(52,52,52))
else
draw.SimpleText("Not-Arrested","Impact",135,110,Color(52,52,52))
I have also tried adding a true statement.
The derma panel opens when you click a name on the DListView panel but whenever I click on another player it only shows my info, I'm currently using LocalPlayer() as my way of getting variables and such but I can not think of any other way.
Based off your code who are you check is wanted? you just have if wanted but it's not pointing to a specific player unless that's a function you made BUT DarkRP already offers a check for that you can do Functions/Player/Shared/isWanted
you could also do ply:getDarkRPVar("wanted") which returns a true or false but I would stick with isWanted()
I do have a local variable a bit further up with all the DarkRPVars listed there, what I'm trying to do is use the DListView to open up another derma panel with legal information on the player you clicked on. Thanks for that link though, I'll look into that.
Sorry, you need to Log In to post a reply to this thread.