local veh = GetVehiclePedIsIn(PlayerPedId(), false)
-- GetVehiclePedIsIn will return 0 if the ped isn't currently in a vehicle
if veh == 0 then return end
local model = GetEntityModel(veh)
if GetIsVehicleElectric(model) then
print("This vehicle is electric")
else
print("This vehicle is not electric")
end