Jump to content

blckeagls

Member
  • Posts

    182
  • Joined

  • Last visited

Posts posted by blckeagls

  1. What for a part i must set (@epochhive) ??

    execVM "\q\addons\custom_server\init.sqf"; 

     

    ?

    greez

    In your server startup parameters, where it says something like -mod=@Epoch;@EpochHive make it look like this -mod=@Epoch;@EpochHive;@Blck_AIMission;

    the custom_server.pbo has a prefix: \q\addons\custom_server\  thats how the server is calling the init.sqf file

    ==================

     

    If you don't know how to or can't change the -mod parameter...  Add the custom_server.pbo to your @EpochHive/Addons/ folder

  2. You have two options:

    You can delete the @Blck_AIMISSION folder and redownload it and put it back there.

    or

    take the custom_server.sqf file and put it in the @Epoch_Hive/addons/ folder...
    then remove the @Blck_AIMISSIONS from your -mod= startup parameters...

     

     

    Also, yes the files can be editted.. to unpack the PBO you need PBOManager -- but you need to repack it into a PBO for changes to take place

  3. Is this configured for the Altis Map only?

    It is...  To fix it for Chernarus or other maps change this in the SM1 of the Major and Minor missions

    _coords = [[6322,7801,0],300,12000,30,0,10,0] call BIS_fnc_findSafePos;
    
    to:
    
                Center Pos       Range
    _coords = [[6322,7801,0],300,12000,30,0,10,0] call BIS_fnc_findSafePos;
    
    For Chernarus this should work:
    _coords = [[6322,7801,0],300,5000,30,0,10,0] call BIS_fnc_findSafePos;
    
    

    In ver 1.2+ i added support to define these in the server init.sqf file..

  4.  

    Thanks for the input.  Could not get it to fire, nor some other variations using "Init".

     

    Went with this approach which is working well.

     

    In the code that creates the vehicle I add: (this runs on the server!)

    _veh addEventHandler ["GetIn",
            {
                _vehobj = _this select 0;
                _vehseat = _this select 1;
                _owner = _this select 2;
                _idowner = owner _owner;
                TEMPVEHICLE = true;
                _idowner publicVariableClient "TEMPVEHICLE";
            }];
    

    Then in my "is a player" portion of my 'Init.sqf' I have the following:

    "TEMPVEHICLE" addPublicVariableEventHandler
    {
        systemChat "Warning! This vehicle will disappear on server restart!";
    };
    

    This seems to be more eloquent than my code... nice work

  5. Thanks for responding blckeagls but the "playableUnits" code is only really useful for the server itself. What I'm trying to do is more along the lines of scripting a local sqf to run on clients. So far, I'm just putting it into the initPlayerLocal.sqf but I haven't exactly tested the effects that revive or respawn have on the loop script.

    You could use a publicVariableHandler...  Have the server tell the players when to execute it...

    Generally, you shouldn't have the clients spawn anything.   I use addPublicVariableEventHandler to have client request stuff from the server..

    //////////////////////////////////
    ////In Mission Code for client////
    //////////////////////////////////
    ExecuteMission = {
        _Object = [1234,5678]; //Define an object or location
        waitUntil {(player distance _Object) < 100}; //Waits until player is within 100m of object or location
        serverMissionRequest = ["AIMISSION",true]; //Assigns variable to serverMissionRequest (true to add mission)
        publicVariableServer "serverMissionRequest"; //Sends the variable "serverMissionRequest" to the server
        waitUntil {(player distance _Object) > 200}; //Waits until player is 200m away from object or location
        serverMissionRequest = ["AIMISSION",false]; //Assigns variable to serverMissionRequest (false to remove mission)
        publicVariableServer "serverMissionRequest"; //Sends the variable "serverMissionRequest" to the server
        call ExecuteMission; //Executes this code again
    };
    call ExecuteMission; //Spawns when player enters server
    player addEventHandler ["Respawn", {call ExecuteMission}]; //When player respawns, it executes ExecuteMission
    player addEventHandler ["Revive", {call ExecuteMission}]; //When player is revived, it executes ExecuteMission (Not sure if "Revive" is valid, need to test)
    
    
    
    //////////////////////////////
    ////////In server code////////
    //////////////////////////////
    SpawnMission = {
                    //_this = Variable passed from player [PlayerObject,["AIMISSION",1]]
    		_player = _this select 0; //Will be the player object
                    _arrayFromPlayer = _this select 1; //Will be ["AIMISSION",true] or ["AIMISSION",false]
    		_String = _arrayFromPlayer select 0; //Will be "AIMISSION"
    		_Value = _arrayFromPlayer select 1; // Will be true or false
                    _playerPos = getPos _player; //Gets the players position
                    if (_Value) then { //If _Value = true execute SpawnMissions.sqf, if false execute RemoveMission.sqf
                        [_player,_playerPos,_String] exeVM "SpawnMission.sqf"; // Code to spawn mission with passing the player,their position,the string
                    } else {
                        [_player,_playerPos,_String] exeVM "RemoveMission.sqf"; // Code to remove mission with passing the player,their position,the string
                    };
    };
    
    "serverMissionRequest" addPublicVariableEventHandler {_this call SpawnMission}; //When serverMissionRequest is received from a player, it executes "SpawnMission"
    
  6. Well for one, you need to get Towing/Lifting implemented. 

     

    Zombies in cities? Interested in seeing how you managed that? You using the generic sandbox zombies off armaholic?

    Thanks for towing/lifting.. Towing/Lifting has been added.

    I used Shaun's Simple Zombie script and editted it...  I posted it on AI Missions on how I did it..  but it has yet to be approved...

  7. 13:54:42 Error position: <_owner in _players)) then {

    _ownerOnline>3:54:42 Error Undefined variable in expression: _owner

    13:54:42 File q\addons\custom_server\AIMission\AI1.sqf, line 40

    13:54:42 Error in expression < + [_x];

    } foreach playableunits;

    if (!(_owner in _players)) then {

    _ownerOnline>

     This is the result i get on rpt, any ideas?

    Did you use the newest PBO?

    or use my code in another script?

    make sure the variables are listed in the private ["_var1","_var2"] etc...

×
×
  • Create New...