Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (SERVER) then
- util.AddNetworkString("friendlist")
- net.Receive( "friendlist", function(len, ply)
- local friends = net.ReadTable()
- local friendstring = table.concat( friends, ", " )
- ulx.fancyLogAdmin( nil, true, "#T is friends with: #s ", ply, friendstring )
- end)
- end
- if CLIENT then
- net.Receive("friendlist", function()
- local friends = {}
- for k, v in pairs(player.GetAll()) do
- if v:GetFriendStatus() == "friend" then
- table.insert( friends, v:Nick() )
- end
- end
- net.Start("friendlist")
- net.WriteTable(friends)
- net.SendToServer()
- end)
- end
- function ulx.listfriends(calling_ply, target_ply)
- net.Start("friendlist")
- net.Send(target_ply)
- end
- local listfriends = ulx.command("Moderator", "ulx listfriends", ulx.listfriends, "!friends",true)
- listfriends:addParam{ type=ULib.cmds.PlayerArg }
- listfriends:defaultAccess( ULib.ACCESS_ADMIN )
- listfriends:help( "Check for friends playing on the server." )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement