3dtextlabel
#1

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.
Reply
#2

You need loop all players who have car. I hope you have car ownership system?
Reply
#3

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.
Reply
#4

up...
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)