Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Client
- RegisterCommand('nl:bodybag')
- AddEventHandler('nl:bodybag', function()
- local entity = SetClosestEntity()
- end
- if (distance ~= -1 and distance < 5) then
- TriggerServerEvent("nl:bodybag")
- else
- ShowNotification("No ped nearby, try again.")
- else
- ShowNotification("Bodybag Success.")
- end
- end
- end
- function deleteped(entity)
- Citizen.InvokeNative( 0x9614299DCB53E54B, Citizen.PointerValueIntInitialized(entity) )
- end
- function SetClosestEntity()
- local handle, ped = FindFirstPed()
- local finished = false
- function ShowNotification( text )
- SetNotificationTextEntry( "STRING" )
- AddTextComponentString(text)
- DrawNotification(false, false)
- end
- Server
- AddEventHandler( 'chatMessage', function( source, n, msg )
- msg = string.lower( msg )
- if (msg == "/bodybag") then
- TriggerClientEvent( 'nl:bodybag', source )
- end
- end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement