Moin zusammen.
LeonZ, den ich über meinen server kennengelernt habe, hatte eine meiner Ideen umgesetzt und im Wasteland Forum vorgestellt.
Ich gebe euch mal den Original link, werde aber auch hier die jeweiligen sqf zeigen.
Es geht darum, dass auch eingenommene Gebiete als Spawnpunkte genutzt werden können.
Das Problem ist folgendes: solange ich im Editor bin und es teste, indem mein Rechner auch den Server darstellt, klappt es einwandfrei. Auf'm Server hingegen erscheinen die eingenommenen Gebiete nicht in der Auswahl.
Ich habe die Scripte bestimmt schon 20 Mal gecheckt, ob es irgendwo n Typo gibt. Oder ob es irgendwo eine Abhängigkeit gibt bzgl Dedi gibt ... ohne Erfolg.
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Version: 1.0
// @file Name: spawnAction.sqf
// @file Author: [404] Deadbeat, [KoS] Bewilderbeest, AgentRev
// @file Created: 20/11/2012 05:19
// @file Args: [int(type of spawn)]
#define respawn_Content_Text 3401
#define respawn_Random_Button 3413
#define respawn_Preload_Checkbox 3416
#define respawn_Locations_Type 3449
#define respawn_Locations_List 3450
#define respawn_Spawn_Button 3453
disableSerialization;
if (!isNil "spawnActionHandle" && {typeName spawnActionHandle == "SCRIPT"} && {!scriptDone spawnActionHandle}) exitWith {};
spawnActionHandle = (_this select 1) spawn
{
disableSerialization;
private ["_switch", "_data"];
_switch = _this select 0;
_data = [_this select 1, false];
if (isNil "playerData_resetPos") then
{
// Deal with money here
_baseMoney = ["A3W_startingMoney", 100] call getPublicVar;
//player setVariable ["cmoney", _baseMoney, true];
[player, _baseMoney, true] call A3W_fnc_setCMoney;
if (["A3W_survivalSystem"] call isConfigOn) then
{
[MF_ITEMS_CANNED_FOOD, 1] call mf_inventory_add;
[MF_ITEMS_WATER, 1] call mf_inventory_add;
};
[MF_ITEMS_REPAIR_KIT, 1] call mf_inventory_add;
};
if (cbChecked ((uiNamespace getVariable "RespawnSelectionDialog") displayCtrl respawn_Preload_Checkbox)) then
{
_data set [1, true];
}
else
{
profileNamespace setVariable ["A3W_preloadSpawn", false];
};
switch (_switch) do
{
case 1: { _data call spawnInTown };
case 2: { _data call spawnOnBeacon };
case 3: { _data call spawnOnTerritory }; // skydive
default { _data call spawnRandom };
};
if (isNil "client_firstSpawn") then
{
execVM "client\functions\firstSpawn.sqf";
};
};
private ["_dialog", "_ctrlButton", "_header", "_spawnActionHandle"];
_dialog = uiNamespace getVariable ["RespawnSelectionDialog", displayNull];
_header = _dialog displayCtrl respawn_Content_Text;
//_ctrlButton = (uiNamespace getVariable "RespawnSelectionDialog") displayCtrl (_this select 0);
if (cbChecked (_dialog displayCtrl respawn_Preload_Checkbox)) then
{
_header ctrlSetStructuredText parseText "<t size='0.5'> <br/></t><t size='1.33'>Preloading spawn...</t>";
};
if (typeName spawnActionHandle == "SCRIPT") then
{
_spawnActionHandle = spawnActionHandle;
waitUntil {scriptDone _spawnActionHandle};
spawnActionHandle = nil;
};
//if (!isNull _ctrlButton) then
//{
_header ctrlSetStructuredText parseText "It appears there was an error,<br/>please try again.";
{
(_dialog displayCtrl _x) ctrlEnable true;
} forEach [respawn_Random_Button, respawn_Spawn_Button, respawn_Locations_Type, respawn_Locations_List, respawn_Preload_Checkbox];
//};
Display More
client\functions\clientCompile.sqf
server\default_config.sqf
client\functions\spawnOnTerritory.sqf
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Version: 1.0
// @file Name: spawnOnTerritory.sqf
// @file Author: Leon
private ["_marker", "_height", "_index", "_territories", "_preload", "_pos", "_rad", "_territoryName", "_notInArea", "_playerPos"];
_marker = _this select 0;
_preload = param [1, false, [false]];
_height = (["A3W_spawnBeaconSpawnHeight", 0] call getPublicVar) max 0;
_territories = (call compile preprocessFileLineNumbers "mapConfig\territories.sqf");
_index = _territories findIf { _x select 0 == _marker };
_rad = selectMax (markerSize _marker);
_territoryName = _territories select _index select 1;
_pos = getMarkerPos _marker;
_playerPos = _pos;
_notInArea = true;
while { _notInArea } do
{
_playerPos = [_pos,5,_rad,1,0,0,0] call findSafePos;
if (_playerPos inArea _marker) then
{
_notInArea = false;
};
};
_playerPos set [2, if (_height < 25) then { 0 } else { _height }];
if (_preload) then { waitUntil {sleep 0.1; preloadCamera _playerPos} };
waitUntil {!isNil "bis_fnc_init" && {bis_fnc_init}};
player setPos _playerPos;
player setVariable [_marker + "_lastSpawn", diag_tickTime];
[player, _marker] remoteExecCall ["A3W_fnc_updateSpawnTimestamp", 2];
respawnDialogActive = false;
closeDialog 0;
_territoryName spawn
{
_territoryName = _this;
sleep 1;
_hour = date select 3;
_mins = date select 4;
["Wasteland", _territoryName, format ["%1:%3%2", _hour, _mins, if (_mins < 10) then {"0"} else {""}]] spawn BIS_fnc_infoText;
};
Display More