The script is supposed to check if the vehicle is police4, if it is, then set its colour to white and its engine power multiplier to 10, but for some reason on the client, I never see the print ‘script is running’ indicating to me that it isn’t. If anyone knows how to help please do . Here’s the files:
client.lua:
Citizen.CreateThread(function()
while true do
Wait(0)
local veh = GetVehiclePedIsIn(GetPlayerPed(-1), false)
print ('script is running')
if IsVehicleModel(veh, 0x8A63C7B9) then
print('veh is police4')
SetVehicleColours(veh, 111, 111)
SetVehicleEnginePowerMultiplier(10.00)
end
end
end)
__resource.lua (client.lua is in the folder client):
yes i do, also ive now changed the code slightly too:
Citizen.CreateThread( function()
while true do
Citizan.Wait(0)
local veh = GetVehiclePedIsIn(GetPlayerPed(-1), false)
print ('script is running')
if IsVehicleModel(veh, 0x8A63C7B9) then
print('veh is police4')
SetVehicleColours(veh, 111, 111)
SetVehicleEnginePowerMultiplier(veh, 10.00)
end
end
end)
So, I checked it and the code part is fine, if it is not constantly printing script is running in the InGame Console, there has to be a problem with your __resource.lua or you didn’t start the resource ^^