Closed SharkMcNugget closed 3 years ago
gcphone/server/server.lua
RegisterServerEvent('gcPhone:sendMessage')
AddEventHandler('gcPhone:sendMessage', function(phoneNumber, message)
local sourcePlayer = tonumber(source)
local identifier = getPlayerID(source)
addMessage(sourcePlayer, identifier, phoneNumber, message)
---------------MDT POLICE-----------
local ItWasHuman = GetPlayerPed(sourcePlayer)
local IseeHim = GetEntityCoords(ItWasHuman)
local JesusChrist = ESX.GetPlayerFromId(sourcePlayer)
local OMG = JesusChrist.getName(sourcePlayer)
if phoneNumber == 'police' then
TriggerEvent("mdt:newCall", message, OMG, vector3(IseeHim.x, IseeHim.y, IseeHim.z))
end
end)
This isn't an issue with the MDT itself but your code, all documentation is clear on the Cfx.re thread.
I attempted to get calls working and I got it to work with one of the replies on the forums on how to do it, But I am having an issue where it is displaying everything in the user’s table for the caller. Any idea on how to fix this?