You cannot use "bought" for both owner's name and price. Use another name for the price and use strcmp to compare strings:
pawn Код:
if (!strcmp(VehicleInfo[vehicleid][bought], pname, true, MAX_PLAYER_NAME))
and because strcmp returns 0 if one of them is NULL you can prevent it by doing:
pawn Код:
if (!isnull(VehicleInfo[vehicleid][bought]) && !strcmp(VehicleInfo[vehicleid][bought], pname, true, MAX_PLAYER_NAME))
and as I said before, use another name for the price here:
pawn Код:
VehicleInfo[vehicleid][bought] = 999;
or whatever it is anyways.