Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ========================CFG/HOSTKEYS.LUA==========================
- [289] = {
- -- F2 - Police Send QTH
- group = 1,
- pressed = function()
- if not IsPauseMenuActive() and (GetEntityHealth(GetPlayerPed(-1)) > 105) and not vRP.isHandcuffed({}) then -- Comment to allow use in vehicle
- local x,y,z = table.unpack(GetEntityCoords(GetPlayerPed(-1),true))
- HKserver.sendQTHPolice({x,y,z})
- Citizen.Wait(1000)
- end -- Comment to allow use in vehicle
- end,
- released = function()
- -- Do nothing on release because it's toggle.
- end,
- },
- =====================SERVER.LUA======================================
- function vRPhk.sendQTHPolice(x,y,z)
- local user_id = vRP.getUserId({source})
- if user_id and vRP.hasPermission({user_id,"police.base"}) then
- vRP.getUserIdentity({user_id, function(identity)
- vRP.sendServiceAlert({source,"Policia",x,y,z,"QTH " .. identity.user_id .. " " .. identity.user_id}) -- people will change this message anyway haha
- end})
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment