RyanUSNS

ServerSide Illegal Trucking

Oct 1st, 2016
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.27 KB | None | 0 0
  1. function startMission(wl)
  2.     local team = getTeamFromName("Criminal")
  3.     local curWl = exports.CITpoliceWanted:getPlayerWanted(client)
  4.     local zone = getElementData(client, "z")
  5.     if (zone == "SF" and curWl > 80) then
  6.         exports.CIThelp:dm("You can not do this mission at San Fierro. Go to Los Santos for doing this mission.", client, 150, 0, 0)
  7.         return false
  8.     end
  9.     if (curWl > 150) then
  10.         triggerClientEvent(client, "CITillegalTrucking.spawnMarkers", client)
  11.         return true
  12.     end
  13.     triggerClientEvent(client, "CITillegalTrucking.spawnMarkers", client)
  14.     exports.CITpoliceDatabase:recordCrime(client, wl)
  15. end
  16. addEvent("CITillegalTrucking.startMission", true)
  17. addEventHandler("CITillegalTrucking.startMission", root, startMission)
  18.  
  19. function illegalPayment(payment)
  20.     local reputation = math.floor(payment * 0.5)
  21.     local payment = math.floor(payment * 0.7)
  22.     exports.CITdrug:giveDrug(client, "random", 5)
  23.     exports.CITmoney:GPM(client, payment, "CITillegalTrucking payment", true)
  24.     exports.CIThelp:dm("You were paid $"..payment.." and "..reputation.." criminal reputations", client, 150, 0, 0)
  25.     exports.CITcrimExp:modifyPlayerCriminalRep(client, reputation)
  26. end
  27. addEvent("CITillegalTrucking.illegalPayment", true)
  28. addEventHandler("CITillegalTrucking.illegalPayment", root, illegalPayment)
Add Comment
Please, Sign In to add comment