Vous utilisez un navigateur non à jour ou ancien. Il ne peut pas afficher ce site ou d'autres sites correctement. Vous devez le mettre à jour ou utiliser un navigateur alternatif.
Bonjour ,j'aurai une question ,
Je voulais savoir s'il était possible de crée une notif comme celle de base quand on n'est mort " request medic " quand on tombe dans le coma . car nous disposons de ACE et quand la personne tombe inconscient il a pas moyen d'appeler les secours .
Ensuite pour ce qui est de ton soucis voici la solution :
Créez un nouveau fichier "fn_aceRequestMedic.sqf" dans le dossier core/medical et met dedans :
Code:
/*
Author: Yuri Zoko
Discord: Yuri Zoko#9511
Terms of use:
- This file is forbidden unless you have permission from the author. If you have this file without permission to use it please do not use it and do not share it.
- If you have permission to use this file, you can use it on your server however it is strictly forbidden to share it.
- Out of respect...
Ensuite pour ce qui est de ton soucis voici la solution :
Créez un nouveau fichier "fn_aceRequestMedic.sqf" dans le dossier core/medical et met dedans :
Code:
/*
Author: Yuri Zoko
Discord: Yuri Zoko#9511
Terms of use:
- This file is forbidden unless you have permission from the author. If you have this file without permission to use it please do not use it and do not share it.
- If you have permission to use this file, you can use it on your server however it is strictly forbidden to share it.
- Out of respect for the author please do not delete this information.
*/
private _in = {
private _arr = _this select 0;
private _name = _this select 1;
(_arr findIf { (_x select 1) isEqualTo _name }) > -1;
};
private _deadMarkers = [];
while {true} do
{
{
private _deadMarkerName = format ["%1_dead_marker", _x];
if (_x getVariable ["ACE_isUnconscious", false]) then
{
if ([_deadMarkers, _deadMarkerName] call _in) then
{
_deadMarkerName setMarkerPosLocal (visiblePosition _x);
}
else
{
_marker = createMarkerLocal [_deadMarkerName, visiblePosition _x];
_marker setMarkerColorLocal "ColorRed";
_marker setMarkerTypeLocal "loc_Hospital";
_marker setMarkerTextLocal "Coma";
_deadMarkers pushBack [_x, _marker];
};
}
else
{
if ([_deadMarkers, _deadMarkerName] call _in) then
{
private _unit = _x;
deleteMarkerLocal _deadMarkerName;
_deadMarkers deleteAt (_deadMarkers findIf { (_x select 0) isEqualTo _unit });
};
};
} forEach playableUnits;
{
if (isNull (_x select 0) || { !((_x select 0) getVariable ["ACE_isUnconscious", false]) }) then
{
private _currMarker = _x select 1;
deleteMarkerLocal _currMarker;
_deadMarkers deleteAt (_deadMarkers findIf { (_x select 1) isEqualTo _currMarker });
};
} forEach _deadMarkers;
sleep 0.5;
};
Déclare ton fichier dans le Functions.hpp dans la class Medical.
Dans ton init_medic.sqf, ajoutes cette ligne :
Code:
[] spawn life_fnc_aceRequestMedic;
Pour les dommages ACE après la mort :
dans ton spawnMenu.sqf, au dessus de
Code:
cutText["","BLACK FADED"];
Ajoutes :
Code:
if((player getVariable ["ACE_isUnconscious",false])) then {
[player] call ace_medical_treatment_fnc_fullHealLocal;
};
Ensuite pour ce qui est de ton soucis voici la solution :
Créez un nouveau fichier "fn_aceRequestMedic.sqf" dans le dossier core/medical et met dedans :
Code:
/*
Author: Yuri Zoko
Discord: Yuri Zoko#9511
Terms of use:
- This file is forbidden unless you have permission from the author. If you have this file without permission to use it please do not use it and do not share it.
- If you have permission to use this file, you can use it on your server however it is strictly forbidden to share it.
- Out of respect for the author please do not delete this information.
*/
private _in = {
private _arr = _this select 0;
private _name = _this select 1;
(_arr findIf { (_x select 1) isEqualTo _name }) > -1;
};
private _deadMarkers = [];
while {true} do
{
{
private _deadMarkerName = format ["%1_dead_marker", _x];
if (_x getVariable ["ACE_isUnconscious", false]) then
{
if ([_deadMarkers, _deadMarkerName] call _in) then
{
_deadMarkerName setMarkerPosLocal (visiblePosition _x);
}
else
{
_marker = createMarkerLocal [_deadMarkerName, visiblePosition _x];
_marker setMarkerColorLocal "ColorRed";
_marker setMarkerTypeLocal "loc_Hospital";
_marker setMarkerTextLocal "Coma";
_deadMarkers pushBack [_x, _marker];
};
}
else
{
if ([_deadMarkers, _deadMarkerName] call _in) then
{
private _unit = _x;
deleteMarkerLocal _deadMarkerName;
_deadMarkers deleteAt (_deadMarkers findIf { (_x select 0) isEqualTo _unit });
};
};
} forEach playableUnits;
{
if (isNull (_x select 0) || { !((_x select 0) getVariable ["ACE_isUnconscious", false]) }) then
{
private _currMarker = _x select 1;
deleteMarkerLocal _currMarker;
_deadMarkers deleteAt (_deadMarkers findIf { (_x select 1) isEqualTo _currMarker });
};
} forEach _deadMarkers;
sleep 0.5;
};
Déclare ton fichier dans le Functions.hpp dans la class Medical.
Dans ton init_medic.sqf, ajoutes cette ligne :
Code:
[] spawn life_fnc_aceRequestMedic;
Pour les dommages ACE après la mort :
dans ton spawnMenu.sqf, au dessus de
Code:
cutText["","BLACK FADED"];
Ajoutes :
Code:
if((player getVariable ["ACE_isUnconscious",false])) then {
[player] call ace_medical_treatment_fnc_fullHealLocal;
};