Jump to content
Sign in to follow this  
fureur

Execute script on server side

Recommended Posts

Hi, I want to execute my "antiusebug.sqf" on my server side. What line I do put on my init.sqf on mission file ?

Share this post


Link to post
Share on other sites
// init.sqf

if (isServer) then
{
   // stuff you execute here is exclusively run on the server
   execVM "antiusebug.sqf";
};

Share this post


Link to post
Share on other sites
// init.sqf

if (isServer) then
{
   // stuff you execute here is exclusively run on the server
   execVM "antiusebug.sqf";
};

Don't work, nothing happens. antiusebug.sqf is executed (can't delete) but script not work.

//init.sqf

if (isServer) then
{
   // stuff you execute here is exclusively run on the server
   execVM "antiusebug.sqf";
};

//antiusebug.sqf

waitUntil {!alive player};
disableUserinput true;
waitUntil {alive player};
disableUserinput false;

Edited by fureur

Share this post


Link to post
Share on other sites

Oh wow, I don't know where to begin...

You seem to lack fundamental knowledge about the use of ArmA-Script and other affiliated paradigms, thus I won't try to explain you what went wrong there but urge you to pick up some good tutorials explaining the basics.

For your problem here, just change the if-condition and it should work:

// init.sqf
if (!isDedicated) then
{
   waitUntil {player == player};
   execVM "antiusebug.sqf";
};

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  

×