Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function ch_list(player,choice)
- local user_id = vRP.getUserId(player)
- if user_id ~= nil and vRP.hasPermission(user_id,"player.list") then
- if player_lists[player] then -- hide
- player_lists[player] = nil
- vRPclient.removeDiv(player,{"user_list"})
- else -- show
- local content = ""
- local count = 0
- for k,v in pairs(vRP.rusers) do
- count = count+1
- local source = vRP.getUserSource(k)
- vRP.getUserIdentity(k, function(identity)
- if source ~= nil then
- content = content.."("..k..")"
- if identity then
- -- content = content.." "..htmlEntities.encode(identity.firstname).." "..htmlEntities.encode(identity.name).." "..identity.registration
- content = content.."<span class=\"pseudo\">"..GetPlayerName(source).."</span> - <span class=\"name\">"..htmlEntities.encode(identity.firstname).." "..htmlEntities.encode(identity.name).."</span> - CPR: <span class=\"reg\">"..identity.registration.."</span> - TLF: <span class=\"phone\">"..identity.phone.."</span><br>"
- end
- end
- -- check end
- count = count-1
- if count == 0 then
- player_lists[player] = true
- local css = [[
- .div_user_list{
- margin: auto;
- padding: 8px;
- width: 650px;
- margin-top: 58px;
- background: black;
- color: white;
- font-weight: bold;
- font-size: 16px;
- font-family: arial;
- }
- .div_user_list .pseudo{
- color: rgb(0,255,125);
- }
- .div_user_list .endpoint{
- color: rgb(255,0,0);
- }
- .div_user_list .name{
- color: #309eff;
- }
- .div_user_list .reg{
- color: rgb(0,125,255);
- }
- .div_user_list .phone{
- color: rgb(211, 0, 255);
- }
- ]]
- vRPclient.setDiv(player,{"user_list", css, content})
- end
- end)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement