03.04.2015, 09:22
Admin Team
03.04.2015, 10:01
You can use this functions to change the material & the text of the object you created and attached to vehicle.
https://sampwiki.blast.hk/wiki/SetObjectMaterial
https://sampwiki.blast.hk/wiki/SetObjectMaterialText
This might not be correct, but you can get idea how to make it.
https://sampwiki.blast.hk/wiki/SetObjectMaterial
https://sampwiki.blast.hk/wiki/SetObjectMaterialText
This might not be correct, but you can get idea how to make it.
PHP код:
CMD:vehtext(playerid,params[])
{
new text;
if(sscanf(params,"s",text)) return SendClientMessage(playerid,0xCCCCCCAA,"/vehtext [text]");
new myobject = CreateObject(19353, 0, 0, 10, 0.0, 0.0, 90.0); //create the object
SetObjectMaterialText(myobject,text, 0, OBJECT_MATERIAL_SIZE_256x128,\
"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
return 1;
}
03.04.2015, 10:05
error 035: argument type mismatch (argument 2)
line :"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
line :"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
03.04.2015, 10:07
oops ![Tongue](images/smilies/razz.gif)
![Tongue](images/smilies/razz.gif)
Quote:
SetObjectMaterialText(myobject,text, 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER); |
03.04.2015, 10:09
error 035: argument type mismatch (argument 2)
line : SetObjectMaterialText(myobject,text, 0, OBJECT_MATERIAL_SIZE_256x128,
line : SetObjectMaterialText(myobject,text, 0, OBJECT_MATERIAL_SIZE_256x128,
03.04.2015, 10:10
"Text" should be an array, but you can just use params.
And then also use AttachObjectToVehicle to attach the object to the vehicle.
Код:
#define isnull(%1) \ ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1])))) CMD:vehtext(playerid,params[]) { if(isnull(params)) return SendClientMessage(playerid,0xCCCCCCAA,"/vehtext [text]"); new myobject = CreateObject(19353, 0, 0, 10, 0.0, 0.0, 90.0); //create the object SetObjectMaterialText(myobject, params, 0, OBJECT_MATERIAL_SIZE_256x128,\ "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER); return 1; }
03.04.2015, 10:11
error 035: argument type mismatch (argument 2)
line : SetObjectMaterialText(myobject,text, 0, OBJECT_MATERIAL_SIZE_256x128,
this error
line : SetObjectMaterialText(myobject,text, 0, OBJECT_MATERIAL_SIZE_256x128,
this error
![Sad](images/smilies/sad.gif)
03.04.2015, 10:13
Check my edit, i forgot the rest of the code, the warning is because "text" isn't an array.
03.04.2015, 10:15
thank you !
)
![Smiley](images/smilies/smile.png)
« Next Oldest | Next Newest »
Users browsing this thread: 7 Guest(s)