3dtextlabel - 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: 3dtextlabel (
/showthread.php?tid=519603)
3dtextlabel -
Xeinss - 15.06.2014
PHP код:
format(str,128,"\"%s\"\Open For Buy",VehNames[GetVehicleModel(i)-400]);
Update3DTextLabelText(TextCar[i],COLOR_GREEN,str);
Attach3DTextLabelToVehicle(TextCar[i],i,0.0,0.0,0.0);
This is not set 3dtextlabel for all vehicles ..
And if i buy car this is set 3dtextlabel buy its not set the owner
Example: "infernus" the owner is .
PHP код:
format(str,128,"\"%s\"\the owner is %s",VehNames[GetVehicleModel(vehicleid)-400]),GetName(playerid);
Update3DTextLabelText(TextCar[vehicleid],COLOR_RED,str);
Attach3DTextLabelToVehicle(TextCar[vehicleid],vehicleid,0.0,0.0,1.0);
thanks for helpers.
Re: 3dtextlabel -
MacT - 15.06.2014
You need loop all players who have car. I hope you have car ownership system?
Re: 3dtextlabel -
Xeinss - 15.06.2014
Quote:
Originally Posted by MacT
You need loop all players who have car. I hope you have car ownership system?
|
PHP код:
format(str,128,"\"%s\"\The Owner Is %s",VehNames[GetVehicleModel(vehicleid)-400]),DOF2_GetString(cars(vehicleid),"Owner");
Update3DTextLabelText(TextCar[vehicleid],COLOR_RED,str);
Attach3DTextLabelToVehicle(TextCar[vehicleid],vehicleid,0.0,0.0,1.0);
you can write for me code and i check if this work?
i try this way and this not work.
Re: 3dtextlabel -
Xeinss - 15.06.2014
up...
Re: 3dtextlabel -
Konstantinos - 15.06.2014
You close the parenthesis so it takes only the name from the VehNames array as argument.
pawn Код:
format(str,128,"\"%s\"\the owner is %s",VehNames[GetVehicleModel(vehicleid)-400],GetName(playerid));
By the way, check if the vehicle exists before subtracting 400 from it otherwise you'll get run time error 4.