DarkRP | LUA Help Needed | Icons In Scoreboard/F4 Menu
0 replies, posted
Hello people. I was just looking for a bit of help from someone with a bit better knowledge of LUA then me.
My problem is, Instead of having text saying the player's rank, I'd like it to have a little Badge/Icon. I have started doing it, but I'm stuck on it right now, and it's really bugging me.
I'd be very appreciative if someone could give me hand, so I don't end up ruining my whole server xD.
[CODE]SetImage('icon16/accept.png')[/CODE]
This is what I began with, I know that I need to have this ^ in the code somewhere. I just cannot fit it in.
[CODE]if LocalPlayer():IsAdmin() then
draw.DrawText(v:GetNWString("usergroup"),"NameRank",38,19,color,TEXT_ALIGN_LEFT)
end //I would put the image here ^ ^ ^[/CODE]
This is how I thought it would be:
[CODE]if LocalPlayer():IsAdmin() then
draw.DrawText(SetImage('icon16/accept.png'),"NameRank",38,19,color,TEXT_ALIGN_LEFT)
end[/CODE]
When I use the code above, I get this error:
[ERROR] gamemodes/darkrp/gamemode/cl_scoreboard.lua:307: attempt to call global 'SetImage' (a nil value)
1. unknown - gamemodes/darkrp/gamemode/cl_scoreboard.lua:307
Thanks for looking, could someone please help me out.
Sorry, you need to Log In to post a reply to this thread.