3D Text Label
#1

How i can make like when i add object it will appear a label middle of the object with the object id and the editing id, when i edit the object and save the pos it will be saved too (not stay on its old place) and when deleting the object it will disapear

a command like /label to show it and labeloff to turn it off
Reply
#2

To create the label just format a string displaying the ID

pawn Код:
//In your object creation script
new lblstr[20];
format(lblstr,sizeof(lblstr),"Object ID: %d",GetObjectID); //Obviously change this to your GetObject function
Create3DTextLabel(lblstr, 0x008080FF, x ,y, z, 40.0, 0, 0); //Also change this to your GetObjectPos or what ever you use
Something like that should work, like I've commented you'll have to change it up to fit your gamemode
Reply
#3

Will it be moved when i remove the object and so
Reply
#4

Dosnt move when i edit the object....
Reply
#5

Quote:
Originally Posted by Ananisiki
Посмотреть сообщение
Dosnt move when i edit the object....
You'd have to add a Delete3DTextLabel(Labelname); On edit then create another when you hit save.
Reply
#6

Under
if(response == EDIT_RESPONSE_FINAL)

or

if(response == EDIT_RESPONSE_UPDATE)
?
Reply
#7

Bump
Reply
#8

if(response == EDIT_RESPONSE_UPDATE)
because

0 - EDIT_RESPONSE_CANCEL // player cancelled (ESC)
1 - EDIT_RESPONSE_FINAL // player clicked on save
2 - EDIT_RESPONSE_UPDATE // player moved the object (edition did not stop at all)
Reply
#9

so how can i do so the label attachs middle of a object and when i edit it and click save it will move to its new position help plz
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)