Actor Label
#1

Hi, I am using mode at (https://sampforum.blast.hk/showthread.php?pid=3945921#pid3945921) , how can I add status messages to the actor's head ?
Reply
#2

You can do that by using actor_plus https://github.com/Dayrion/actor_plus
Reply
#3

how can I do without using .inc
Reply
#4

Quote:
Originally Posted by BrainDamaged
Посмотреть сообщение
how can I do without using .inc
Create a 3D Text Label at the actors position.

pawn Код:
new Float:pos[3];
GetActorPos(actorid, pos[0], pos[1], pos[2]); // Replace "actorid" with the ID of the actor
CreateDynamic3DTextLabel("Add Text Here", -1, pos[0], pos[1], pos[2], 50.0, 0, 0);
If you plan on moving the actor, you should update the text label everytime the actor moves.
Reply
#5

Thanks sir
Reply
#6

actors will be spawned with their numbers and status, when the robbery is over, the label will be updated and the label will return to its original state when it becomes peelable again. Can you help me ?

Example Image:

Reply
#7

You should add a robbery timer or something to detect that the robbery is over, if yes, Delete the 3d text label and create a new one with the text you want
Reply
#8

Quote:
Originally Posted by JasonRiggs
Посмотреть сообщение
You should add a robbery timer or something to detect that the robbery is over, if yes, Delete the 3d text label and create a new one with the text you want
sir, can we not update them instead of deleting them?
Would you describe it with a short example?
Reply
#9

Quote:
Originally Posted by BrainDamaged
Посмотреть сообщение
sir, can we not update them instead of deleting them?
Would you describe it with a short example?
Whenever you create the actors, loop through them and add the 3D Text Labels to them. When the player starts a robbery, you could check what actor is closer to the player (for loop + IsActorStreamedIn/get the actor's position and compare) and update his 3D Text Label to say whatever you want.
Reply
#10

Quote:
Originally Posted by GRiMMREAPER
Посмотреть сообщение
Whenever you create the actors, loop through them and add the 3D Text Labels to them. When the player starts a robbery, you could check what actor is closer to the player (for loop + IsActorStreamedIn/get the actor's position and compare) and update his 3D Text Label to say whatever you want.
I thank you for your help but I did not make the label incident.
Can you help me with your precious time and how can I do it ?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)