Long time lurker, now server admin-script help

So, I am just failing at adding this custom Billboard.
Image size, 512x512, put in root folder of mission pbo, as well as via script.
object placed via editor:
_vehicle_0 = objNull;
if (true) then
{
_this = createVehicle ["WarfareBunkerSign", [3420.4092, 3530.8779], [], 0, "CAN_COLLIDE"];
_vehicle_0 = _this;
_this setDir -97.567596;
_this setPos [3420.4092, 3530.8779];
_this setVehicleInit "this setObjectTexture [0,""testimage.jpg""]";
};

Placed at bottom of server functions:
[] execVM "\z\addons\dayz_server\addons\FSign\FSign.sqf";

Fsign.sqf
/*
File Name: FSign.sqf
File Created: 2/9/2014
File Version: 1.0
File Author: Foamy
File Last Edit Date: 2/9/2014
File Description: Adds "Sign" Objects to world.
*/

// Add Signs Below this Line

// Sign Location <--- change to your loc
_this = createVehicle ["WarfareBunkerSign", [3420.4092, 3530.8779], [], 0, "CAN_COLLIDE"];
_sign1 = _this;
_this setDir -97.567596;
_this setVehicleInit "this SetObjectTexture [0,""addons\Images\FSign\testimage.jpg""]";
_this setPos [3420.4092, 3530.8779];

Image placed in folder accordingly.
 
I went into the editor (control + E) and dropped a sign, pasted the below code into the initialization line and it works. The image and script needs to be on the client IMHO. Your setObjectTexture line is missing a semicolon. Its hard to get it correct with the multiple quotes and semicolons. You have to think of it as a statement (setObjectTexture)that is going to be passed to the objects init (setVehicleInit) in its entirety which means both nested statements need to end in a semicolon. Attached you will find the editor scripts that I saved.
This is what you put into your init line in the editor.
Code:
  _this setVehicleInit "this setObjectTexture [0, ""test.jpg""];";
https://drive.google.com/open?id=1HlZDhxBR5Xv7TwKxE1iMgzKpcZKSvXsL


 
Last edited:
thanks bud. Like so?

_vehicle_0 = objNull;
if (true) then
{
_this = createVehicle ["SignM_UN_Base_EP1", [7072.7256, 7683.0073], [], 0, "CAN_COLLIDE"];
_vehicle_0 = _this;
_this setVehicleInit " _this setVehicleInit ""this setObjectTexture [0, """"test.jpg""""];"";";
_this setPos [7072.7256, 7683.0073];
};
Thing is my SUV skins work just fine the way I do it. But, I'll give this a whirl.
 
The code is wrong .. this is what you have in the init field
Code:
_this setVehicleInit " _this setVehicleInit ""this setObjectTexture [0, """"test.jpg""""];"";";
_this setPos [7072.7256, 7683.0073];
};
Notice you have the setvehicleinit twice ...
I misspoke when i said to "put this in your init line" because that was the complete init line. So your solution is either edit the code directly like this
Code:
_vehicle_0 = objNull;
if (true) then
{
_this = createVehicle ["SignM_UN_Base_EP1", [7072.7256, 7683.0073], [], 0, "CAN_COLLIDE"];
_vehicle_0 = _this;
_this setVehicleInit "this setObjectTexture [0, ""test.jpg""];";
_this setPos [7072.7256, 7683.0073];
};
Or this is what you put into the init line in the editor
Code:
this setObjectTexture [0, "test.jpg"];
What i pasted in my first reply was incorrect as it was the resulting code, not what you should put into the init line as I said
 
Top