Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.77 KB | None | 0 0
  1. pilot = createMarker(1958.7470703125,-2181.32421875,12.4, "cylinder", 1.5, 255, 0, 0, 255)
  2. entreg = createMarker(1477.431640625,1602.3212890625,9, "cylinder", 10, 255, 0, 0, 255)
  3.  
  4. bliptrab = createBlipAttachedTo ( pilot, 5 )
  5. blipentreg = createBlipAttachedTo ( entreg, 56 )
  6. setElementVisibleTo ( blipentreg, root, false )
  7. setElementVisibleTo ( entreg, root, false )
  8.  
  9. veh = {}
  10. function trab (source)
  11.     if isElementWithinMarker(source, pilot) then
  12.     if veh[source] and isElement(veh[source]) then destroyElement (veh[source])
  13.     veh[source]=nil
  14. end
  15.     x,y,z = getElementPosition(source)
  16.     Trabalho = true
  17.     outputChatBox("#000000| #FFFF00Leve o avião até o blip vermelho ! #000000|", source, 0,0,0,true)
  18.     veh[source] = createVehicle (519, 2016.59765625,-2493.9150390625,14.1, 0,0,91.207153320313)
  19.     setPedSkin (source, 61)
  20.     setElementVisibleTo ( blipentreg, source, true )
  21.     setElementVisibleTo ( entreg, source, true )
  22.     warpPedIntoVehicle ( source, veh[source] )
  23. end
  24. end
  25. addEventHandler( "onMarkerHit", pilot, trab )
  26.  
  27. function trabfim (source)
  28. if veh[source] and isElement(veh[source]) then
  29. destroyElement (veh[source])
  30. givePlayerMoney (source, 3500)
  31. setElementVisibleTo ( blipentreg, source, false )
  32. setElementVisibleTo ( entreg, source, false )
  33. outputChatBox ("#000000| #00FF00Trabalho concluido ! Você recebeu R$: 3500 #000000|", source, 0,0,0,true)
  34. else
  35. end
  36. end
  37. addEventHandler ("onMarkerHit", entreg, trabfim)
  38.  
  39. function quit (source)
  40. if (veh[source]) and isElement(veh[source]) then
  41. setElementVisibleTo ( blipentreg, source, false )
  42. setElementVisibleTo ( entreg, source, false )
  43. destroyElement (veh[source])
  44. outputChatBox ("#000000| #FF0000Você perdeu o trabalho ! #000000|", source,0,0,0,true)
  45. else
  46. end
  47. end
  48. addEventHandler ( "onVehicleExit", getRootElement(), quit )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement