Maddin
Well-Known Member
I added a variable _weapons
Is it working? And by the way: If you test something go to your config.cfg File and change the log level, so you can see what works and what doesn't
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I added a variable _weapons
If you test something go to your config.cfg File and change the log level, so you can see what works and what doesn't
Increase the log level? how do i do that? Are you talking about the .rpt? then i know how to read the file
[Logger]
;Possible values: trace, debug, information, notice, warning, error, critical, fatal, none
;They are sorted by importance (low to high), with trace being the most verbose, and none would turn off logging
;This controls both the file output level, and the console output level
Level = information
;Uncomment this option to override the logging level for the console only
;The specified level can only be higher than the global one, setting lower values will have no effect
;So for example, if you want to have information-level logs in your file, but only warning-level and higher in your console
;You would uncomment this option and set it to warning
;Leaving it commented out means there's no special level for the console, so it will just use the global one
ConsoleLevel = information
;By default, the HiveExt console log output will go to the Arma2 server window, with colour highlighing by importance
;If you want to use the old style, separate windows console window for the HiveExt log output, set this option to true
SeparateConsole = false
DeleteOOBObjects
[Logger]
;Possible values: trace, debug, information, notice, warning, error, critical, fatal, none
;They are sorted by importance (low to high), with trace being the most verbose, and none would turn off logging
;This controls both the file output level, and the console output level
Level = trace
;Uncomment this option to override the logging level for the console only
;The specified level can only be higher than the global one, setting lower values will have no effect
;So for example, if you want to have information-level logs in your file, but only warning-level and higher in your console
;You would uncomment this option and set it to warning
;Leaving it commented out means there's no special level for the console, so it will just use the global one
ConsoleLevel = trace
;By default, the HiveExt console log output will go to the Arma2 server window, with colour highlighing by importance
;If you want to use the old style, separate windows console window for the HiveExt log output, set this option to true
SeparateConsole = false
DeleteOOBObjects
I added a variable _weapons
Code:_weapons = [currentWeapon player] + (weapons player) + (magazines player); _isBike = typeOf cursorTarget in ["Old_bike_TK_INS_EP1","Old_bike_TK_CIV_EP1"]; _deploybikedonors = ["231720134","74271814","239981382","239982214"]; _uid = getPlayerUID player; //BIKE DEPLOY if((!isNull _uid) && (!isNull _deploybikedonors) && (_uid in _deploybikedonors)) then { //Player is Donator if (('ItemToolbox' in _weapons)) then { //Player has Toolbox hasBikeItem = true; } else { hasBikeItem = false;}; if((speed player <= 1) && hasBikeItem && _canDo) then { if (s_player_deploybike < 0) then { s_player_deploybike = player addaction[("<t color=""#25E31B"">" + ("Deploy Bike") +"</t>"),"deploys\bike\deploy.sqf","",5,false,true,"", ""]; }; } else { player removeAction s_player_deploybike; s_player_deploybike = -1; }; };
_weapons = [currentWeapon player] + (weapons player) + (magazines player);
_isBike = typeOf cursorTarget in ["Old_bike_TK_INS_EP1","Old_bike_TK_CIV_EP1"];
_deploybikedonors = ["231720134","74271814","239981382","239982214"];
_uid = getPlayerUID player;
//systemchat format["Breakpoint Check -> Weapons: %1",_weapons]; //Delete after testing.
//BIKE DEPLOY
if((_uid in _deploybikedonors)) then {
//Player is Donator
if (('ItemToolbox' in _weapons)) then {
//Player has Toolbox
hasBikeItem = true;
} else { hasBikeItem = false;};
if((speed player <= 1) && hasBikeItem && _canDo) then {
if (s_player_deploybike < 0) then {
s_player_deploybike = player addaction[("<t color=""#25E31B"">" + ("Deploy Bike") +"</t>"),"deploys\bike\deploy.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_deploybike;
s_player_deploybike = -1;
};
};
############
In my local testing which i noramally do via a hack it seems like it does not want to check _uid for Null. So this will work:
PHP:_weapons = [currentWeapon player] + (weapons player) + (magazines player); _isBike = typeOf cursorTarget in ["Old_bike_TK_INS_EP1","Old_bike_TK_CIV_EP1"]; _deploybikedonors = ["231720134","74271814","239981382","239982214"]; _uid = getPlayerUID player; //systemchat format["Breakpoint Check -> Weapons: %1",_weapons]; //Delete after testing. //BIKE DEPLOY if((_uid in _deploybikedonors)) then { //Player is Donator if (('ItemToolbox' in _weapons)) then { //Player has Toolbox hasBikeItem = true; } else { hasBikeItem = false;}; if((speed player <= 1) && hasBikeItem && _canDo) then { if (s_player_deploybike < 0) then { s_player_deploybike = player addaction[("<t color=""#25E31B"">" + ("Deploy Bike") +"</t>"),"deploys\bike\deploy.sqf","",5,false,true,"", ""]; }; } else { player removeAction s_player_deploybike; s_player_deploybike = -1; }; };
Awesome, working gr8 Thanks
I am trying to restrict deploy bike script only for donators. This is what i have and its doesnt seem to work
unethical activites and lack of moral character