Jump to content
Sign in to follow this  
blanic

Call a file on a server outside PBO

Recommended Posts

I have read and not having much success at this problem.

If you have mission.pbo on your server, but you want to call a file somewhere else on the server, like one directory up, how do you call it?

I put this into the init.sqf

[] execVM "\ServerScripts\test.sqf";

and nothing happens.

Share this post


Link to post
Share on other sites

I don't think you can specify relative directories above the pbo, as the pbo path is the root path. However, I do know that you can create a folder named "scripts" and place it in your Arma2 path, such as on my machine:

C:\Program Files\Bohemia Interactive\ArmA 2\scripts

Then when you call a script that is in that directory, you only need the script name, such as:

[]execVM "test.sqf";

because A2 will automatically look for this directory if test.sqf does not exist inside the pbo.

You can also place a scripts folder in your documents folder where your missions under development are located:

Documents\ArmA 2\Scripts

and A2 will search there as well when you are editing missions. You might want to refer to script parameters note on this link:

http://community.bistudio.com/wiki/exec

Share this post


Link to post
Share on other sites

I am able to actually do it, I am able to call things, but for some reason regular code isnt working the way it should outside the PBO. I am able to call the file though from the server outside the pbo just have to figure out why it isnt calling it like it should.

Share this post


Link to post
Share on other sites

Are you able to give an example of what the script does and how you are calling it? I partly misread your original post. Neverthless, a script in one of the scripts folders should work fine, I've done it from a pbo that way.

Share this post


Link to post
Share on other sites

I want an admin function that is not visable to the clients within the .pbo

_uid = getPlayerUID vehicle player;

if (_uid == "1234567") then

{

player addaction ["Camera", "gcam.sqf"];

};

Share this post


Link to post
Share on other sites

Well simply add the admins name to a array and check it.

if (isDedicated) exitWith {};

_id = ["AdminName"];

waitUntil { (player == player) };

if (name player in _id) then
{
      player addaction ["Camera", "gcam.sqf"];
};

Share this post


Link to post
Share on other sites

It's not that this doesn't work, it doesn't work when i call it from outside the pbo, like above one folder like other scripts.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×