Don't create ClientConvar on Bots.

Attempt to fix #7
This commit is contained in:
sammyt291 2020-03-03 09:48:04 +00:00 committed by GitHub
parent e30a4d5247
commit 9d4aaba7fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,7 +200,7 @@ end
net.Receive("nadmod_ppfriends",function(len)
NADMOD.Friends = net.ReadTable()
for _,tar in pairs(player.GetAll()) do
for _,tar in pairs(player.GetHumans()) do
CreateClientConVar("npp_friend_"..tar:SteamID64(),NADMOD.Friends[tar:SteamID()] and "1" or "0", false, false)
RunConsoleCommand("npp_friend_"..tar:SteamID64(),NADMOD.Friends[tar:SteamID()] and "1" or "0")
end