SHARE
TWEET

Untitled

a guest Sep 11th, 2019 121 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function ch_list(player,choice)
  2.   local user_id = vRP.getUserId(player)
  3.   if user_id ~= nil and vRP.hasPermission(user_id,"player.list") then
  4.     if player_lists[player] then -- hide
  5.       player_lists[player] = nil
  6.       vRPclient.removeDiv(player,{"user_list"})
  7.     else -- show
  8.       local content = ""
  9.       local count = 0
  10.       for k,v in pairs(vRP.rusers) do
  11.         count = count+1
  12.         local source = vRP.getUserSource(k)
  13.         vRP.getUserIdentity(k, function(identity)
  14.           if source ~= nil then
  15.             content = content.."("..k..")"
  16.             if identity then
  17.               -- content = content.." "..htmlEntities.encode(identity.firstname).." "..htmlEntities.encode(identity.name).." "..identity.registration
  18.               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>"
  19.             end
  20.           end
  21.  
  22.           -- check end
  23.           count = count-1
  24.           if count == 0 then
  25.             player_lists[player] = true
  26.             local css = [[
  27.         .div_user_list{
  28.           margin: auto;
  29.           padding: 8px;
  30.           width: 650px;
  31.           margin-top: 58px;
  32.           background: black;
  33.           color: white;
  34.           font-weight: bold;
  35.           font-size: 16px;
  36.           font-family: arial;
  37.         }
  38.  
  39.         .div_user_list .pseudo{
  40.           color: rgb(0,255,125);
  41.         }
  42.  
  43.         .div_user_list .endpoint{
  44.           color: rgb(255,0,0);
  45.         }
  46.  
  47.         .div_user_list .name{
  48.           color: #309eff;
  49.         }
  50.  
  51.         .div_user_list .reg{
  52.           color: rgb(0,125,255);
  53.         }
  54.                
  55.         .div_user_list .phone{
  56.           color: rgb(211, 0, 255);
  57.         }
  58.             ]]
  59.             vRPclient.setDiv(player,{"user_list", css, content})
  60.           end
  61.         end)
  62.       end
  63.     end
  64.   end
  65. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top