Advertisement
Shiny_

Untitled

Jul 31st, 2014
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | None | 0 0
  1. function ShowVehName()
  2.     guiSetVisible(vehname, true)
  3. end
  4.  
  5. function HideVehName()
  6.     guiSetVisible(vehname, false)
  7. end
  8.  
  9. function SetVehicleName()
  10.     if not getPedOccupiedVehicle(localPlayer) then HideVehName() end
  11.     guiSetText(vehname, tostring(getVehicleName(getPedOccupiedVehicle(localPlayer))))
  12. end
  13.  
  14. addEventHandler("onClientResourceStart", resourceRoot, function()
  15.     vehname = guiCreateLabel(0.894, 0.94, 0.1, 0.1, "RZOL? RZOL? RZOL? RZOL? RZOL? RZOL? RZOL? RZOL? RZOL? RZOL? RZOL? RZOL? RZOL? ", true)
  16. end)
  17.  
  18. addEventHandler("onClientPlayerWasted", localPlayer, function()
  19.     if source == localPlayer and not getPedOccupiedVehicle(localPlayer) then HideVehName() end
  20. end)
  21.  
  22. addEventHandler("onClientVehicleEnter", root, function()
  23.     if source == localPlayer and getPedOccupiedVehicle(localPlayer) then ShowVehName() end
  24. end)
  25.  
  26. addEventHandler("onClientVehicleStartExit", root, function()
  27.     if source == localPlayer and getPedOccupiedVehicle(localPlayer) then HideVehName() end
  28. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement