I want the player.GetAll in a draw.SimpleText. This will count all the players that are online. But i can’t get it to working.
I think you’re looking for
Ah, yes… Thank you!!!
[editline]19th September 2017[/editline]
One lil question tho. How would i apply that on a draw.SimpleText?
Yeah, im dumb ^^
Just put player.GetCount() instead of the text argument you have.
Thanks, I just forgot to remove the “” from the text argument.
Do you know the Player count aswell? Because i can’t find it? It’s the one that counts your kills and resets when your death?
Do you mean how many people a player has killed and how many times the player has died?
Got this problem:
[ERROR] lua/autorun/client/cl_hud_load.lua:85: attempt to call method 'Frags' (a nil value) 1. v - lua/autorun/client/cl_hud_load.lua:85 2. unknown - lua/includes/modules/hook.lua:84
draw.SimpleText(player:Frags(), "Text3", ScrW() / 1 - 270, ScrH() - 1027, Color(255,255,255,250), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
Without seeing the full code I can only say you want [lua]LocalPlayer():Frags()[/lua]
Strange, I don’t see anything wrong. Could you post more of the code maybe 10 lines in both directions. Also, verify the player is valid.
player probably isn’t defined in the function scope.
Oo, I was editing my post when you said that lol.
[editline]21st September 2017[/editline]
Wait, this counts my deaths to -1?
Frags counts kills.
Yeah, i know that. But whenever i die it will go to -1?
Yes. Frags are reset upon death.
Ah, okay. Is there a way that it only counts the LocalPlayer kills
Frags aren’t shared – each player’s frags are unique to them.