AttachVehicleObject help required
#1

Hello. I have a problem with this code:

Код:
CMD:spawnbenson(playerid,params[])
{
new benson = CreateVehicle(499, 2515.9604, -1717.5089, 13.5014, 270.0000, 1, 1, 100);
// :
new myobject = CreateObject(2254,0,0,-1000,0,0,0,100);
SetObjectMaterialText(myobject, 0, " ", 90, "Impact", 100, 0, 0xFFFFFFFF, 0xFF16BB48, 1);
SetObjectMaterialText(myobject, 1, "None", 50, "Arial", 24, 0, 0, 0, 1);
AttachObjectToVehicle(myobject, benson, -1.225000,-1.215000,0.824999,0.000000,0.000000,-90.0);
//
myobject = CreateObject(2254,0,0,-1000,0,0,0,100);
SetObjectMaterialText(myobject, 0, " ", 90, "Impact", 100, 0, 0xFFFFFFFF, 0xFF16BB48, 1);
SetObjectMaterialText(myobject, 1, "None", 50, "Arial", 24, 0, 0, 0, 1);
AttachObjectToVehicle(myobject, benson, -1.225000,-2.490000,0.824999,0.000000,0.000000,-90.0);
//
myobject = CreateObject(2254,0,0,-1000,0,0,0,100);
SetObjectMaterialText(myobject, 0, " ", 90, "Impact", 100, 0, 0xFFFFFFFF, 0xFF16BB48, 1);
SetObjectMaterialText(myobject, 1, "None", 50, "Arial", 24, 0, 0, 0, 1);
AttachObjectToVehicle(myobject, benson, 1.229999,-2.590001,0.824999,0.000000,0.000000,90.0);
//
myobject = CreateObject(2254,0,0,-1000,0,0,0,100);
SetObjectMaterialText(myobject, 0, " ", 90, "Impact", 100, 0, 0xFFFFFFFF, 0xFF16BB48, 1);
SetObjectMaterialText(myobject, 1, "None", 50, "Arial", 24, 0, 0, 0, 1);
AttachObjectToVehicle(myobject, benson, 1.229999,-1.240000,0.824999,0.000000,0.000000,90.0);
//
myobject = CreateObject(2254,0,0,-1000,0,0,0,100);
SetObjectMaterialText(myobject, 0, " ", 90, "Impact", 100, 0, 0xFFFFFFFF, 0xFF16BB48, 1);
SetObjectMaterialText(myobject, 1, "None", 50, "Arial", 24, 0, 0, 0, 1);
AttachObjectToVehicle(myobject, benson, 1.239999,-2.625000,0.824999,0.000000,0.000000,90.0);
//
myobject = CreateObject(2267,0,0,-1000,0,0,0,100);
SetObjectMaterialText(myobject, 0, "None", 50, "Arial", 24, 0, 0, 0, 1);
SetObjectMaterialText(myobject, 1, " ", 90, "Impact", 100, 0, 0xFFFFFFFF, 0xFF16BB48, 1);
AttachObjectToVehicle(myobject, benson, 0.219999,0.694999,1.425000,0.000000,0.000000,-180.0);
//
myobject = CreateObject(2267,0,0,-1000,0,0,0,100);
SetObjectMaterialText(myobject, 0, "None", 50, "Arial", 24, 0, 0, 0, 1);
SetObjectMaterialText(myobject, 1, " ", 90, "Impact", 100, 0, 0xFFFFFFFF, 0xFF16BB48, 1);
AttachObjectToVehicle(myobject, benson, -0.195000,0.694999,1.425000,0.000000,0.000000,-180.0);
return 1;
}
When I compile, I get this error: error 035: argument type mismatch (argument 2) at all setobjectmaterialtext lines.
When I make everything dynamic, it compiles but doesn't actually attach anything in-game.
Please help.
( The benson spawns in a building because of my mapping. )
Reply
#2

https://sampwiki.blast.hk/wiki/SetObjectMaterialText

Quote:

Parameters:
PHP код:
objectidtext[], materialindex 0materialsize OBJECT_MATERIAL_SIZE_256x128fontface[] = "Arial"fontsize 24bold 1fontcolor 0xFFFFFFFFbackcolor 0textalignment 
Reply
#3

thanks fixed
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)