Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 KB | None | 0 0
  1. -- ╔═════════════════════════╗
  2. -- ║ » Author: Tonic         ║
  3. -- ║ » Datum: 23.05.2017     ║
  4. -- ║ » Uhrzeit: 15:33 Uhr    ║
  5. -- ╚═════════════════════════╝
  6.  
  7. local Marker = {}
  8.  
  9. function Marker.new(...)
  10.     local o = setmetatable({}, { __index = Marker })
  11.  
  12.     if o.constructor then
  13.         o:constructor(...)
  14.     end
  15.  
  16.     return
  17. end
  18.  
  19. function Marker:constructor()
  20.     self.m_Marker = createMarker(-1816, -425, 15, "cylinder", 1, 125, 0, 0, 200)
  21.    
  22.     local function CallBackFunc(...) self:hit(...) end
  23.    
  24.     addEventHandler("onMarkerHit", self.m_Marker, CallBackFunc)
  25. end
  26.  
  27. function Marker:hit(elem, dim)
  28.     if dim then
  29.         if getElementType(elem) == "player" then
  30.             givePlayerMoney(elem, 1500)
  31.         end
  32.     end
  33. end
  34.  
  35. Marker.new()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement