citizenfx/natives

After SetVehicleModKit(vehicle, 0) is used on a vehicle GetVehicleNumberPlateText(vehicle) returns an empty string on the server.

enc0ded opened this issue · 4 comments

bool hasPlate = state.buffer.ReadBit();

for (int i = 0; i < 8; i++)
{
    if (hasPlate)
    {
        int plateChar = state.buffer.Read<int>(7);
        data.plate[i] = plateChar;
    }
    else
    {
        data.plate[i] = ' ';
    }
}

Is it possible that your vehicle has no plate ?

In the repro I set the plate the same way on both vehicles. Only one returns blank serverside. However, GetVehicleNumberPlateText() client side still returns correct plate.

Enz0Z commented

Hey! I'm currently having the same issue, using vMenu, simply add a level 2 engine, and woop, the plate appears to be ' '. And yes, on the client-side works perfectly.

If this is still an issue, please move it to forums so it won't get lost. Thanks.