Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //server
- AddEventHandler( 'chatMessage', function( source, n, msg )
- msg = string.lower( msg )
- if ( msg == "/sjebibrnace" or msg == "/brnace" ) then
- CancelEvent()
- TriggerClientEvent( 'brisiBrnace', source )
- end
- end )
- //client
- RegisterNetEvent( 'brisiBrnace' )
- AddEventHandler( 'brisiBrnace', function()
- local ped = GetPlayerPed( -1 )
- if ( DoesEntityExist( ped ) and not IsEntityDead( ped ) ) then
- local coords = GetEntityCoords( ped )
- local vehicle = GetClosestVehicle(coords.x, coords.y, coords.z, 3.0, 0, 71)
- if (DoesEntityExist( vehicle ) && GetEntityModel( vehicle ) == 390902130) then
- ESX.Game.DeleteVehicle(vehicle)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement