-- Trigger a call of Uber with F9
if IsControlJustPressed(1, 56) then
local plyPos = GetEntityCoords(GetPlayerPed(-1), true)
TriggerServerEvent("call:makeCall", "uber", {x=plyPos.x,y=plyPos.y,z=plyPos.z})
end
Change uber with the job you want (you also need to configure it in server.lua at the beginning of the file)
You can also create a menu and set up on a button the TriggerServerEvent ^^
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
if IsControlJustPressed(1, 38) then
if not working then
TriggerServerEvent("player:serviceOn", "taxi")
else
TriggerServerEvent("player:serviceOff", "taxi")
end
working = not working
end
-- Trigger a call of Uber with F9
if IsControlJustPressed(1, 56) then
local plyPos = GetEntityCoords(GetPlayerPed(-1), true)
TriggerServerEvent("call:makeCall", "taxi", {x=plyPos.x,y=plyPos.y,z=plyPos.z})
end
end
Hello,
is it possible to give us/upload an example of the server.lua and the call.lua with all the fields modified for a job like “taxi” for example? we tried to change a lot of things and nothing seems to work properly , anyway thanks for sharing!
Hello VodK.
Even with the template you give, it’s hard to understand for a beginner in LUA. Spent a couple of hours trying to get this work
Could you please make us a better explanation on how to add a script call with your release ?
(Maybe Make a taxi call for example, where the job name is taxi ? )
Think that everybody, me first, would be thankfull for this.
Hi VDK thank you for the work provided while i watched your release for 2 days and i still can not get it to work when i press F9 actually a call is running though i can not manage to add a player ‘’ In Service ‘’ Eventually if a french is in the corner to replicate me I’m at your disposal Thank you
I don’t know how I can be more explicit than the template.lua file… If you create a taxi job : you call TriggerServerEvent("player:serviceOn", "taxi") when he takes is service and TriggerServerEvent("player:serviceOff", "taxi") when he stop it… And for civil you call :
local plyPos = GetEntityCoords(GetPlayerPed(-1), true)
TriggerServerEvent("call:makeCall", "taxi", {x=plyPos.x,y=plyPos.y,z=plyPos.z})
when you want to call a taxi in service… Now you have integrate my script in yours that’s why I said FOR DEVELOPERS in description…