Anyone know how to implement this on Alphone(esx_phone3)
Not working in FiveM Linux artifact. Seem to have a problem with your drive() fucntion. BTW great idea
im working on it.
never worked with esx_phone3 so give me some minutes
FOR ESX_PHONE3
to get it work with esx_phone3 you have to edit this:
client/main.lua
find:
RegisterNUICallback('send', function(data)
local phoneNumber = data.number
local playerPed = GetPlayerPed(-1)
local coords = GetEntityCoords(playerPed)
if tonumber(phoneNumber) ~= nil then
phoneNumber = tonumber(phoneNumber)
end
TriggerServerEvent('esx_phone:send', phoneNumber, data.message, data.anon, {
x = coords.x,
y = coords.y,
z = coords.z
})
ESX.ShowNotification('Mensagem Enviada')
end)
and replace with:
RegisterNUICallback('send', function(data)
local phoneNumber = data.number
local playerPed = GetPlayerPed(-1)
local coords = GetEntityCoords(playerPed)
if data.number == 'taxi' then
TriggerEvent('esx_aiTaxi:callTaxi', coords)
else
if tonumber(phoneNumber) ~= nil then
phoneNumber = tonumber(phoneNumber)
end
TriggerServerEvent('esx_phone:send', phoneNumber, data.message, data.anon, {
x = coords.x,
y = coords.y,
z = coords.z
})
end
ESX.ShowNotification('Mensagem Enviada')
end)
But this wont show the icon on the phone? It will just trigger the event?
i installed the default esx_phone3 so there was already a taxi icon in the menu.
i downloaded this:
Tried the script, Taxi seems to be stuck?
Called it 5 min ago, and it has been at the same locaton not moving towards me at all. Any suggestions?
Update, Taxi starts moving when driving against him. Im at the police station btw when calling.
Also ofcourse im not using a taxi job script, this is meant to replace that
UPDATE:
Found the issue, move the ped spawn + heading and the taxi spawn+heading. That solved the taxi beeing stuck for me!
uhm nice script
you should put a link to the dependencies in the first post… to make a sexier post, ya know…
i thought it is clear if i write down that you have to edit gcphone ^^
especially because i write down :
With gcphone you can call a NPC-Taxi
it is clear… now where is the conveniant url so we can be lazy…
i broke my phone editing what you said… and the search is being a bitch this morning…
never been about being clear or not
you broke your phone?
what happened?
i didnt not came here to cry to my mommy either, i edited something wrong… when i hit F1, it was back to all white, no jpg/png phone frame, my Network name was back to Gannon, etc… so i screwed my config… its my fault…
i truely never found with google “fivem gcphone…” and this forum search, i was not finding the addon page… so i went back to my yesterday backup and i’ll re-edit from this working version… something is sensitive…
also, made too much changes without testing (i can only run the test at night… but i dont stop ccoding in the days… but i code blind till i get back home… then… the debugging can be hardcore this way)
I did everything but it won’t get me a taxi nothing happends no error nothing. (GCPhone)
Config (GCPHONE)
{
"display": "Uber",
"icon": "/html/static/img/icons_app/taxi.png",
"subMenu": [
{
"title": "Bellen",
"eventName": "esx_addons_gcphone:startCall",
"type": {
"number": "taxi"
}
}
]
}
Awesome mod! works great after some tweaks. I do have a few issues.
-
if you are too far away from where the taxi spawns, it doesn’t seem to move.
Could you make it so it spawns a few blocks away from the player instead at a set point?
If not that, maybe have multiple spawn locations, and have it find the closest one to the player -
Can there be a set fee to initiate the call as well? not just per km
Is there anyway to let it check where near location to spawn? we need create more spawn taxi location and check player loction to get nearest to spawn
And i got error when the taxi arrive near my character. i cant get in the taxi. i use esx
UPDATE 14.05.2019
- there are multiple spawnpoints of the vehicle
- it will looking for the best spawn (the nearest)
- first option in GCPHONE is to call the taxi
(you can not call a taxi twice) - second option is to cancel the order
and i removed the instruction for other phones like esx_phone3/AL_phone
i will just support GCPHONE.
(its too much work to edit it for each phone)
with this setup you have to type in a message…
did you?
there will be no taxi if the message is blank (by hitting ESC or entern if you didnt type in something)