Advertisement
Foxmice

Untitled

Aug 22nd, 2019
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.28 KB | None | 0 0
  1. RegisterServerEvent('service:startCall')
  2. AddEventHandler('service:startCall', function (number, message, coords)
  3.     local source = source
  4.     local user_id = vRP.getUserId({source})
  5.     if number == "Politi-Job" or number == "EMS-Job" then
  6.         vRP.getUserIdentity({user_id, function(identity)
  7.             local discord = "https://discordapp.com/api/webhooks/539934609995988992/EIuqjZEk4yZZKyNLiF7HZNDPtFd5o0aMbsoMrco5JCVvW3rF8Mb4vDZMYFEDiiNvnr_M"
  8.             if number == "EMS-Job" then
  9.                 discord = "https://discordapp.com/api/webhooks/539934662387302415/WkoqvnUXmiplhK8eDwFhWjNHqY4sT_Yxgnu4YGILCUkEsBc_JwgF-_V-V437FKqQ3mWx"
  10.             end
  11.             webhookDiscord(identity.phone.." - "..identity.firstname.." "..identity.name,message,discord)
  12.         end})
  13.     end
  14.     if PhoneNumbers[number] ~= nil then
  15.         vRP.getUserIdentity({user_id, function(identity)
  16.             local phone = identity.phone
  17.             notifyAlertSMS(number, {
  18.                 message = message,
  19.                 coords = (number == "Politi-Job" or number == "EMS-Job" or number == "Mekaniker-Job" or number == "Taxi") == true and coords or nil,
  20.                 numero = phone,
  21.                 userid = user_id,
  22.             }, PhoneNumbers[number].sources)
  23.         end})
  24.     end
  25. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement