Hallo NN Community,
Ich habe ein Problem ich bin nähmlich von 3.1.4.8 auf 4.0 und auch teilweise 4.4 Datein herausgenommen jetzt habe ich das Problem wo man die Funkgeräte unsichtbar gemacht hat war in der 3.1.4.8 in der init_survival jedoch gibts die leider nicht mehr. Habe das bereits versucht in die fn_survival.sqf einzutragen jedoch ist glaube ich dieser Code nicht mehr gültig in der 4.0 - 4.4
Der Code:
Code
if(backpack player in ["reb_funk","beamten_funk"]) then {
(unitBackpack player) setObjectTextureGlobal [0,""]; };
if(playerSide == independent) then {(unitBackpack player) setObjectTextureGlobal [0,""];};
Hier die ganze Datei:
Code
#include <macro.h>
/*
Author: Bryan "Tonic" Boardwine
Description:
All survival? things merged into one thread.
*/
private["_fnc_food","_fnc_water","_foodTime","_waterTime","_bp","_walkDis","_lastPos","_curPos"];
[] spawn {
while {true} do {
sleep 300;
[] spawn SOCK_fnc_updateRequest;
};
};
_fnc_food = {
if(life_hunger < 2) then {player setDamage 1; hint localize "STR_NOTF_EatMSG_Death";}
else
{
_rnd = ceil(random(9));
SUB(life_hunger,_rnd);
[] call life_fnc_hudUpdate;
if(life_hunger < 2) then {player setDamage 1; hint localize "STR_NOTF_EatMSG_Death";};
switch(life_hunger) do {
case 30: {hint localize "STR_NOTF_EatMSG_1";};
case 20: {hint localize "STR_NOTF_EatMSG_2";};
case 10: {
hint localize "STR_NOTF_EatMSG_3";
if(EQUAL(LIFE_SETTINGS(getNumber,"enable_fatigue"),1)) then {player setFatigue 1;};
};
};
};
};
_fnc_water = {
if(life_thirst < 2) then {player setDamage 1; hint localize "STR_NOTF_DrinkMSG_Death";}
else
{
_rnd = ceil(random(9));
SUB(life_thirst,_rnd);
[] call life_fnc_hudUpdate;
if(life_thirst < 2) then {player setDamage 1; hint localize "STR_NOTF_DrinkMSG_Death";};
switch(life_thirst) do {
case 30: {hint localize "STR_NOTF_DrinkMSG_1";};
case 20: {
hint localize "STR_NOTF_DrinkMSG_2";
if(EQUAL(LIFE_SETTINGS(getNumber,"enable_fatigue"),1)) then {player setFatigue 1;};
};
case 10: {
hint localize "STR_NOTF_DrinkMSG_3";
if(EQUAL(LIFE_SETTINGS(getNumber,"enable_fatigue"),1)) then {player setFatigue 1;};
};
};
};
};
_markerCop = ["funk_cop_1","funk_cop_2","funk_cop_3","funk_cop_4"];
_markerEMS = ["funk_ems"];
_illegalmarkers = ["marker"];
if (playerSide != west) then {
{ deleteMarkerLocal _x; } forEach _markerCop;
};
if (playerSide == civilian) then {
{ deleteMarkerLocal _x; } forEach _markerEMS;
};
if (playerSide == west) then {
{ deleteMarkerLocal _x; } forEach _illegalmarkers;
};
//Setup the time-based variables.
_foodTime = time;
_waterTime = time;
_walkDis = 0;
_bp = "";
_lastPos = visiblePosition player;
_lastPos = (SEL(_lastPos,0)) + (SEL(_lastPos,1));
_lastState = vehicle player;
while {true} do {
/* Thirst / Hunger adjustment that is time based */
if((time - _waterTime) > 340) then {[] call _fnc_water; _waterTime = time;};
if((time - _foodTime) > 430) then {[] call _fnc_food; _foodTime = time;};
/* Adjustment of carrying capacity based on backpack changes */
if(EQUAL(backpack player,"")) then {
life_maxWeight = life_maxWeightT;
if(backpack player in ["tf_mr3000","A3L_ANPRC155"]) then {
(unitBackpack player) setObjectTextureGlobal [0,""]; };
if(playerSide == independent) then {(unitBackpack player) setObjectTextureGlobal [0,""];};
_bp = backpack player;
} else {
if(!(EQUAL(backpack player,"")) && {!(EQUAL(backpack player,_bp))}) then {
_bp = backpack player;
life_maxWeight = life_maxWeightT + (round(FETCH_CONFIG2(getNumber,CONFIG_VEHICLES,_bp,"maximumload") / 4));
};
};
/* Check if the player's state changed? */
if(vehicle player != _lastState OR {!alive player}) then {
[] call life_fnc_updateViewDistance;
_lastState = vehicle player;
};
/* Check if the weight has changed and the player is carrying to much */
if(life_carryWeight > life_maxWeight && {!isForcedWalk player}) then {
player forceWalk true;
if(EQUAL(LIFE_SETTINGS(getNumber,"enable_fatigue"),1)) then {player setFatigue 1;};
hint localize "STR_NOTF_MaxWeight";
} else {
if(isForcedWalk player) then {
player forceWalk false;
};
};
/* Travelling distance to decrease thirst/hunger which is captured every second so the distance is actually greater then 650 */
if(!alive player) then {_walkDis = 0;} else {
_curPos = visiblePosition player;
_curPos = (SEL(_curPos,0)) + (SEL(_curPos,1));
if(!(EQUAL(_curPos,_lastPos)) && {(vehicle player == player)}) then {
ADD(_walkDis,1);
if(EQUAL(_walkDis,650)) then {
_walkDis = 0;
SUB(life_thirst,5);
SUB(life_hunger,5);
[] call life_fnc_hudUpdate;
};
};
_lastPos = visiblePosition player;
_lastPos = (SEL(_lastPos,0)) + (SEL(_lastPos,1));
};
uiSleep 1;
};
Alles anzeigen
Vielen Dank im vorraus
Mfg Power lol