Advertisement
Guest User

Untitled

a guest
May 4th, 2012
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.22 KB | None | 0 0
  1. carShopMarker = createMarker (-695.5, 961.29998779297, 12.300000190735, "cylinder", 3, 255, 0, 0, 127)
  2.  
  3. car1= createBlip ( -695.5, 961.29998779297, 12.300000190735, 55 )
  4.  
  5. addEvent ("viewGUI", true)
  6. function markerHit (hitPlayer, matchingDimension)
  7.   if (source == carShopMarker) then
  8.     triggerClientEvent ("viewGUI", hitPlayer)
  9.     outputChatBox("Um die Car hilfe aufzurufen /vehhelp", 255, 0, 0, hitplayer)
  10.   end
  11. end
  12. addEventHandler ("onMarkerHit", getRootElement(), markerHit)
  13.  
  14. addEvent ("carShopCarBuy", true)
  15. addEventHandler ("carShopCarBuy", getRootElement(),
  16. function(id, cost, name)
  17.   if (getPlayerMoney (source) >= tonumber(cost)) then
  18.     outputChatBox ("Geben an " .. name, source, 255, 0, 0, false)
  19.     outputChatBox ("ID: " .. id, source, 255, 0, 0, false)
  20.     outputChatBox ("Preis: " .. cost, source, 255, 0, 0, false)
  21.     takePlayerMoney (source, tonumber (cost))
  22.     setAccountData (getPlayerAccount (source), "funmodev2-car", tonumber(id))
  23.     setAccountData (getPlayerAccount (source), "funmodev2-paintjob", 3)
  24.     setAccountData (getPlayerAccount (source), "funmodev2-carupg", 0)
  25.   else
  26.     outputChatBox ("Zu wenig Geld!", source, 255, 0, 0, false)
  27.     addEventHandler ("onVehicleExplode", getRootElement(),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement