Could someone explain why this wouldn't work?
#1

pawn Код:
if(VehForSale[x] == 1)
            {
                new string[128];
                new name = VehModel[x] - 400;
                format(string, sizeof(string), "%s, $%d, %s", VehicleNames[name], VehPrice[x], VehPlate[x]);
                VehicleLabel[x] = CreateDynamic3DTextLabel(string, COLOUR_WHITE, VehSpawnX[x],VehSpawnY[x], VehSpawnZ[x], 100.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, -1, -1, 20.0);
            }
It gives a tag mismatch. I'm trying to save the ID of the text labels so I can update them later on, I'm trying to create one for every vehicle that is for.

x = the id of the vehicle loaded from MySQL.

I created this at the top of script:

pawn Код:
VehicleLabel[MAX_VEHICLES];
Reply
#2

you're assigning a 3dtextlabel to a normal array, you need to use the 3dtextlabel tag

https://sampwiki.blast.hk/wiki/Update3DTextLabelText
Reply
#3

Try that.

pawn Код:
new Text3D:VehicleLabel[MAX_VEHICLES];
Reply
#4

Ahh, simple mistake. Thank you very much, both of you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)