SA-MP Forums Archive
Actor Label - 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: Actor Label (/showthread.php?tid=656921)



Actor Label - BrainDamaged - 27.07.2018

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 ?


Re: Actor Label - Verc - 27.07.2018

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


Re: Actor Label - BrainDamaged - 27.07.2018

how can I do without using .inc


Re: Actor Label - GRiMMREAPER - 27.07.2018

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.


Re: Actor Label - BrainDamaged - 27.07.2018

Thanks sir


Re: Actor Label - BrainDamaged - 28.07.2018

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:




Re: Actor Label - JasonRiggs - 28.07.2018

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


Re: Actor Label - BrainDamaged - 28.07.2018

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?


Re: Actor Label - GRiMMREAPER - 28.07.2018

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.


Re: Actor Label - BrainDamaged - 28.07.2018

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 ?