Guest User

Untitled

a guest
Sep 22nd, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.69 KB | None | 0 0
  1. addEventHandler("onPlayerVehicleExit", getRootElement(),
  2. function(veh,sea)
  3.     if (getElementModel(veh) == 420 or getElementModel(veh) == 428) then
  4.         if (sea == 1 or sea == 2 or sea == 3) then
  5.             local randomMoney = math.random( 50,200 )
  6.             if ( getPlayerMoney( source ) >= randomMoney ) then
  7.                 takePlayerMoney( source, randomMoney )
  8.                     triggerClientEvent(source,"showAttention",source,randomMoney)
  9.                         if (sea == 4) then
  10.                             givePlayerMoney(source, randomMoney)
  11.                                 triggerClientEvent(source,"showHisMoney",source,randomMoney)
  12.                         end
  13.             elseif ( sea == 4 ) then
  14.                     triggerClientEvent(source,"noMoney",source)
  15.             end
  16.         end
  17.     end
  18. end)
Add Comment
Please, Sign In to add comment