Could someone explain why this wouldn't work? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Could someone explain why this wouldn't work? (
/showthread.php?tid=414332)
Could someone explain why this wouldn't work? -
Dokins - 09.02.2013
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];
Re: Could someone explain why this wouldn't work? -
cessil - 09.02.2013
you're assigning a 3dtextlabel to a normal array, you need to use the 3dtextlabel tag
https://sampwiki.blast.hk/wiki/Update3DTextLabelText
Re: Could someone explain why this wouldn't work? - T0pAz - 09.02.2013
Try that.
pawn Код:
new Text3D:VehicleLabel[MAX_VEHICLES];
Re: Could someone explain why this wouldn't work? -
Dokins - 09.02.2013
Ahh, simple mistake. Thank you very much, both of you.