3D Text 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: 3D Text Label (
/showthread.php?tid=505991)
3D Text Label -
Ananisiki - 11.04.2014
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
Re: 3D Text Label -
Flake. - 11.04.2014
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
Re: 3D Text Label -
Ananisiki - 11.04.2014
Will it be moved when i remove the object and so
Re: 3D Text Label -
Ananisiki - 11.04.2014
Dosnt move when i edit the object....
Re: 3D Text Label -
Flake. - 11.04.2014
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.
Re: 3D Text Label -
Ananisiki - 11.04.2014
Under
if(response == EDIT_RESPONSE_FINAL)
or
if(response == EDIT_RESPONSE_UPDATE)
?
Re: 3D Text Label -
Ananisiki - 26.04.2014
Bump
Re: 3D Text Label -
awsomedude - 26.04.2014
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)
Re: 3D Text Label -
Ananisiki - 29.04.2014
so how can i do so the label attachs middle of a object
![Huh?](images/smilies/confused.gif)
and when i edit it and click save it will move to its new position help plz