Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RegisterNUICallback('callEvent', function(data, cb)
- local plyPos = GetEntityCoords(GetPlayerPed(-1), true)
- if data.eventName ~= 'cancel' then
- if data.data ~= nil then
- --TriggerServerEvent("call:makeCall", "police", {x=plyPos.x,y=plyPos.y,z=plyPos.z},ResultMotifAdd,GetPlayerServerId(player))
- TriggerServerEvent("call:makeCall", data.eventName, {x=plyPos.x,y=plyPos.y,z=plyPos.z}, data.data, GetPlayerServerId(player))
- if data.eventName == "police" then
- ShowNotificationMenuCivil2("~h~Vous avez appelé la ~b~POLICE")
- elseif data.eventName == "taxi" then
- ShowNotificationMenuCivil2("~h~Vous avez appelé un ~b~TAXI")
- elseif data.eventName == "depan" then
- ShowNotificationMenuCivil2("~h~Vous avez appelé un ~b~DEPANNEUR")
- elseif data.eventName == "CNN" then
- ShowNotificationMenuCivil2("~h~Vous avez appelé un ~b~JOURNALISTE")
- elseif data.eventName == "medic" then
- ShowNotificationMenuCivil2("~h~Vous avez appelé un ~b~AMBULANCIER")
- elseif data.eventName == "brinks" then
- ShowNotificationMenuCivil2("~h~Vous avez appelé un ~b~agent de la BRINKS")
- end
- else
- local limit = data.limit or 255
- local text = data.text or ''
- if data.eventName ~= "RESPAWN" then
- DisplayOnscreenKeyboard(1, "FMMC_MPM_NA", "", text, "", "", "", limit)
- while (UpdateOnscreenKeyboard() == 0) do
- DisableAllControlActions(0);
- Wait(0);
- end
- if (GetOnscreenKeyboardResult()) then
- text = GetOnscreenKeyboardResult()
- end
- TriggerServerEvent("call:makeCall", data.eventName, {x=plyPos.x,y=plyPos.y,z=plyPos.z}, text, GetPlayerServerId(player))
- if data.eventName == "police" then
- ShowNotificationMenuCivil2("~h~Vous avez appelé la ~b~POLICE")
- elseif data.eventName == "taxi" then
- ShowNotificationMenuCivil2("~h~Vous avez appelé un ~b~TAXI")
- elseif data.eventName == "depan" then
- ShowNotificationMenuCivil2("~h~Vous avez appelé un ~b~DEPANNEUR")
- elseif data.eventName == "CNN" then
- ShowNotificationMenuCivil2("~h~Vous avez appelé un ~b~JOURNALISTE")
- elseif data.eventName == "medic" then
- ShowNotificationMenuCivil2("~h~Vous avez appelé un ~b~AMBULANCIER")
- elseif data.eventName == "brinks" then
- ShowNotificationMenuCivil2("~h~Vous avez appelé un ~b~agent de la BRINKS")
- end
- else
- TriggerEvent('es_em:cl_respawn')
- end
- end
- cb()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement