Advertisement

Call A NPC Taxi | ESX AI Taxi with Gcphone Compatability

 Description

In RP the Taxi job is very hard and fewer chance to people hold that job on your server. Everyone owns cars so no one needs a taxi for their traveling, but we can't remove taxis from our server. Taxies are great help for new players but no one needs the taxi job for them.

Features

  • Call Taxi from GCPhone
  • Ped will spawn at DowntownCab in LS
  • Taxi will spawn at DowntownCab in LS
  • Configure the speed on config.lua
  • Can Track the taxi on Minimap
  • Taxi will automatically despawn after reaching the destination
  • You cannot call a taxi twice. never gets duplicate taxies

Before Installation

  • TO GET IT TO WORK WITH YOUR GCPHONE YOU HAVE TO EDIT:
    • esx_addons_gcphone
      • server.lua
Find:
RegisterServerEvent('esx_addons_gcphone:startCall') AddEventHandler('esx_addons_gcphone:startCall', function (number, message, coords) local source = source if PhoneNumbers[number] ~= nil then getPhoneNumber(source, function (phone) notifyAlertSMS(number, { message = message, coords = coords, numero = phone, }, PhoneNumbers[number].sources) end) else print('Appels sur un service non enregistre => numero : ' .. number) endend)

and replace it with: 

RegisterServerEvent('esx_addons_gcphone:startCall') AddEventHandler('esx_addons_gcphone:startCall', function (number, message, coords) local source = source if PhoneNumbers[number] ~= nil then if number == 'taxi' then if message == 'cancel' then TriggerClientEvent('esx_aiTaxi:cancelTaxi', source, true) else TriggerClientEvent('esx_aiTaxi:callTaxi', source, coords) end else getPhoneNumber(source, function (phone) notifyAlertSMS(number, { message = message, coords = coords, numero = phone, }, PhoneNumbers[number].sources) end) end else print('Appels sur un service non enregistre => numero : ' .. number) endend)
Add this to the config.json of gcphone

these are the last lines in area of “serviceCall” 

}, { "display": "Taxi", "backgroundColor": "yellow", "subMenu": [ { "title": "Taxi bestellen", "eventName": "esx_addons_gcphone:call", "type": { "number": "taxi", "message": "i need a ride" } }, { "title": "Taxi abbestellen", "eventName": "esx_addons_gcphone:call", "type": { "number": "taxi", "message": "cancel" } } ] } ], "defaultContacts": [{

Download 

Installation

  • Extract the zip file
  • copy the folder into resources folder
  • Add " start esx_aiTaxi " on server.cfg
  • restart your server
If you face any error fell free to ask me on comments

Post a Comment

0 Comments