3DText spawns on the wrong vehicle.
#1

Alright, so I have a system to place 3DText on the vehicle, with it's price.
However, if VID 3 is forsale, the Text spawns on Vehicle ID 4. And so on.
pawn Код:
if(DynamicVehicles[idx][CarPrice] != 0)
{
    new str[64];
    format(str, sizeof(str), "Price: ${F81414} %d", DynamicVehicles[idx][CarPrice]);
    DynamicVehicles[idx][Price] = Create3DTextLabel(str, C_WHITE, 0.00, 0.00, 0.00, 20.0, 0, 0);
    Attach3DTextLabelToVehicle(DynamicVehicles[idx][Price], idx, 0.00, 0.00, 1.0);
}
It's very annoying, and I've tried multiple things but it didn't work out overall.
Reply
#2

Comment Deleted
Reply
#3

Where you count the amount of dynamic vehicles, did you add +1 to the actual amount?
Reply
#4

No, I did not.
Reply
#5

Quote:
Originally Posted by Lynn
Посмотреть сообщение
No, I did not.
Did you start counting from 0 instead of 1 with the IDs?
Reply
#6

FIXED:
Solution - Added +1, at the vehicleid param for attaching the 3D Textlabel.
I feel dumb.
Reply
#7

Isn't that what I asked?!?!? Rofl.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)