Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. function CITStunt( stuntType, stuntTime, distance )
  2.     if getPlayerTeam(source, getTeamFromName("Staff")) then
  3.         return false
  4.     end
  5.     local vehicle = getPedOccupiedVehicle(source)
  6.     local speed = ( function( x, y, z ) return math.floor( math.sqrt( x*x + y*y + z*z ) * 155 ) end )( getElementVelocity( vehicle ) )
  7.  
  8.     if (distance < 1) then
  9.         return false
  10.     end
  11.  
  12.     money = 100*tonumber(stuntTime)+tonumber(distance)
  13.     givePlayerMoney(tonumber(money))
  14.     outputChatBox("Earned "..tonumber(money).." because of doing a stunt!", 0, 200, 0)
  15. end
  16. addEventHandler( "onClientPlayerStuntFinish", getRootElement( ), CITStunt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement