Long time lurker, now server admin-script help

Discussion in 'Scripting Discussions' started by Boba Fetish, Jan 12, 2018.

  1. Boba Fetish

    Boba Fetish New Member

    Joined:
    May 18, 2015
    Messages:
    10
    Likes Received:
    0
    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.
     
  2. ShootingBlanks

    ShootingBlanks OpenDayZ Guru!

    Joined:
    Mar 31, 2013
    Messages:
    2,427
    Likes Received:
    336
    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

    [​IMG]
    [​IMG]
     
    Last edited: Jan 16, 2018 at 3:37 PM
  3. Boba Fetish

    Boba Fetish New Member

    Joined:
    May 18, 2015
    Messages:
    10
    Likes Received:
    0
    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.
     

Share This Page