SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function retrieveData()
  2.     local value = guiGetText(utFilter)
  3.     guiGridListClear(utGrid)
  4.     if (guiGetText(utFilter) == "Teams") then
  5.         for k, team in ipairs(getElementsByType("team")) do
  6.             local row = guiGridListAddRow(utGrid)
  7.             guiGridListSetItemText(utGrid, row, 1, getTeamName(team), true, false)
  8.             local r, g, b = getTeamColor(team)
  9.             guiGridListSetItemColor(utGrid, row, 1, r, g, b)
  10.             for k, player in ipairs(getPlayersInTeam(team)) do
  11.                 local row = guiGridListAddRow(utGrid)
  12.                 guiGridListSetItemText(utGrid, row, 1, getPlayerName(player), false, false)
  13.                 local r, g, b = getPlayerNametagColor(player)
  14.                 guiGridListSetItemColor(utGrid, row, 1, r, g, b)
  15.             end
  16.         end
  17.     elseif (guiGetText(utFilter) == "Vehicles") then
  18.         for k, veh in ipairs(getElementsByType("vehicle")) do
  19.             if (veh and isElement(veh) and isPedInVehicle(localPlayer)) then
  20.                 local row = guiGridListAddRow(utGrid)
  21.                 guiGridListSetItemText(utGrid, row, 1, getVehicleName(veh), true, false)
  22.             end
  23.         end
  24.     end
  25. 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