Hello there.It’s been a couple of days since I’m messing with this stuffs,and it’s pretty annoyng.
I got couple of questions for you guys,will be gratefull if you can help.
So…
1a) How do I put this mobile (cgphone) in front of hud,so I can use phone without UI on my screen.
1b) How to connect cg phone to call center of police and medic.I made a GPS location thru SMS for police and medic,can’t figure where is calling system.
2)How to change police cars price to 0(free),because I tryed couple of times,when is setted to $1,it says You don’t have enough money to buy this car,even the price is 1 dollar.Would like if there is any script like taking cars from garage,like vehicle spawner car for policejob,and get it back…raither then buying.
3)How to add command for policejob to refill their ammo at armory?(now is option to buy it once + attachments.)There is no option for refill…
Thanks so much.
gimme your police job config.lua
config.lua (11.0 KB)
now your police car is for free
if you use extra items for weaponclip
you need just add this code in server > main.lua
RegisterCommand(‘polclip’, function(source, args, rawCommand)
TriggerClientEvent(‘esx_extraitems:clipcli’, source)
end)
then you can use command /polclip to add ammo to your weapon but it must be in your hand
if you don’t use esx_extraitems i’ll uplode one with this command for you
esx_extraitems.rar (25.3 KB)
1 Like
every time you will use this command it will give ur weapon 1000 ammo if you need change this for the command and the weaponclip item too you need to change this line
AddAmmoToPed(GetPlayerPed(-1), hash,1000)
hash,1000 = number of ammo u need
it locate at line 141 at esx_extraitems > client > main
1 Like
Thank you very much 
Can you figure me out the 1a and 1b?
sorry bro i forgot to make it work for only police job
thats the update of it
esx_extraitems.rar (25.3 KB)
1a) you must get in your mobile settings on game not in the script you will find Zoom option change it like you want
1 Like
I want 80 %for zoom,because on 60 % is small…I know about that,when I zoom >60% it is all over UI like on screen,but I saw it’s possible to put UI behind the phone (or phone in front of UI)but I don’t know how…will post the pitcure of that when I found it.
in the code where it opens the phone have it run
execute(‘toggleui’)
and the part where it closes the phone
have it run that same command
2 Likes
I’m kind a new to this,started a 2 weeks ago.Will be gratefull if you can tell me just a little bit.Where I can found it,how to do that,etc.Thanks.If you need something of documents I can give you.
So somewhere over there or?
I tryed it now and when I put yours config.lua there is no CP for garage to take the car out,actually police job don’t work with this.
Where you see TogglePhone() put below it
execute('toggleUI")
then when you press your phone key when the phone opens it hides the HUD then it closes the phone it shows the HUD
It gave me a error for “attempt to call a nil value (global “execute”)”
sorry it’s
ExecuteCommand(‘toggleUI’)
1 Like
It is deffo possible but don’t know how…
anyways I did what you said and got this
the code must be like that
ExecuteCommand(‘toggleUI’)
the same code but with different simpols
you should but it in line 83 like you done it and line 685 between cb() and end)
to be like that
hasPhone(function (hasPhone)
if hasPhone == true then
TooglePhone()
ExecuteCommand(‘toggleUI’)
else
RegisterNUICallback(‘closePhone’, function(data, cb)
menuIsOpen = false
SendNUIMessage({show = false})
PhonePlayOut()
cb()
ExecuteCommand(‘toggleUI’)
end)
1 Like
client.lua (21.0 KB)
There you go,if you can find out whats the problem,I will be so thankful,because it’s annoying have UI on screen
Don’t work,got for you too my client.lua,so you can check aswell and see what I made wrong 
ok so remove the executecommand from the registerNUIcallback … not needed there
rename toggleUI to toggleui
all lowercase