Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (SERVER) then
- util.AddNetworkString("target_ply")
- 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." )
- function ulx.profile(calling_ply, target_ply)
- net.Start("target_ply")
- net.WriteEntity(target_ply)
- net.Send(calling_ply)
- calling_ply:SendLua([[
- net.Receive("target_ply", function( len )
- local targ_pl = net.ReadEntity()
- targ_pl:ShowProfile()
- end)
- ]])
- end
- local profile = ulx.command("Moderator", "ulx profile", ulx.profile, "!profile",true)
- profile:addParam{ type=ULib.cmds.PlayerArg }
- profile:defaultAccess( ULib.ACCESS_ADMIN )
- profile:help( "Opens a link to the target's steam profile." )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement