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,(mapGridPosition _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,(mapGridPosition _pos),player] remoteExec ["max_phone_fnc_clientMessage",-2];
player setVariable ["calls_management_call_status",2,true];
player setVariable ["calling_ano",false,true];
};
};
};