Cirilla Fiona Ellen Rianon

Some fast questions.

2 posts in this topic

Posted (edited)

1. How do I edit this so vehicles respawn at the given position (360°)

Spoiler

/**
 * ExileServer_system_trading_network_purchaseVehicleRequest
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.

 Modified by ZombieX
 */
 
private["_sessionID","_parameters","_vehicleClass","_pinCode","_playerObject","_salesPrice","_playerMoney","_position","_vehicleObject","_responseCode","_nObject", "_position3d","_position2d"];
_sessionID = _this select 0;
_parameters = _this select 1;
_vehicleClass = _parameters select 0;
_pinCode = _parameters select 1;
try 
{
    _playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
    if (isNull _playerObject) then
    {
        throw 1;
    };
    if !(alive _playerObject) then
    {
        throw 2;
    };
    if (_playerObject getVariable ["ExileMutex",false]) then
    {
        throw 12;
    };
    _playerObject setVariable ["ExileMutex", true];
    if !(isClass (missionConfigFile >> "CfgExileArsenal" >> _vehicleClass) ) then
    {
        throw 3;
    };
    _salesPrice = getNumber (missionConfigFile >> "CfgExileArsenal" >> _vehicleClass >> "price");
    if (_salesPrice <= 0) then
    {
        throw 4;
    };
    _playerMoney = _playerObject getVariable ["ExileMoney", 0];
    if (_playerMoney < _salesPrice) then
    {
        throw 5;
    };
    if !((count _pinCode) isEqualTo 4) then
    {
        throw 11;
    };
    if (_vehicleClass isKindOf "Ship") then 
    {
        _nObject = nearestObject [(getPosATL _playerObject), "Land_HelipadEmpty_F"];
        if ( isNull _nObject ) then { throw 13; };
        _position = getPos _nObject;
        _position set [2, 0.0];
        _vehicleObject = [_vehicleClass, _position, (random 360), true, _pinCode] call ExileServer_object_vehicle_createPersistentVehicle;
    }
    else 
    {
         if (_vehicleClass isKindOf "Air") then 
           {
             _nObject = nearestObject [(getPosATL _playerObject), "Land_HelipadSquare_F"];
             if ( isNull _nObject ) then { throw 13; };
             _position3d = getPos _nObject;
             _position2d = [_position3d select 0, _position3d select 1];
           }
           else 
           {
             _nObject = nearestObject [(getPosATL _playerObject), "Sr_border"];
             if ( isNull _nObject ) then { throw 13; };
             _position3d = getPos _nObject;
             _position2d = [_position3d select 0, _position3d select 1];
           };
        _vehicleObject = [_vehicleClass, _position3d, (random 360), true, _pinCode] call ExileServer_object_vehicle_createPersistentVehicle;
    };    
    _vehicleObject setVariable ["ExileOwnerUID", (getPlayerUID _playerObject)];
    _vehicleObject setVariable ["ExileIsLocked",0];
    _vehicleObject lock 0;
    _vehicleObject call ExileServer_object_vehicle_database_insert;
    _vehicleObject call ExileServer_object_vehicle_database_update;
    _playerMoney = _playerMoney - _salesPrice;
    _playerObject setVariable ["ExileMoney", _playerMoney];
    format["setAccountMoney:%1:%2", _playerMoney, (getPlayerUID _playerObject)] call ExileServer_system_database_query_fireAndForget;
    [_sessionID, "purchaseVehicleResponse", [0, netId _vehicleObject, str _playerMoney]] call ExileServer_system_network_send_to;
}
catch 
{
    _responseCode = _exception;
    [_sessionID, "purchaseVehicleResponse", [_responseCode, "", ""]] call ExileServer_system_network_send_to;
};
if !(isNull _playerObject) then 
{
    _playerObject setVariable ["ExileMutex", false];
};
true

2. How do I edit this 
["LIB_US_GMC_Fuel",[6337.3,7772.24,305.079],[[0.835156,-0.549987,-0.00543257],[-0.00666711,-0.0199995,0.999778]],[false,false]], (output from sqf maca 3den editor)
so the players are not able to enter vehicle (with this they are but cant get out) ...  (or I saw on some Chernarus servers that when player auto enter the vehicle he was auto kicked from it)


2.1 They are aslo able to dismantle MGs that I put in the editor. Fix?


2.2 How do I edit the above or w/e I need to, so vehicles made from 3den editor dont have items inside. (The mods that server use, spawn items in them automatically)


3. How do I edit backpacks etc that respawn with items inside so they are empty (both from shops and lootspawns). (The mods that server use, spawn items in them automatically)


4. Often my player goes into auto prone position when Im close to traders/interactive things or just running up on things or down from them its very anoying, any ideas?

Idk if I should ask this kind a questions here but I know no one else will help me with them, so I would be really happy if you could fix some of them at least, thanks.
And sorry for my bad english :D

Edited by Cirilla Fiona Ellen Rianon

Share this post


Link to post
Share on other sites

I am sorry, but we cannot help you there. We are just too busy getting the next version done.

I have moved this to the community forums. I am sure you will get some help from the community.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.