condition = "(((getNumber (missionConfigFile >> ""The_Programmer_Settings_Iphone"" >> ""dispatch_script_enable"")) isEqualTo 1) && !(playerSide isEqualTo civilian))";
condition = "(((getNumber (missionConfigFile >> ""The_Programmer_Settings_Iphone"" >> ""dispatch_script_enable"")) isEqualTo 1) && (!(playerSide isEqualTo civilian) || (missionNameSpace getVariable [""license_civ_depanneur"",false])))";
_var = switch (playerSide) do {
case west : {maxence_waiting_cop_calls};
case independent : {maxence_waiting_med_calls};
case east : {maxence_waiting_east_calls};
default {[]};
};
if (missionNamespace getVariable ["license_civ_depanneur",false]) then {_var = maxence_waiting_dep_calls;};
if (playerSide in [west,independent]) then {_allow = true};
if (missionNamespace getVariable ["license_civ_depanneur",false]) then {_allow = true};
_newVar = switch (playerSide) do {
case west : {maxence_waiting_cop_calls};
case independent : {maxence_waiting_med_calls};
case east : {maxence_waiting_east_calls};
default {[]};
};
if (missionNamespace getVariable ["license_civ_depanneur",false]) then {_newVar = maxence_waiting_dep_calls;};
maxence_waiting_dep_calls = [];
publicVariable "maxence_waiting_dep_calls";
[_message,"**********",6,"",player] remoteExec ["max_phone_fnc_clientMessage",-2];
maxence_waiting_dep_calls pushBack ["**********","",_message,servertime,"",player,0];
publicVariable "maxence_waiting_dep_calls";
[_message,_fromNum,6,(mapGridPosition player),player] remoteExec ["max_phone_fnc_clientMessage",-2];
maxence_waiting_dep_calls pushBack [(name player),(position player),_message,servertime,"",player,0];
publicVariable "maxence_waiting_dep_calls";
case 3 : { // NUM DEP
_fn_findStandardDepanneur = {
{
if (_x getVariable "getCalls_dep") exitWith {
_x;
};
objNull
} foreach playableUnits;
};
_playerTo = _toNum call _fn_findStandardDepanneur;
if (isNull _playerTo) exitWith {
uiSleep 1;
hint (["STR_NO_DEP_CALL","Max_Settings_Phone","Phone_Localization"] call theprogrammer_core_fnc_localize);
_exit = true;
};
};
case 3 : { // NUM DEP
[] spawn {
_name = name player;
_pos = getPos player;
_phoneNumber = player getVariable ["maxence_numero",""];
if (player getVariable ["calling_ano",false]) then {
_name = (["STR_ANONYM_CALL","Max_Settings_Dispatch","Dispatch_Localization"] call theprogrammer_core_fnc_localize);
_pos = "";
_phoneNumber = "**********";
};
maxence_waiting_dep_calls pushBack [_name,_pos,"",servertime,"",player,1];
publicVariable "maxence_waiting_dep_calls";
player setVariable ["calls_management_call_status",0,true];
["Un appel d'urgence est en attente, veuillez vous rendre sur le centre de dispatch pour y répondre !",_phoneNumber,6,_pos,player] remoteExec ["max_phone_fnc_clientMessage",-2];
hint "Votre appel est bien enregistré, veuillez patienter quelques instants le temps qu'un dépanneur réponde à votre appel...";
uiSleep 30;
if !((player getVariable "calls_management_call_status") isEqualTo 0) exitWith {};
hint "Votre appel est bien enregistré, veuillez patienter quelques instants le temps qu'un dépanneur réponde à votre appel...";
uiSleep 30;
if ((player getVariable "calls_management_call_status") isEqualTo 0) then {
_toNum = getNumber (missionConfigFile >> "Max_Settings_Phone" >> "num_dep");
_toNum = [(str _toNum)] call max_phone_fnc_findInContacts;
hint format [(["STR_AUCUNE_REPONSE","Max_Settings_Dispatch","Dispatch_Localization"] call theprogrammer_core_fnc_localize),_toNum];
[format ["Vous avez ratté un appel d'urgence de %1 (%2) !",_name,_phoneNumber],_phoneNumber,6,_pos,player] remoteExec ["max_phone_fnc_clientMessage",-2];
player setVariable ["calls_management_call_status",2,true];
player setVariable ["calling_ano",false,true];
};
};
};
Modifie la condition du bouton afficher dans l'iPhone pour que la license puisse lire tout de même le code du boutonBonsoir il ne faut pas créer le bouton dans le téléphone aussi ?
Modifie la condition du bouton afficher dans l'iPhone pour que la license puisse lire tout de même le code du bouton
condition = "(((getNumber (missionConfigFile >> ""The_Programmer_Settings_Iphone"" >> ""dispatch_script_enable"")) isEqualTo 1) && !(playerSide isEqualTo civilian))";
condition = "(((getNumber (missionConfigFile >> ""The_Programmer_Settings_Iphone"" >> ""dispatch_script_enable"")) isEqualTo 1) && (!(playerSide isEqualTo civilian) || (missionNameSpace getVariable [""license_civ_depanneur"",false])))";
Il faut la remplacer par :
Code:condition = "(((getNumber (missionConfigFile >> ""The_Programmer_Settings_Iphone"" >> ""dispatch_script_enable"")) isEqualTo 1) && (!(playerSide isEqualTo civilian) || (missionNameSpace getVariable ["license_civ_depanneur",false])))";
condition = "(((getNumber (missionConfigFile >> ""The_Programmer_Settings_Iphone"" >> ""dispatch_script_enable"")) isEqualTo 1) && (!(playerSide isEqualTo civilian) || (missionNameSpace getVariable [""license_civ_depanneur"",false])))";