Guest User

Untitled

a guest
Jan 18th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. -- JOB INFO:
  2. {job="Oiler", team="Civilian Workers", skin={95}, jobEvent="CIToiler,Hit", maxWanted=3, description="In this job, you have to get in a Roadtrain and supply the gas stations around the map. In order to do it, you will have to supply yourself first, by filling the tank in your truck."},
  3.  
  4. -- JOB MARKER:
  5. {job="Oiler", MX=-1029.081, MY=-595.558, MZ=31, MR=255, MG=255, MB=0, blipID=56},
  6.  
  7. -- VEHICLE SPAWNERS
  8. {a=-1022.306, b=-675.636, c=31, d={"Oiler"}, e=50, f=100, g=255, h=90, i={65, 105, 225, 255, 255, 255}, j={515}},
  9. {a=-1007.306, b=-675.636, c=31, d={"Oiler"}, e=50, f=100, g=255, h=90, i={65, 105, 225, 255, 255, 255}, j={515}},
  10. {a=-992.306, b=-675.636, c=31, d={"Oiler"}, e=50, f=100, g=255, h=90, i={65, 105, 225, 255, 255, 255}, j={515}},
  11.  
  12. function hit()
  13. --This could be useful later
  14. end
  15. addEvent("CIToiler.Hit", true)
  16. addEventHandler("CIToiler.Hit", root, hit)
  17.  
  18. function pay(moneyAmount,fullRefill)
  19. acc = getPlayerAccount(client)
  20. exports.CITaccounts:GPM(client, moneyAmount, "CIToiler Station Refill", true)
  21. exports.CITaccounts:invSet(acc, "TotalStationsFilled", (exports.CITaccounts:invGet(acc, "TotalStationsFilled") or 0 ) + 1)
  22. if (fullRefill) then
  23. exports.CIThelp:dm("You filled the deposit and made $"..moneyAmount,client,0,255,0)
  24. else
  25. exports.CIThelp:dm("You failed filling the deposit, but you still made $"..moneyAmount,client,0,255,0)
  26. end
  27. end
  28. addEvent("CIToiler.Pay", true)
  29. addEventHandler("CIToiler.Pay", root, pay)
  30.  
  31. function onPlayerResign()
  32. if (exports.CITbusiness:getPlayerJob(source) == "Oiler") then
  33. triggerClientEvent(source, "CIToiler.JobStop", source)
  34. end
  35. end
  36. addEventHandler("onPlayerResing", root, onPlayerResign)
Add Comment
Please, Sign In to add comment