Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AddEventHandler("vRP:playerJoinGroup", function(user_id, group, gtype)
- if gtype == "job" then
- local source = vRP.getUserSource({user_id})
- if users[source] ~= nil then
- PhoneNumbers[users[source].job].sources[tostring(source)] = nil
- users[source] = nil
- end
- addToPhoneNumbers(group,source)
- users[source] = {userid = user_id, job = group}
- end
- end)
- RegisterServerEvent('service:startCall')
- AddEventHandler('service:startCall', function (number, message, coords)
- local source = source
- local user_id = vRP.getUserId({source})
- if number == "Politi-Job" or number == "EMS-Job" then
- vRP.getUserIdentity({user_id, function(identity)
- local discord = "https://discordapp.com/api/webhooks/612549618693308446/_4K-IbciILLATH6VGpa6ap5otJusC0IngLbJzRjBJouzK0BH72yAZ3zqZoZUBg195i40"
- if number == "EMS-Job" then
- discord = "https://discordapp.com/api/webhooks/612549812688125962/MjQxQn5pNUD9_G6TD_qSzkWBplVcQ5mz5t5l-R51sHOR1juWAmKHO253VE6av57KOypi"
- end
- webhookDiscord(identity.phone.." - "..identity.firstname.." "..identity.name,message,discord)
- end})
- end
- if PhoneNumbers[number] ~= nil then
- vRP.getUserIdentity({user_id, function(identity)
- local phone = identity.phone
- notifyAlertSMS(number, {
- message = message,
- coords = (number == "Politi-Job" or number == "EMS-Job" or number == "Mekaniker-Job" or number == "Taxi") == true and coords or nil,
- numero = phone,
- userid = user_id,
- }, PhoneNumbers[number].sources)
- end})
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement