Attach3DTextLabelToVehicle doubt
#1

Well i want to use this function https://sampwiki.blast.hk/wiki/Attach3DTextLabelToVehicle i tried but i never get it working, so i come to this section hoping someone to help me out, what i want is like, an player enter in the bus(bus driver) and type /service and appears an message "On Service", and if he type that command again "deletes that 3DTextLabel". What i really didn't get it working was the Attach3DTextLabelToVehicle by command.
Reply
#2

Post the code. My guess is you mistook vehicleid = modelid, which it does not.
Reply
#3

pawn Код:
new bus;
new Text3D:vehicle3Dtext;
//public OnGameModeInit
bus = AddStaticVehicleEx(431,881.3582,-1199.3280,17.4133,178.9128,1,1,30000);
Command:
pawn Код:
vehicle3Dtext = Create3DTextLabel( "In Service", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
Attach3DTextLabelToVehicle( vehicle3Dtext, bus, 0.0, 0.0, 2.0);
Edit: I got it working, i am such a dumbass, i forgot to make the command

But wait i've got a few questions, like i have more than 1 bus:

pawn Код:
bus = AddStaticVehicleEx(431,881.3582,-1199.3280,17.4133,178.9128,1,1,30000); // Example
bus1 = AddStaticVehicleEx(431,881.3582,-1199.3280,17.4133,178.9128,1,1,30000); // Example
I make /inservice, but it have to give the vehicle3Dtext to the specific vehicle, how to do so?

Note: 666 posts
Reply
#4

Sorry double posting, but my topic was lefting behind, i hope really someone can help me out :P
Reply
#5

It was a bump , oh and btw i am trying to fix your code, but no success with me?
Reply
#6

Nvm this, is working everything just fine. A guy helped me out.
Reply
#7

How did you do it?

EDIT: Nevermind i figured it out, but want to know how to like when they do

Код:
/offduty
It just destroys the label.

Please help.!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)