Custom Text On Objects -How To??- -
AdvancedMapper - 03.07.2012
Hello, i was playing on a server and i saw these Text's around and i was wondering how they did it?
I took a picture below...
Please help me on how they did this..
Re: Custom Text On Objects -How To??- -
Vince - 03.07.2012
https://sampwiki.blast.hk/wiki/SetObjectMaterialText
Re: Custom Text On Objects -How To??- -
AdvancedMapper - 03.07.2012
Thanks +Rep'ed
Re: Custom Text On Objects -How To??- -
MP2 - 03.07.2012
These objects are good for making signs:
# Blank planes for text signs
19475, Plane001, signsurf, 300, 2097284
19476, Plane002, signsurf, 300, 2097284
19477, Plane003, signsurf, 300, 2097284
19478, Plane004, signsurf, 300, 2097284
19479, Plane005, signsurf, 300, 2097284
19480, Plane006, signsurf, 300, 2097284
19481, Plane007, signsurf, 300, 2097284
19482, Plane008, signsurf, 300, 2097284
19483, Plane009, signsurf, 300, 2097284
Not AEROplanes, as in flat planes - a flat surface with no collision for you to put text on. Material is always 0.
Re: Custom Text On Objects -How To??- -
AdvancedMapper - 03.07.2012
Well where would i put the
Quote:
if (strcmp("/text", cmdtext, true) == 0)
{
new myobject = CreateObject(991, -74.28, 1446.68, 9.92,); //create the object
SetObjectMaterialText(myobject, "Test {FFFFFF}0.3{008500}e {FF8200}RC7", 0, OBJECT_MATERIAL_SIZE_256x128,\
"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
// write "SA-MP 0.3e RC7" on the object, with orange font color and black background
return 1;
}
|
I'm trying to figure that out I'm using VX-RP 2 By Calgon
Re: Custom Text On Objects -How To??- -
Calgon - 03.07.2012
That script uses zcmd, so you just need to replace
pawn Code:
if (strcmp("/text", cmdtext, true) == 0)
with
pawn Code:
CMD:text(playerid, params[])
Although you might want to change 'text' to something else, because I think '/text' is also used for SMSing in that script.
You might also want to take a look at
this, the script uses that streamer for objects.
Re: Custom Text On Objects -How To??- -
AdvancedMapper - 03.07.2012
I get these errors:
Code:
E:\Users\Desktop\Linux-Server\gamemodes\vx-rp.pwn(5667) : error 003: declaration of a local variable must appear in a compound block
E:\Users\Desktop\Linux-Server\gamemodes\vx-rp.pwn(5671) : error 010: invalid function or declaration
And thats where i put the CMD: text with the rest of the code
Re: Custom Text On Objects -How To??- -
Calgon - 03.07.2012
You need to place it outside of any other code, the bottom of the script would be an appropriate place for it.
pawn Code:
CMD:text(playerid, params[]) {
new myobject = CreateObject(991, -74.28, 1446.68, 9.92,); //create the object
SetObjectMaterialText(myobject, "Test {FFFFFF}0.3{008500}e {FF8200}RC7", 0, OBJECT_MATERIAL_SIZE_256x128,\
"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
// write "SA-MP 0.3e RC7" on the object, with orange font color and black background
return 1;
}
Re: Custom Text On Objects -How To??- -
AdvancedMapper - 03.07.2012
So with the CMD: should all go to the bottom....
Re: Custom Text On Objects -How To??- -
AdvancedMapper - 03.07.2012
Thanks got it to work...