Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addEventHandler( 'onClientVehicleEnter', root,
- function( pPlayer )
- if pPlayer == localPlayer then
- addVehicleUpgrade( source, 1010 )
- outputChatBox( 'Nitro installed' )
- end
- end
- )
- addCommandHandler( 'nitro_count',
- function( _, sCount )
- local pVehicle = getPedOccupiedVehicle( localPlayer )
- if pVehicle then
- setVehicleNitroCount( pVehicle, tostring( sCount ) )
- end
- end
- )
- addCommandHandler( 'nitro_level',
- function( _, sCount )
- local pVehicle = getPedOccupiedVehicle( localPlayer )
- if pVehicle then
- setVehicleNitroLevel( pVehicle, tostring( sCount ) )
- end
- end
- )
- addCommandHandler( 'nitro_activated',
- function( _, sValue )
- local pVehicle = getPedOccupiedVehicle( localPlayer )
- if pVehicle then
- setVehicleNitroActivated( pVehicle, sValue == 'true' and true or false )
- end
- end
- )
- addEventHandler( 'onClientRender', root,
- function()
- if isPedInVehicle( localPlayer ) then
- local pVehicle = getPedOccupiedVehicle( localPlayer )
- if pVehicle then
- local fNitroLevel = getVehicleNitroLevel( pVehicle )
- local iNitroCount = getVehicleNitroCount( pVehicle )
- local bIsNitroRecharging = isVehicleNitroRecharging( pVehicle )
- local bIsNitroActivated = isVehicleNitroActivated( pVehicle )
- dxDrawText( 'Nitro level = ' .. tostring( fNitroLevel ), 700, 100 )
- dxDrawText( 'Nitro count = ' .. tostring( iNitroCount ), 700, 150 )
- dxDrawText( 'Nitro recharging = ' .. tostring( bIsNitroRecharging ), 700, 200 )
- dxDrawText( 'Nitro ativated = ' .. tostring( bIsNitroActivated ), 700, 250 )
- end
- end
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement