Guest User

Test :D

a guest
May 12th, 2012
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. local test = false
  2.  
  3. function wow(player)
  4. if isPedInVehicle(player) then
  5. if test == false then
  6. local veh = getPedOccupiedVehicle(player)
  7. setElementAlpha(veh, 0)
  8. test = true
  9. elseif test == true then
  10. local veh = getPedOccupiedVehicle(player)
  11. setElementAlpha(veh, 255)
  12. test = false
  13. else
  14. outputDebugString('Es ist ein Fehler aufgetreten')
  15. end
  16. end
  17. end
  18.  
  19. addCommandHandler('unsichtbar' , wow)
  20.  
  21. -- Test
  22. local gMe = getLocalPlayer()
  23.  
  24. function trololo()
  25. for id, player in ipairs(getElementsByType("vehicle")) do
  26. if player ~= gMe then
  27. setElementAlpha(player, 0)
  28. else
  29. setElementAlpha(player, 255)
  30. end
  31. end
  32. end
  33.  
  34. bindKey('F1', 'down', trololo)
Advertisement
Add Comment
Please, Sign In to add comment