Hello guys
i'm having issue with this script:
/*
player radar script made by Shix http://exile.majormittens.co.uk/profile/4566-shix/
This script allows to scan their are for any near by players
Made for XM8 Apps http://exile.majormittens.co.uk/topic/9040-updated-xm8-apps/
*/
///////////////////////////
//CONFIG
/////////////////////////
_cooldownTime = 900; //cool down time on script in seconds (15 * 60 = 900) AKA 15 MINS
_onlyScanforXM8Online = false; //only scan for people who have the 8G network online true = yes false = no
_scanDistance = 1500; //area sround player to scan in meters
///////////////////////////
//CONFIG END
/////////////////////////
if(isNil "LastUsedCheck")then{
LastUsedCheck = 0;
};
if((LastUsedCheck == 0) || (diag_tickTime - LastUsedCheck > _cooldownTime))then{
_display = (findDisplay 24015) closeDisplay 0;
_playersNearby = 0;
_playerPos = getPos player;
{
_playerSelected = _x;
_playerSelectedPos = getPos _playerSelected;
if(_onlyScanforXM8Online)then{
if ((_playerSelected getVariable ["ExileXM8IsOnline", false]) isEqualTo true) then{
if(_playerPos distance _playerSelectedPos <= _scanDistance)then{
_playersNearby = _playersNearby + 1;
};
};
}
else
{
if(_playerPos distance _playerSelectedPos <= _scanDistance)then{
_playersNearby = _playersNearby + 1;
};
};
} forEach allPlayers - [player];
LastUsedCheck = diag_tickTime;
['Success',[format['There are %1 player(s) nearby ',_playersNearby]]] call ExileClient_gui_notification_event_addNotification;
};
i have a option in player inventory to click to execute this script
which is:
/**
* ExileClient_object_player_event_onInventoryOpened
*
* Exile Mod
* exile.majormittens.co.uk
* © 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/.
*/
private["_cancelEvent","_container"];
_cancelEvent = false;
_container = _this select 1;
//Inventory Buttons by Andrew_S90 Start
_inventory = [] spawn {
disableSerialization;
waitUntil { !(isNull (findDisplay 602)) };
_button1 = (findDisplay 602) ctrlCreate ["RscButtonMenu",44927];
_button1 ctrlSetPosition [2*(((safezoneW/safezoneH)min 1.2)/40)+(safezoneX+(safezoneW-((safezoneW/safezoneH)min 1.2))/2),
26.1*((((safezoneW/safezoneH)min 1.2)/1.2)/25)+(safezoneY+(safezoneH-(((safezoneW/safezoneH)min 1.2)/1.2))/2),
8.5*(((safezoneW/safezoneH)min 1.2)/40),
1*((((safezoneW/safezoneH)min 1.2)/1.2)/25)];
_button1 ctrlCommit 0;
_button1 ctrlSetText "SCAN AREA";
_button1 buttonSetAction "execVM 'fixes\playerScan.sqf'";
_button2 = (findDisplay 602) ctrlCreate ["RscButtonMenu",44928];
_button2 ctrlSetPosition [10*(((safezoneW/safezoneH)min 1.2)/40)+(safezoneX+(safezoneW-((safezoneW/safezoneH)min 1.2))/2),
26.1*((((safezoneW/safezoneH)min 1.2)/1.2)/25)+(safezoneY+(safezoneH-(((safezoneW/safezoneH)min 1.2)/1.2))/2),
8.5*(((safezoneW/safezoneH)min 1.2)/40),
1*((((safezoneW/safezoneH)min 1.2)/1.2)/25)];
_button2 ctrlCommit 0;
_button2 ctrlSetText "SPAWN BIKE";
_button2 buttonSetAction "execVM 'fixes\spawn_bike.sqf'";
};
//Inventory Buttons by Andrew_S90 End
if (ExileClientIsHandcuffed) then
{
_cancelEvent = true;
}
else
{
if (ExileClientActionDelayShown) then
{
_cancelEvent = true;
}
else
{
if (ExileClientIsInConstructionMode) then
{
_cancelEvent = true;
}
else
{
if ((locked _container) isEqualTo 2) then
{
_cancelEvent = true;
}
else
{
if (_container getVariable ["ExileIsLocked", 1] isEqualTo -1) then
{
_cancelEvent = true;
}
else
{
ExileClientInventoryOpened = true;
ExileClientCurrentInventoryContainer = _container;
};
};
};
};
};
_cancelEvent // OKAY!
when i click on the button it not respond.. the bike thingy is working fine