Moin moin liebe Community,
und zwar habe ich das große Problem das ich es nicht umgestellt bekomme das die Polizei Slots alle Whitlistet sind und noch viel schlimmer das Problem das wenn man nachm Login Spawnt das man zuerst auf der Spawninsel landet und nach dem man Respawnt kann man sich auswählen wo man Spawnt ( Die HQ'S)
Ich hoffe jemand von euch kann mir helfen.
fn_initCop.sqf
#include "..\script_macros.hpp"
/*
File: fn_initCop.sqf
Author: Bryan "Tonic" Boardwine
Description:
Cop Initialization file.
*/
private["_end"];
player addRating 9999999;
waitUntil {!(isNull (findDisplay 46))};
_end = false;
if(life_blacklisted) exitWith
{
["Blacklisted",false,true] call BIS_fnc_endMission;
sleep 30;
};
if(!(str(player) in ["cop_1","cop_2","cop_3","cop_4","cop_5"])) then {
if((__GETC__(life_coplevel) < 5) && (__GETC__(life_adminlevel) == 0)) then {
["NotWhitelisted",false,true] call BIS_fnc_endMission;
sleep 35;
};
};
[] call life_fnc_spawnMenu;
waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
fn_spawnPointCfg.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_spawnPointCfg.sqf
Author: Bryan "Tonic" Boardwine
Description:
Master configuration for available spawn points depending on the units side.
Return:
[Spawn Marker,Spawn Name,Image Path]
*/
params [["_side",civilian,[civilian]]];
_side = switch (_side) do {
case west: {"Cop"};
case independent: {"Medic"};
default {"Civilian"};
};
private _return = [];
private _spawnCfg = missionConfigFile >> "CfgSpawnPoints" >> worldName >> _side;
for "_i" from 0 to count(_spawnCfg)-1 do {
private _tempConfig = [];
private _curConfig = (_spawnCfg select _i);
private _conditions = getText(_curConfig >> "conditions");
private _flag = [_conditions] call life_fnc_levelCheck;
if (_flag) then {
_tempConfig pushBack getText(_curConfig >> "spawnMarker");
_tempConfig pushBack getText(_curConfig >> "displayName");
_tempConfig pushBack getText(_curConfig >> "icon");
_return pushBack _tempConfig;
};
};
if (playerSide isEqualTo civilian) then {
if (count life_houses > 0) then {
{
_pos = call compile format ["%1",(_x select 0)];
_house = nearestObject [_pos, "House"];
_houseName = getText(configFile >> "CfgVehicles" >> (typeOf _house) >> "displayName");
_return pushBack [format ["house_%1",_house getVariable "uid"],_houseName,"\a3\ui_f\data\map\MapControl\lighthouse_ca.paa"];
true
} count life_houses;
};
};
_return;