Jump to content
  • 0

Trader Menu Lagging a bit Arma 2 Epoch Chernarus 1.0.5.1


eXo2610

Question

Hey Guys, i have a own server.

 

The Trader are working very well, you can buy - sell everything okay.

 

But sometimes if you click maybe the Blackmarket Trader. Close the Menü - run to Ammo Trader and click him the window from the Blackmarket Trader appears.

 

Then u have to go away, scroll as long as  the Trader Menu disappears in the Scroll Menu and click the Trader again.

 

If you need some files or something maybe trader cfg etc. i can upload it for u.

 

thanks for your help anyway! :) 

 

eXo

Link to comment
Share on other sites

24 answers to this question

Recommended Posts

  • 0

alright i cleared the file. fixed the jumpscript , startet the server - connected. 

 

and here is the rpt file again:

 

http://pastebin.com/LMTK4dj8

 

erm, now i know how to fix the zombiesfindtargets etc. erm im gonna fix some things, and then i post again here!:) but if u know why my trader are bugging some times or the databank reset players at spawns u can tell me :) :P 

 

MANY THANKS ANYWAY!:) im gonna fix some thinks now :**

Link to comment
Share on other sites

  • 0

here the fn_selfactions

 

http://pastebin.com/75j8i8vz

 

 

i have a question rpt file have many errors in some lines ->

 

  Error Undefined variable in expression: fnc_lightpoint
File mpmissions\__CUR_MP.Chernarus\scripts\lights\house_lights.sqf, line 43
2nd UV set needed, but not defined in ReportStack not available
"PLOGIN: Login loop completed!"
Error in expression <sirens,2,false,true,"",""];
};
} else {
dayz_addsirens removeAction s_player_sir>
  Error position: <dayz_addsirens removeAction s_player_sir>
  Error Undefined variable in expression: dayz_addsirens
File mpmissions\__CUR_MP.Chernarus\fixes\fn_selfActions.sqf, line 54
Error in expression <", ""];
};
} else {
player removeAction s_player_deploybike6;
s_player_deploybik>
  Error position: <s_player_deploybike6;
s_player_deploybik>
  Error Undefined variable in expression: s_player_deploybike6
File mpmissions\__CUR_MP.Chernarus\fixes\fn_selfActions.sqf, line 68
Error in expression <", ""];
};
} else {
player removeAction s_player_deploybike5;
s_player_deploybik>
  Error position: <s_player_deploybike5;
s_player_deploybik>
  Error Undefined variable in expression: s_player_deploybike5
File mpmissions\__CUR_MP.Chernarus\fixes\fn_selfActions.sqf, line 77
Error in expression <", ""];
};
} else {
player removeAction s_player_deploybike4;
s_player_deploybik>
  Error position: <s_player_deploybike4;
s_player_deploybik>
  Error Undefined variable in expression: s_player_deploybike4
File mpmissions\__CUR_MP.Chernarus\fixes\fn_selfActions.sqf, line 86
Error in expression <", ""];
};
} else {
player removeAction s_player_deploybike3;
s_player_deploybik>
  Error position: <s_player_deploybike3;
s_player_deploybik>
  Error Undefined variable in expression: s_player_deploybike3
File mpmissions\__CUR_MP.Chernarus\fixes\fn_selfActions.sqf, line 95
Error in expression <", ""];
};
} else {
player removeAction s_player_deploybike2;
s_player_deploybik>
  Error position: <s_player_deploybike2;
s_player_deploybik>
  Error Undefined variable in expression: s_player_deploybike2
File mpmissions\__CUR_MP.Chernarus\fixes\fn_selfActions.sqf, line 104
Error in expression <v22_close;
mv22_close = -1;
};
} else {
themv22 removeAction mv22_fold;
mv22_fol>
  Error position: <themv22 removeAction mv22_fold;
mv22_fol>
  Error Undefined variable in expression: themv22
File mpmissions\__CUR_MP.Chernarus\fixes\fn_selfActions.sqf, line 133
Error in expression <open.sqf","",5,false,true];
};
} else {
thesuv removeAction suv_close;
suv_close>
  Error position: <thesuv removeAction suv_close;
suv_close>
  Error Undefined variable in expression: thesuv
File mpmissions\__CUR_MP.Chernarus\fixes\fn_selfActions.sqf, line 157
Error in expression <er_fuelauto2 = -1;
 
player removeAction s_player_getTargetUID;
s_player_getTarge>
  Error position: <s_player_getTargetUID;
s_player_getTarge>
  Error Undefined variable in expression: s_player_gettargetuid
File mpmissions\__CUR_MP.Chernarus\fixes\fn_selfActions.sqf, line 1125
Error in expression <"",""];
};
 
can i search the lines and just delete them? then the errors wont appear again.
 
thanks!
Link to comment
Share on other sites

  • 0

ok in your fn_selfactions.sqf

 

replace this part

if(AnimatedSUVMV22)then{
        //animated mv22/suv hatch
        if (_inVehicle and (_vehicle isKindOf "MV22")) then {
           if (isEngineOn _vehicle) then {[_vehicle,0] call mv22_pack;};
           if (mv22_fold < 0) then {
                 themv22 = _vehicle;
                 if !(isEngineOn themv22) then {
                   mv22_fold = themv22 addAction ["Fold","scripts\animate\mv22_fold.sqf","",5,false,true];
                   mv22_unfold = themv22 addAction ["UnFold","scripts\animate\mv22_unfold.sqf","",5,false,true];
                   mv22_open = themv22 addAction ["Open Ramp","scripts\animate\mv22_open.sqf","",5,false,true];
                   mv22_close = themv22 addAction ["Close Ramp","scripts\animate\mv22_close.sqf","",5,false,true];
                 };
           };
           if (isEngineOn themv22) then {
                 themv22 removeAction mv22_fold;
                 mv22_fold = -1;
                 themv22 removeAction mv22_unfold;
                 mv22_unfold = -1;
                 themv22 removeAction mv22_open;
                 mv22_open = -1;
                 themv22 removeAction mv22_close;
                 mv22_close = -1;
           };
        } else {
           themv22 removeAction mv22_fold;
           mv22_fold = -1;
           themv22 removeAction mv22_unfold;
           mv22_unfold = -1;
           themv22 removeAction mv22_open;
           mv22_open = -1;
           themv22 removeAction mv22_close;
           mv22_close = -1;
        };
 
        if (_inVehicle and (_vehicle isKindOf "ArmoredSUV_Base_PMC")) then {
           if ((_vehicle animationPhase "HideGun_01") == 1) then {
                 _unit = _vehicle turretUnit [0];
                 if (!(isNull _unit)) then {
                   _unit action ["moveToCargo",_vehicle,2];
                   titleText ["\n\nYou must open the hatch first.","PLAIN DOWN"];titleFadeOut 4;
                 };
           };
           if (suv_close < 0) then {
                 thesuv = _vehicle;
                 suv_close = thesuv addAction ["Close Hatch","scripts\animate\suv_close.sqf","",5,false,true];
                 suv_open = thesuv addAction ["Open Hatch","scripts\animate\suv_open.sqf","",5,false,true];
           };
        } else {
           thesuv removeAction suv_close;
           suv_close = -1;
           thesuv removeAction suv_open;
           suv_open = -1;
        };
}; 

with this:

if(AnimatedSUVMV22)then{
        //animated mv22/suv hatch
        if (_inVehicle and (_vehicle isKindOf "MV22")) then {
           if (isEngineOn _vehicle) then {[_vehicle,0] call mv22_pack;};
           if (mv22_fold < 0) then {
                 themv22 = _vehicle;
                 if !(isEngineOn themv22) then {
                   mv22_fold = themv22 addAction ["Fold","scripts\animate\mv22_fold.sqf","",5,false,true];
                   mv22_unfold = themv22 addAction ["UnFold","scripts\animate\mv22_unfold.sqf","",5,false,true];
                   mv22_open = themv22 addAction ["Open Ramp","scripts\animate\mv22_open.sqf","",5,false,true];
                   mv22_close = themv22 addAction ["Close Ramp","scripts\animate\mv22_close.sqf","",5,false,true];
                 };
           };
           if (isEngineOn themv22) then {
                 themv22 removeAction mv22_fold;
                 mv22_fold = -1;
				 mv22_close = -1;
                 themv22 removeAction mv22_unfold;
                 mv22_unfold = -1;
                 themv22 removeAction mv22_open;
                 mv22_open = -1;
                 themv22 removeAction mv22_close;
                 mv22_close = -1;
           };

        };
 
        if (_inVehicle and (_vehicle isKindOf "ArmoredSUV_Base_PMC")) then {
           if ((_vehicle animationPhase "HideGun_01") == 1) then {
                 _unit = _vehicle turretUnit [0];
                 if (!(isNull _unit)) then {
                   _unit action ["moveToCargo",_vehicle,2];
                   titleText ["\n\nYou must open the hatch first.","PLAIN DOWN"];titleFadeOut 4;
                 };
           };
           if (suv_close < 0) then {
                 thesuv = _vehicle;
                 suv_close = thesuv addAction ["Close Hatch","scripts\animate\suv_close.sqf","",5,false,true];
                 suv_open = thesuv addAction ["Open Hatch","scripts\animate\suv_open.sqf","",5,false,true];
           };
        };
};

in your variables.sqf

 

find

s_player_fire =			-1; 

and above:

 mv22_fold = -1;
 mv22_unfold = -1;
 mv22_open = -1;
 mv22_close = -1;
 suv_close = -1;
 suv_open = -1;

this should clean these errors

Link to comment
Share on other sites

  • 0

hej, na i know why the erros appear because the script/animate folder doesnt exist. i dont know why i deleted it O.o 

i copyed it already in. after the next restart im gonna check it. im sure because of this the open/close dont work :)

 

BUT thanks ! if it wont work, im gonna work with your answer above!:) 

 

erm maybe u can help me with the traderS?

 

the window where you can buy/sell items, sometimes appears at the other trader too.

 

if you buy a car and fast run to ammo npc - click him  - the trader menu from car trader appears :P

Link to comment
Share on other sites

  • 0

i fixed lot of things. the trader bug only appears sometimes now! :)  maybe 1 of 10 times, i think if im gonna fix more of the rpt errors im gonna fix it, erm got a question.

 

u know how to fix this rpt error?

 

 
if ( AGN_safe>
  Error Undefined variable in expression: _if
File mpmissions\__CUR_MP.Chernarus\safezone\agn_SafeZoneCommander.sqf, line 169
Error in expression <FindDisplay 106) };
};
};
if ( _skip && _if ) then {
 
};
};
};
};
 
i found some answers from zuba, but that dont helps me. :/
Link to comment
Share on other sites

  • 0

 

/*

 * Safezone Commander Script by AlienX
 * www.opendayz.net
 * Thanks to everyone who has provided other scripts of the same format, without you I would not have been able to make this.
 */
 
diag_log ( "[AGN] Starting Trader City Safezone Commander!" );
 
if ( isDedicated || isServer ) exitWith {diag_log ( "Error: Attempting to start AGN products on a server where it should not be!" );}; 
 
Private ["_EH_Fired", "_ehID", "_fix","_inVehicle","_inVehicleLast","_EH_Fired_Vehicle",
"_inVehicleDamage","_antiBackpackThread","_antiBackpackThread2"];
 
private ["AGN_safeZoneGodmode","AGN_safeZoneMessages","AGN_safeZone_Backpack_AllowGearFromLootPiles",
"AGN_safeZone_Backpack_AllowGearFromVehicles","AGN_safeZone_Backpack_AllowGearFromDeadPlayers",
"AGN_safeZone_Vehicles_DisableMountedGuns","AGN_safeZone_Players_DisableWeaponFiring",
"AGN_safeZone_Backpack_EnableAntiBackpack","AGN_safeZone_Vehicles_AllowGearFromWithinVehicles"];
 
 
//SCRIPT SETTINGS
AGN_safeZoneDebug = false; //Debug notes on screen.
AGN_safeZoneGodmode = true; //Should safezone Godmode be enabled?
AGN_safeZoneMessages = true; //Should players get messages when entering and exiting the safe zone?
AGN_safeZone_Backpack_EnableAntiBackpack = true; //Should players not be able to take from peoples bags?
AGN_safeZone_Backpack_AllowGearFromLootPiles = true; //Should players be able to loot from loot piles?
AGN_safeZone_Backpack_AllowGearFromVehicles = true; //Should players be able to loot from a vehicles gear?
AGN_safeZone_Backpack_AllowGearFromDeadPlayers = true; //Should players be able to loot from a dead players corpse?
AGN_safeZone_Backpack_AllowFriendlyTaggedAccess = true; //Should players who are tagged friendly be able to access eachothers bags?
AGN_safeZone_Vehicles_DisableMountedGuns = false; //Should players not be able to shoot bullets/projectiles from mounted guns?
AGN_safeZone_Vehicles_AllowGearFromWithinVehicles = true; //Should players be able to open the gear screen while they are inside a vehicle?
AGN_safeZone_Players_DisableWeaponFiring = true; //Should players not be able to shoot bullets/projectiles from their weapon(s)?
 
//Probs not needed, but meh :)
disableSerialization;
 
waitUntil {!isNil "dayz_animalCheck"};
if ( AGN_safeZoneMessages ) then { systemChat ( "Trader Safezones active!" ); };
 
_inVehicle = objNull;
_inVehicleLast = objNull;
 
while {true} do {
 
waitUntil { !canBuild };
 
_inSafezoneFinished = false;
if ( AGN_safeZoneMessages ) then { systemChat ("Entering Trader Area - God Mode active!"); };
_thePlayer = player;
 
if ( AGN_safeZoneGodmode ) then
{
player_zombieCheck = {};
fnc_usec_damageHandler = {};
_thePlayer removeAllEventHandlers "handleDamage";
_thePlayer addEventHandler ["handleDamage", {false}];
_thePlayer allowDamage false;
};
 
if ( AGN_safeZone_Players_DisableWeaponFiring ) then
{
_EH_Fired = _thePlayer addEventHandler ["Fired", {
systemChat ("You can not fire your weapon in a Trader City Area");
NearestObject [_this select 0,_this select 4] setPos[0,0,0];
}];
};
 
if ( AGN_safeZone_Backpack_EnableAntiBackpack ) then
{
AGN_LastPlayerLookedAt = objNull;
AGN_LastPlayerLookedAtCountDown = 5;
_antiBackpackThread = [] spawn {
private [ "_ct","_ip","_ia","_dis"] ;
while {!canBuild} do
{
if ( isNull AGN_LastPlayerLookedAt ) then
{
waitUntil {!isNull cursorTarget};
_ct = cursorTarget;
_ip = isPlayer _ct;
if ( _ip ) then { _ia = alive _ct; _dis = _ct distance player; } else { _ia = false; _dis = 1000; };
 
if ( (_ip && _ia) && (_dis < 6.5) ) then
{
AGN_LastPlayerLookedAt = _ct;
};
} else {
AGN_LastPlayerLookedAtCountDown = AGN_LastPlayerLookedAtCountDown - 1;
if ( AGN_LastPlayerLookedAtCountDown < 0 ) then { AGN_LastPlayerLookedAtCountDown = 5; AGN_LastPlayerLookedAt = objNull; };
sleep 1;
};
};
};
 
_antiBackpackThread2 = [] spawn {
private ["_to","_dis","_inchk","_ip","_ia","_skip","_ct","_iv","_lp","_inv","_ctOwnerID","_friendlies","_if"];
_ctOwnerID = 0;
while {!canBuild} do
{
_ct = cursorTarget;
_skip = false;
 
if ( !isNull (_ct) ) then
{
_to = typeOf _ct;
_dis = _ct distance player;
_inchk = ["WeaponHolder","ReammoBox"];
 
_lp = false;
{
if ( (_to isKindOf _x) && (_dis < 10) && AGN_safeZone_Backpack_AllowGearFromLootPiles ) then
{
_lp = true;
};
} forEach ( _inchk );
 
_ip = isPlayer _ct;
_ia = alive _ct;
_iv = _ct isKindOf "AllVehicles";
_inv = (vehicle player != player);
 
_if = false;
if ( _ip ) then {
_ctOwnerID = _ct getVariable["CharacterID","0"];
_friendlies = player getVariable ["friendlyTo",[]];
if(_ctOwnerID in _friendlies) then {
if ( AGN_safeZone_Backpack_AllowFriendlyTaggedAccess ) then
{
_if = true;
};
};
};
if ( AGN_safeZoneDebug ) then {
hintSilent ( format["AGN Safezone Commander\n\nCursorTarget\n%1\n\nDistance\n%2\n\nLootpile\n%3 [%9]\n\nisPlayer\n%4\n\nAlive\n%5\n\nisVehicle\n%6\n\ninVehicle\n%7\n\nisFriendly\n%8 (%12) [%10]\n\nSkip: %11\n",
                                                _ct, _dis, _lp, _ip, _ia, _iv, _inv, _if, AGN_safeZone_Backpack_AllowGearFromLootPiles, AGN_safeZone_Backpack_AllowFriendlyTaggedAccess, _skip, _ctOwnerID] );
};
 
 
//Lootpile check
if ( _lp ) then {_skip = true;};
 
//Dead body check
if ( !(_ia) && AGN_safeZone_Backpack_AllowGearFromDeadPlayers ) then {_skip = true;};
 
//Vehicle check
if ( _iv && (_dis < 10) && !(_ip) && AGN_safeZone_Backpack_AllowGearFromVehicles ) then {_skip = true;};
 
//In a vehicle check
if ( _inv && AGN_safeZone_Vehicles_AllowGearFromWithinVehicles ) then { _skip = true; };
 
//Is player friendly?
if ( _if ) then { _skip = true; };
};
 
if( !isNull (FindDisplay 106) && !_skip ) then
{
if ( isNull AGN_LastPlayerLookedAt ) then
{
(findDisplay 106) closeDisplay 1;
waitUntil { isNull (FindDisplay 106) };
createGearDialog [(player), 'RscDisplayGear'];
 
waitUntil { isNull (FindDisplay 106) };
} else {
if ( AGN_safeZoneMessages ) then { systemChat (format["You cannot open your gear at this time as you have looked at a player in the last 5 seconds."]); };
(findDisplay 106) closeDisplay 1;
waitUntil { isNull (FindDisplay 106) };
};
};
if ( _skip && _if ) then {
 
};
};
};
};
 
if ( AGN_safeZone_Vehicles_DisableMountedGuns ) then
{
while { !canBuild } do
{
sleep 0.1;
if ( !(isNull _inVehicle) && (vehicle player == player) ) then
{
_inVehicle removeEventHandler ["Fired", _EH_Fired_Vehicle];
_inVehicleLast = _inVehicle;
_inVehicleLast removeEventHandler ["Fired", _EH_Fired_Vehicle];
_inVehicle = objNull;
};
 
if ( vehicle player != player && isNull _inVehicle ) then
{
if (AGN_safeZoneMessages) then { systemChat ( "Vehicle Weapons deactivated!" ); };
_inVehicle = vehicle player;
_inVehicleDamage = getDammage _inVehicle;
_EH_Fired_Vehicle = _inVehicle addEventHandler ["Fired", {
systemChat ("You can not fire your vehicles weapon in a Trader City Area");
NearestObject [_this select 0,_this select 4] setPos[0,0,0];
}];
};
};
} else {
waitUntil { canBuild };
};
 
AGN_LastPlayerLookedAt = objNull;
AGN_LastPlayerLookedAtCountDown = 5;
terminate _antiBackpackThread;
terminate _antiBackpackThread2;
if ( AGN_safeZoneMessages ) then { systemChat ("Exiting Trader Area - God Mode deactivated!"); };
 
if ( AGN_safeZone_Vehicles_DisableMountedGuns ) then
{
if ( !(isNull _inVehicle) ) then
{
if ( AGN_safeZoneMessages ) then { systemChat ( "Vehicle Weapons active!" ); };
_inVehicle removeEventHandler ["Fired", _EH_Fired_Vehicle];
};
 
if ( !(isNull _inVehicleLast) ) then
{
if ( AGN_safeZoneMessages ) then { systemChat ( "Vehicle Weapons active!" ); };
_inVehicleLast removeEventHandler ["Fired", _EH_Fired_Vehicle];
};
};
 
if ( AGN_safeZone_Players_DisableWeaponFiring ) then
{
_thePlayer removeEventHandler ["Fired", _EH_Fired];
};
 
if ( AGN_safeZoneGodmode ) then
{
player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf";
fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf";
_thePlayer addEventHandler ["handleDamage", {true}];
_thePlayer removeAllEventHandlers "handleDamage";
_thePlayer allowDamage true;
};
_inSafezoneFinished = true;
};
Link to comment
Share on other sites

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
  • Advertisement
  • Discord

×
×
  • Create New...