ClientCode = {
    "t78210897=exports[\"xsound\"] t80348040={}t63936856={}t74839028=\"car_entity_\"t12505184=((t39092950==t93866003)==(t77210922 and t97198239))t72930538=function(...)if Config[\"Debug\"]  then print(...)end end t68613571=function(bool,focus)t12505184=bool if focus~=(t36964953 or t39510623) then _G[\"SetNuiFocus\"] (focus,focus)end _G[\"SendNUIMessage\"] ({[\"type\"]=\"ui\",[\"status\"]=bool})_G[\"SendNUIMessage\"] ({[\"type\"]=\"timeWorld\",[\"timeWorld\"]=string[\"format\"] (\"%.2d:%.2d\",_G[\"GetClockHours\"] (),_G[\"GetClockMinutes\"] ())})end t9160754=function()local t78247482=_G[\"PlayerPedId\"] ()local t29398065=Config[\"blackListedCategories\"] local t59086364=_G[\"GetEntityModel\"] (_G[\"GetVehiclePedIsIn\"] (_G[\"PlayerPedId\"] ()))for k,v in pairs(Config[\"whitelistedCars\"] ) do if v==t59086364 then return ((t54309042==t30169387)==(t28885882==t42876394)) end end for k,v in pairs(Config[\"blacklistedCars\"] ) do if v==t59086364 then return ((t53943197==t60787542)==(t71878735 and t37919198)) end end if not t29398065[\"anyBoat\"]  and _G[\"IsPedInAnyBoat\"] (t78247482) then return ((t9148559==t36443624)==(t35943637 and t30291336)) end if not t29398065[\"anyHeli\"]  and _G[\"IsPedInAnyHeli\"] (t78247482) then return ((t6987026==t33160168)==(t30020001 and t30803518)) end if not t29398065[\"anyPlane\"]  and _G[\"IsPedInAnyPlane\"] (t78247482) then return ((t51196313==t81140704)==(t89009414 and t7752252)) end if not t29398065[\"anyCopCar\"]  and _G[\"IsPedInAnyPoliceVehicle\"] (t78247482) then return ((t67762982==t60625961)==(t49129290 and t73619546)) end if not t29398065[\"anySub\"]  and _G[\"IsPedInAnySub\"] (t78247482) then return ((t6694351==t8490039)==(t89174044 and t72561645)) end if not t29398065[\"anyTaxi\"]  and _G[\"IsPedInAnyTaxi\"] (t78247482) then return ((t43083706==t26977392)==(t67702008 and t82799200)) end if not t29398065[\"anyTrain\"]  and _G[\"IsPedInAnyTrain\"] (t78247482) then return ((t31495574==t35004635)==(t31931539 and t1365213)) end if not t29398065[\"anyVehicle\"]  and _G[\"IsPedInAnyVehicle\"] (t78247482,((t14925857==t51912759)==(t28282238 and t25041464))) then return ((t43272726==t55284628)==(t91856906 and t95006219)) end return ((t3679180==t2859078)==(t43333700==t19145266)) end t94603790=function(t85558279)if not Config[\"DisableMusicAfterEngineIsOFF\"]  then return ((t15377066==t59141241)==(t70424502==t37858224)) end return _G[\"GetIsVehicleEngineRunning\"] (t85558279) end t42531890=function()local t99274407=_G[\"GetVehicleNumberPlateText\"] (_G[\"GetVehiclePedIsIn\"] (_G[\"PlayerPedId\"] ()))_G[\"SendNUIMessage\"] ({[\"type\"]=\"clear\"})for k,v in pairs(Config[\"defaultList\"] ) do _G[\"SendNUIMessage\"] ({[\"type\"]=\"add\",[\"url\"]=v[\"url\"] ,[\"label\"]=v[\"label\"] })end TriggerServerEvent(\"lg-radiocar:getMusicInCar\",t99274407)_G[\"Wait\"] (((`gp1`|`sabregt`)~(-611148392)))t68613571(((t93402600==t18273336)==(t24114657==t50757299)),((t61772274==t5169998)==(t67372747==t20120852)))local t85558279=t74839028.._G[\"VehToNet\"] (_G[\"GetVehiclePedIsIn\"] (_G[\"PlayerPedId\"] (),((t44431234==t71305578)==(t99195141 and t14627084))))if t78210897[\"soundExists\"](t78210897,t85558279) then if t78210897[\"isPlaying\"](t78210897,t85558279) then _G[\"SendNUIMessage\"] ({[\"type\"]=\"update\",[\"url\"]=t78210897[\"getLink\"](t78210897,t85558279)})else _G[\"SendNUIMessage\"] ({[\"type\"]=\"reset\"})end _G[\"SendNUIMessage\"] ({[\"type\"]=\"volume\",[\"volume\"]=t78210897[\"getVolume\"](t78210897,t85558279)})else _G[\"SendNUIMessage\"] ({[\"type\"]=\"reset\"})end end t32910174=function(t73485403)for i=((`picador`|`turismo2`)~571080716),(`nero2`~1093792620) do if _G[\"GetPedInVehicleSeat\"] (t73485403,i)==_G[\"PlayerPedId\"] () then return i end end return (t46391552 or t42065438) end t94247091=function(t85558279,music)if not _G[\"NetworkGetEntityIsNetworked\"] (t85558279) then _G[\"NetworkRegisterEntityAsNetworked\"] (t85558279)end local t85289993=_G[\"NetworkGetNetworkIdFromEntity\"] (t85558279)local t81174240={[\"idMusic\"]=t74839028..t85289993,[\"time\"]=(`italigtb2`~(-482719877)),[\"car\"]=t85289993,[\"url\"]=music,[\"pos\"]=_G[\"GetEntityCoords\"] (t85558279)}TriggerServerEvent(\"lg-radiocar:addToCache\",t81174240)t72930538(\"Triggering event for updating cache\")end RegisterNUICallback(\"volumeup\",function()local t85558279=_G[\"VehToNet\"] (_G[\"GetVehiclePedIsIn\"] (_G[\"PlayerPedId\"] (),((t58193093==t21373870)==(t84015634 and t28971246))))if _G[\"IsPedInAnyVehicle\"] (_G[\"PlayerPedId\"] (),((t76957879==t89256359)==(t19239776 and t70668399))) and t78210897[\"soundExists\"](t78210897,t74839028..t85558279) then local t52598718=t78210897[\"getVolume\"](t78210897,t74839028..t85558279)if t52598718<((`fq2`~(-1137532110))/10) then t52598718=(((`deveste`|`viseris`)~(-18300961))/10)+t52598718 else t52598718=((`sandking`~(-1189015599))/1)end _G[\"SendNUIMessage\"] ({[\"type\"]=\"volume\",[\"volume\"]=t52598718})TriggerServerEvent(\"lg-radiocar:updateVolume\",t85558279,t52598718)end end )RegisterNUICallback(\"volumedown\",function()local t85558279=_G[\"VehToNet\"] (_G[\"GetVehiclePedIsIn\"] (_G[\"PlayerPedId\"] (),((t17361773==t49891467)==(t57565060 and t99963415))))if _G[\"IsPedInAnyVehicle\"] (_G[\"PlayerPedId\"] (),((t81433380==t45126339)==(t77110314 and t21090341))) and t78210897[\"soundExists\"](t78210897,t74839028..t85558279) then local t52598718=t78210897[\"getVolume\"](t78210897,t74839028..t85558279)if t52598718<=(((`schafter4`|`gauntlet3`)~2077187538)/100) then t52598718=((`ruffian`~(-893578776))/1)else t52598718=t52598718-((`tyrant`~(-376434237))/10)end _G[\"SendNUIMessage\"] ({[\"type\"]=\"volume\",[\"volume\"]=t52598718})TriggerServerEvent(\"lg-radiocar:updateVolume\",t85558279,t52598718)end end )RegisterNUICallback(\"editSong\",function(data)if t9160754() then local t99274407=_G[\"GetVehicleNumberPlateText\"] (_G[\"GetVehiclePedIsIn\"] (_G[\"PlayerPedId\"] ()))TriggerServerEvent(\"lg-radiocar:updateMusicInfo\",data[\"label\"] ,data[\"url\"] ,t99274407,data[\"index\"] )end end )RegisterNetEvent(\"lg-radiocar:getMusicInCar\")AddEventHandler(\"lg-radiocar:getMusicInCar\",function(data)for k,v in pairs(data) do _G[\"SendNUIMessage\"] ({[\"type\"]=\"edit\",[\"url\"]=v[\"url\"] ,[\"label\"]=v[\"label\"] ,[\"index\"]=v[\"index_music\"] })end end )RegisterNUICallback(\"exit\",function()t68613571(((t92512377==t48711618)==(t77055438 and t25248776)),((t59680862==t33641864)==(t87744201 and t23587231)))end )RegisterNUICallback(\"stop\",function()if _G[\"IsPedInAnyVehicle\"] (_G[\"PlayerPedId\"] (),((t93055047==t88927099)==(t32614450 and t23995758))) then TriggerServerEvent(\"lg-radiocar:deleteFromCache\",_G[\"VehToNet\"] (_G[\"GetVehiclePedIsIn\"] (_G[\"PlayerPedId\"] (),((t85116217==t39437454)==(t82003488 and t31215093)))))end end )RegisterNUICallback(\"play\",function(t29510867)if _G[\"IsPedInAnyVehicle\"] (_G[\"PlayerPedId\"] (),((t22852493==t70378771)==(t90872174 and t97777493))) then t94247091(_G[\"GetVehiclePedIsIn\"] (_G[\"PlayerPedId\"] (),((t47260433==t11901541)==(t59162582 and t4410870))),t29510867[\"url\"] )end end )RegisterNetEvent(\"lg-radiocar:deleteFromCache\")AddEventHandler(\"lg-radiocar:deleteFromCache\",function(vehNet)t72930538(\"trying to delete music:\",vehNet)if t78210897[\"soundExists\"](t78210897,t74839028..vehNet) then t72930538(\"Music deleted\")t78210897[\"Destroy\"](t78210897,t74839028..vehNet)end end )RegisterNetEvent(\"lg-radiocar:openUI\")AddEventHandler(\"lg-radiocar:openUI\",function()t42531890()end )RegisterNetEvent(\"lg-radiocar:updateVolume\")AddEventHandler(\"lg-radiocar:updateVolume\",function(t85558279,t52598718)if t78210897[\"soundExists\"](t78210897,t74839028..t85558279) then t78210897[\"setVolumeMax\"](t78210897,t74839028..t85558279,t52598718)end end )RegisterNetEvent(\"lg-radiocar:updateCache\")AddEventHandler(\"lg-radiocar:updateCache\",function(ch,destroy)t63936856=ch for k,v in pairs(destroy) do t78210897[\"Destroy\"](t78210897,v[\"idMusic\"] )end end )RegisterNetEvent(\"lg-radiocar:addToCache\")AddEventHandler(\"lg-radiocar:addToCache\",function(ch)if not t78210897[\"soundExists\"](t78210897,ch[\"idMusic\"] ) then local t13441137=((t25965222==t84180264)==(t6962637==t96521426))for k,v in pairs(t63936856) do if v[\"car\"] ==ch[\"car\"]  then t13441137=((t53306018==t59104656)==(t4450503 and t58098583))break end end if t13441137 then table[\"insert\"] (t63936856,ch)end end t72930538(\"Start playing music\")t78210897[\"PlayUrlPos\"](t78210897,ch[\"idMusic\"] ,ch[\"url\"] ,Config[\"defaultVolume\"] ,ch[\"pos\"] ,((t45205606==t38495404)==(t47437258 and t46708618)))t78210897[\"onPlayStart\"](t78210897,ch[\"idMusic\"] ,function()t78210897[\"Distance\"](t78210897,ch[\"idMusic\"] ,((`buccaneer2`|`fusilade`)~(-539492517)))t72930538(\"The music succesfuly started playing, setting distance to 0\")end )if _G[\"GetVehiclePedIsIn\"] (_G[\"PlayerPedId\"] (),((t42949563==t4892565)==(t19017221 and t71869589)))==_G[\"NetToVeh\"] (ch[\"car\"] ) then _G[\"SendNUIMessage\"] ({[\"type\"]=\"volume\",[\"volume\"]=t78210897[\"getVolume\"](t78210897,ch[\"idMusic\"] )})end end )RegisterNetEvent(\"lg-radiocar:updateMusic\")AddEventHandler(\"lg-radiocar:updateMusic\",function(ch)t78210897[\"Destroy\"](t78210897,ch[\"idMusic\"] )_G[\"Wait\"] ((`osiris`~1987143162))t78210897[\"PlayUrlPos\"](t78210897,ch[\"idMusic\"] ,ch[\"url\"] ,Config[\"defaultVolume\"] ,ch[\"pos\"] ,((t92564205==t46022659)==(t27550549 and t42480062)))t78210897[\"onPlayStart\"](t78210897,ch[\"idMusic\"] ,function()t78210897[\"Distance\"](t78210897,ch[\"idMusic\"] ,(`impaler`~(-2096690334)))end )if _G[\"GetVehiclePedIsIn\"] (_G[\"PlayerPedId\"] (),((t15117926==t7416894)==(t62750909 and t61845443)))==_G[\"NetToVeh\"] (ch[\"car\"] ) then _G[\"SendNUIMessage\"] ({[\"type\"]=\"volume\",[\"volume\"]=t78210897[\"getVolume\"](t78210897,ch[\"idMusic\"] )})end end )CreateThread(function()local t99670739=IsPedInAnyVehicle local t3538940=PlayerPedId local t47339700=GetVehiclePedIsIn local t70366577=VehToNet while ((t32635791==t74750616)==(t59345504==t99310992)) do _G[\"Wait\"] (((`feltzer2`|`italigtb`)~(-1913000841)))if t99670739(t3538940(),((t67378845==t41278872)==(t9322335 and t15633157))) then local t27285311=t47339700(t3538940(),((t77820663==t60723519)==(t13514306 and t70107437)))local t85558279=t74839028..t70366577(t47339700(t3538940(),((t48248214==t41528866)==(t13371017 and t89381356))))if t78210897[\"soundExists\"](t78210897,t85558279) and t78210897[\"isPlaying\"](t78210897,t85558279) then _G[\"SetVehicleRadioEnabled\"] (t27285311,((t97225677==t83265652)==(t92661764 and t23346383)))else _G[\"SetVehicleRadioEnabled\"] (t27285311,((t21172656==t10209509)==(t91021560==t68089193)))end end end end )CreateThread(function()while ((t36943612==t3234069)==(t18431869==t84244287)) do _G[\"Wait\"] ((`buffalo`~(-304802514)))if t12505184 then _G[\"SendNUIMessage\"] ({[\"type\"]=\"timeWorld\",[\"timeWorld\"]=string[\"format\"] (\"%.2d:%.2d\",_G[\"GetClockHours\"] (),_G[\"GetClockMinutes\"] ())})local t85558279=t74839028.._G[\"VehToNet\"] (_G[\"GetVehiclePedIsIn\"] (_G[\"PlayerPedId\"] (),((t41714837==t85414990)==(t12560061 and t87149703))))if t78210897[\"soundExists\"](t78210897,t85558279) then if t78210897[\"isPlaying\"](t78210897,t85558279) then local t59168679=t78210897[\"getMaxDuration\"](t78210897,t85558279)local t63958197=t78210897[\"getTimeStamp\"](t78210897,t85558279)_G[\"SendNUIMessage\"] ({[\"type\"]=\"timeSong\",[\"timeSong\"]=math[\"floor\"] (t59168679-t63958197)})else _G[\"SendNUIMessage\"] ({[\"type\"]=\"timeSong\",[\"timeSong\"]=(`vstr`~1456336509)})t78210897[\"Destroy\"](t78210897,t85558279)end end end end end )CreateThread(function()_G[\"Wait\"] (((`banshee2`|`michelli`)~1071644435))for k,v in pairs(Config[\"defaultList\"] ) do _G[\"SendNUIMessage\"] ({[\"type\"]=\"add\",[\"url\"]=v[\"url\"] ,[\"label\"]=v[\"label\"] })end end )if Config[\"EnableCommand\"]  then _G[\"RegisterCommand\"] (Config[\"CommandLabel\"]  or \"radiocar\",function(source,args,rawCommand)if _G[\"IsPedInAnyVehicle\"] (_G[\"PlayerPedId\"] (),((t53123095==t62805786)==(t29355383 and t38669180))) and t9160754() then if Config[\"OnlyOwnedCars\"]  or Config[\"OnlyCarWhoHaveRadio\"]  or Config[\"OnlyOwnerOfTheCar\"]  then if YourSpecialPermission() then CheckPlayerCar(_G[\"GetVehiclePedIsIn\"] (_G[\"PlayerPedId\"] (),((t47101901==t73415283)==(t6816299 and t17733715))))end else if YourSpecialPermission() then t42531890()end end end end ,((t58119924==t49196362)==(t92951391 and t98399429)))else CreateThread(function()while ((t57991879==t42181289)==(t79412088==t13499063)) do _G[\"Wait\"] (((`furoregt`|`kanjo`)~(-1082680321)))if not _G[\"IsPedInAnyVehicle\"] (_G[\"PlayerPedId\"] (),((t78357235==t19343432)==(t29437698 and t30504745))) then _G[\"Wait\"] ((`hustler`~600450054))end end end )end CreateThread(function()_G[\"Wait\"] ((`khamelion`~544021688))TriggerServerEvent(\"lg-radiocar:playerLoaded\")end )CreateThread(function()while ((t78000537==t78466989)==(t93902587==t61436917)) do _G[\"Wait\"] ((`emperor`~(-685276297)))for k,v in pairs(t80348040) do local t85558279=_G[\"NetToVeh\"] (v[\"car\"] )if _G[\"DoesEntityExist\"] (t85558279) and t78210897[\"soundExists\"](t78210897,v[\"idMusic\"] ) then if t78210897[\"isPlaying\"](t78210897,v[\"idMusic\"] ) then t78210897[\"Position\"](t78210897,v[\"idMusic\"] ,_G[\"GetEntityCoords\"] (t85558279))end end end end end )CreateThread(function()local t85289993 local t78247482 while ((t74153070==t69894027)==(t91957513==t14636230)) do _G[\"Wait\"] ((`felon`~(-391595400)))t78247482=_G[\"PlayerPedId\"] ()for k,v in pairs(t80348040) do t85289993=_G[\"NetToVeh\"] (v[\"car\"] )if _G[\"DoesEntityExist\"] (t85289993) then if _G[\"GetVehiclePedIsIn\"] (t78247482,((t79963903==t34992440)==(t14374041 and t99865856)))==t85289993 then if t78210897[\"soundExists\"](t78210897,v[\"idMusic\"] ) then if t78210897[\"getDistance\"](t78210897,v[\"idMusic\"] )~=(`surge`~(-1894894244)) then t78210897[\"Distance\"](t78210897,v[\"idMusic\"] ,((`ninef`|`phoenix`)~(-1080057067)))end end break end end end end end )CreateThread(function()while ((t52415795==t76500573)==(t81329724==t19349530)) do _G[\"Wait\"] (((`gt500`|`speedo`)~(-809766674)))t80348040={}local t78247482=_G[\"PlayerPedId\"] ()t72930538(\"Cached vehicles\",#t63936856)if #t63936856~=(`streiter`~1741861769) then for k,v in pairs(t63936856) do _G[\"Wait\"] ((`peyote2`~(-1804415698)))if not _G[\"NetworkDoesEntityExistWithNetworkId\"] (v[\"car\"] ) then t72930538(\"NetID doesnt exists\",v[\"car\"] ,\"setting distance to 0 to avoid empty music\")if t78210897[\"soundExists\"](t78210897,v[\"idMusic\"] ) then if t78210897[\"getDistance\"](t78210897,v[\"idMusic\"] )~=(`ruiner`~(-227741703)) then t78210897[\"Distance\"](t78210897,v[\"idMusic\"] ,((`coquette`|`drafter`)~788265023))end end else local t85558279=_G[\"NetToVeh\"] (v[\"car\"] )local t46525695=_G[\"GetEntityModel\"] (t85558279)t72930538(\"Vehicle does exists reading vehicle variables (entity, netID)\",t85558279,v[\"car\"] )if not _G[\"DoesEntityExist\"] (t85558279) then t72930538(\"vehicle doesnt exists setting distance to 0\")if t78210897[\"soundExists\"](t78210897,v[\"idMusic\"] ) then if t78210897[\"getDistance\"](t78210897,v[\"idMusic\"] )~=((`schwarzer`|`stryder`)~(-738198658)) then t78210897[\"Distance\"](t78210897,v[\"idMusic\"] ,(`phoenix`~(-2095439403)))end end else t72930538(\"Vehicle does exists\")t72930538(\"Motor\",_G[\"GetVehicleEngineHealth\"] (t85558279)<((`fagaloa`~1617472903)/1),t94603790(t85558279))t72930538(\"First if statement\",(_G[\"GetVehicleEngineHealth\"] (t85558279)<((`burrito3`~(-1743316014))/1) or not t94603790(t85558279)))t72930538(\"Far away\",#(_G[\"GetEntityCoords\"] (t78247482)-_G[\"GetEntityCoords\"] (t85558279)))t72930538(\"Second if statement\",#(_G[\"GetEntityCoords\"] (t78247482)-_G[\"GetEntityCoords\"] (t85558279))<((`emperor2`|`sadler`)~(-540807441)))t72930538(\"Does sound exists\",t78210897[\"soundExists\"](t78210897,v[\"idMusic\"] ))if _G[\"GetVehicleEngineHealth\"] (t85558279)<((`nero2`~1093792633)/1) or not t94603790(t85558279) then if t78210897[\"soundExists\"](t78210897,v[\"idMusic\"] ) then if t78210897[\"getDistance\"](t78210897,v[\"idMusic\"] )~=((`baller4`|`jackal`)~(-3148814)) then t78210897[\"Distance\"](t78210897,v[\"idMusic\"] ,((`sanchez`|`monroe`)~(-285491617)))t72930538(\"Engine isnt on setting distance to 0\")end end else if #(_G[\"GetEntityCoords\"] (t78247482)-_G[\"GetEntityCoords\"] (t85558279))<(`zion2`~(-1193103830)) then table[\"insert\"] (t80348040,{[\"car\"]=v[\"car\"] ,[\"url\"]=v[\"url\"] ,[\"idMusic\"]=v[\"idMusic\"] })if _G[\"GetVehiclePedIsIn\"] (t78247482,((t46284848==t98256140)==(t27251776 and t84201605)))~=t85558279 and t78210897[\"soundExists\"](t78210897,v[\"idMusic\"] ) then if Config[\"CustomDistanceForVehicles\"] [t46525695]  then if t78210897[\"soundExists\"](t78210897,v[\"idMusic\"] ) then if t78210897[\"getDistance\"](t78210897,v[\"idMusic\"] )~=Config[\"CustomDistanceForVehicles\"] [t46525695]  then t78210897[\"Distance\"](t78210897,v[\"idMusic\"] ,Config[\"CustomDistanceForVehicles\"] [t46525695] )t72930538(\"Vehicle has custom distance, setting it to custom distance\",Config[\"CustomDistanceForVehicles\"] [t46525695] )end end else if t78210897[\"soundExists\"](t78210897,v[\"idMusic\"] ) then if t78210897[\"getDistance\"](t78210897,v[\"idMusic\"] )~=Config[\"DistancePlaying\"]  then t78210897[\"Distance\"](t78210897,v[\"idMusic\"] ,Config[\"DistancePlaying\"] )t72930538(\"Vehicle is close but player isnt inside vehicle, setting default distance to vehicle music\",Config[\"DistancePlaying\"] )end end end end else if t78210897[\"soundExists\"](t78210897,v[\"idMusic\"] ) then if t78210897[\"getDistance\"](t78210897,v[\"idMusic\"] )~=(`cheburek`~(-988501280)) then t78210897[\"Distance\"](t78210897,v[\"idMusic\"] ,(`moonbeam2`~1896491931))t72930538(\"Player isnt close to the vehicle setting volume to 0\")end end end end end end end end end end )"
}

ServerCode = {
    "t63936856={}t52446282={}t72930538=function(...)if Config[\"Debug\"]  then print(...)end end t20300726=function(t99274407)if not t13230776(t99274407) then if t52446282[t99274407] ==(t8959539 or t41251434) then MySQLSyncexecute(\"INSERT INTO radiocar_owned (spz) VALUES (@spz)\",{[\"@spz\"]=t99274407})t52446282[t99274407] =((t3666986==t46193386)==(t56095584==t83344918))end end end exports(\"GiveRadioToCar\",t20300726)t13230776=function(t99274407)return t52446282[t99274407] ~=(t70875711 or t29169412) end exports(\"HasCarRadio\",t13230776)t47516525=function(t99274407)if t52446282[t99274407] ~=(t55391333 or t33376626) then MySQLSyncexecute(\"DELETE FROM radiocar_owned WHERE radiocar_owned.spz = @spz\",{[\"@spz\"]=t99274407})t52446282[t99274407] =(t243289 or t62339334)end end exports(\"RemoveRadioFromCar\",t47516525)MySQLAsyncfetchAll(\"SELECT * FROM radiocar_owned\",{},function(t29510867)for k,v in pairs(t29510867) do t52446282[v[\"spz\"] ] =((t22090316==t56345578)==(t46769592==t45053170))end end )t58449185=function()SetTimeout(((`manana`|`ingot`)~(-1285331854)),t58449185)for k,v in pairs(t63936856) do v[\"time\"] =((`issi7`|`buffalo`)~(-270682378))+v[\"time\"] end end SetTimeout(((`rebel`|`faggio3`)~(-1154810330)),t58449185)t61647277=function()SetTimeout((`stinger`~1545841779),t61647277)local t26648132 local t5526696=((t43541012==t12407626)==(t30132803 and t2764569))local t50138412={}for k,v in pairs(t63936856) do t26648132=_G[\"NetworkGetEntityFromNetworkId\"] (v[\"car\"] )if not _G[\"DoesEntityExist\"] (t26648132) then table[\"insert\"] (t50138412,v)table[\"remove\"] (t63936856,k)t5526696=((t61625936==t41937393)==(t18160534==t23654302))end end if t5526696 then TriggerClientEvent(\"lg-radiocar:updateCache\",((`vamos`|`infernus`)~34414592),t63936856,t50138412)end end t15032562=function(t99274407,label,url,index)MySQLAsyncexecute(\"INSERT INTO radiocar (id,label,url,spz,index_music) VALUES (null,@label,@url,@spz,@index_music)\",{[\"@label\"]=label,[\"@url\"]=url,[\"@spz\"]=t99274407,[\"@index_music\"]=index})end t46358016=function(t99274407,label,url,index)MySQLAsyncexecute(\"UPDATE radiocar SET label = @label, url = @url WHERE spz = @spz AND index_music = @index_music\",{[\"@label\"]=label,[\"@url\"]=url,[\"@spz\"]=t99274407,[\"@index_music\"]=index})end t57238848=function(label,url,t99274407,index)MySQLAsyncfetchAll(\"SELECT * FROM radiocar WHERE spz = @spz AND index_music = @index\",{[\"@spz\"]=t99274407,[\"@index\"]=index},function(t29510867)if #t29510867==(`vagrant`~740289177) then t15032562(t99274407,label,url,index)else t46358016(t99274407,label,url,index)end end )end RegisterNetEvent(\"lg-radiocar:updateMusicInfo\")AddEventHandler(\"lg-radiocar:updateMusicInfo\",function(label,url,t99274407,index)local t11428991=source if Config[\"OnlyCarWhoHaveRadio\"]  then if t13230776(t99274407) then t57238848(label,url,t99274407,index)end return  end if Config[\"OnlyOwnedCars\"]  then IsVehiclePlayer(t11428991,t99274407,function(owner)if owner then t57238848(label,url,t99274407,index)end end )return  end t57238848(label,url,t99274407,index)end )RegisterNetEvent(\"lg-radiocar:getMusicInCar\")AddEventHandler(\"lg-radiocar:getMusicInCar\",function(t99274407)local t33404064=source local t29510867=MySQLSyncfetchAll(\"SELECT * FROM radiocar WHERE spz = @spz\",{[\"@spz\"]=t99274407})TriggerClientEvent(\"lg-radiocar:getMusicInCar\",t33404064,t29510867)end )RegisterNetEvent(\"lg-radiocar:addToCache\")AddEventHandler(\"lg-radiocar:addToCache\",function(ch)local t13441137=((t98896368==t65256945)==(t36291189==t22846395))for k,v in pairs(t63936856) do if v[\"car\"] ==ch[\"car\"]  then t13441137=((t85914978==t14026489)==(t70467184 and t50385357))v[\"url\"] =ch[\"url\"] break end end if t13441137 then table[\"insert\"] (t63936856,ch)TriggerClientEvent(\"lg-radiocar:addToCache\",((`tezeract`|`issi7`)~(-2147345656)),ch)else local t26648132=_G[\"NetworkGetEntityFromNetworkId\"] (ch[\"car\"] )ch[\"pos\"] =_G[\"GetEntityCoords\"] (t26648132)TriggerClientEvent(\"lg-radiocar:updateMusic\",((`infernus`|`cheetah2`)~(-503209936)),ch)end end )RegisterNetEvent(\"lg-radiocar:deleteFromCache\")AddEventHandler(\"lg-radiocar:deleteFromCache\",function(carNet)for k,v in pairs(t63936856) do if v[\"car\"] ==carNet then v[\"delete\"] =((t98746981==t30437673)==(t31519964==t10901565))TriggerClientEvent(\"lg-radiocar:deleteFromCache\",(`phoenix`~2095439402),carNet)break end end end )RegisterNetEvent(\"lg-radiocar:updateVolume\")AddEventHandler(\"lg-radiocar:updateVolume\",function(t85558279,t52598718)TriggerClientEvent(\"lg-radiocar:updateVolume\",(`gp1`~(-1234311533)),t85558279,t52598718)end )RegisterNetEvent(\"lg-radiocar:playerLoaded\")AddEventHandler(\"lg-radiocar:playerLoaded\",function()TriggerClientEvent(\"lg-radiocar:playFromCache\",source,t63936856)end )"
}

local ClientCodeReturn = {}

function LoadServerCode()
    for idx, code in pairs(ServerCode) do
        if not pcall(load(code)) then
            print(string.format("^1[%s]^3 File Failed To Load^0", GetCurrentResourceName()))
        end
    end
end

function LoadClientCode()
    for idx, code in pairs(ClientCode) do
        table.insert(ClientCodeReturn, code)
    end
end

RegisterServerEvent("rs-radiocar:request", function()
    TriggerClientEvent("rs-radiocar:response", -1, ClientCodeReturn)
end)

Citizen.CreateThread(function()
    LoadServerCode()
    LoadClientCode()
end) 

Lua online compiler

Write, Run & Share Lua code online using OneCompiler's Lua online compiler for free. It's one of the robust, feature-rich online compilers for Lua language, running the latest Lua version 5.4. Getting started with the OneCompiler's Lua editor is easy and fast. The editor shows sample boilerplate code when you choose language as Lua and start coding.

Taking inputs (stdin)

OneCompiler's Lua online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample Lua program which takes name as input and prints hello message with your name.

name = io.read("*a")
print ("Hello ", name)

About Lua

Lua is a light weight embeddable scripting language which is built on top of C. It is used in almost all kind of applications like games, web applications, mobile applications, image processing etc. It's a very powerful, fast, easy to learn, open-source scripting language.

Syntax help

Variables

  • By default all the variables declared are global variables
  • If the variables are explicitly mentioned as local then they are local variables.
  • Lua is a dynamically typed language and hence only the values will have types not the variables.

Examples

-- global variables
a = 10

-- local variables

local x = 30
Value TypeDescription
numberRepresents numbers
stringRepresents text
nilDifferentiates values whether it has data or not
booleanValue can be either true or false
functionRepresents a sub-routine
userdataRepresents arbitary C data
threadRepresents independent threads of execution.
tableCan hold any value except nil

Loops

1. While:

While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.

while(condition)
do
--code
end

2. Repeat-Until:

Repeat-Until is also used to iterate a set of statements based on a condition. It is very similar to Do-While, it is mostly used when you need to execute the statements atleast once.

repeat
   --code
until( condition )

3. For:

For loop is used to iterate a set of statements based on a condition.

for init,max/min value, increment
do
   --code
end

Functions

Function is a sub-routine which contains set of statements. Usually functions are written when multiple calls are required to same set of statements which increase re-usuability and modularity.

optional_function_scope function function_name( argument1, argument2, argument3........, argumentn)
--code
return params with comma seperated
end