ok dan ersetze
überall
SUB(life_cash,wert)
durch
life_cash = life_cash - wert
ok dan ersetze
überall
SUB(life_cash,wert)
durch
life_cash = life_cash - wert
Habe es jetzt schon etwas eher selber hinbekommen. Habe mir als Vorbild einfach mal die Standart healHospital angeguckt
Aber Danke!
Habe es jetzt schon etwas eher selber hinbekommen. Habe mir als Vorbild einfach mal die Standart healHospital angeguckt
Aber Danke!
dann poste doch mal dein Ergebnis für die anderen
Also bei mir sieht das ganze jetzt so aus:
fn_healHoospital.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_healHospital.sqf
Author: Bryan "Tonic" Boardwine
Description:
Doesn't matter, will be revised later.
*/
private ["_healCost","_healCostAll"];
_mode = _this select 3;
_medicsOnline = {_x != player && {side _x == independent} && {alive _x}} count playableUnits > 0;
switch (_mode) do
{
case "heal":
{
_healCost = LIFE_SETTINGS(getNumber,"hospital_heal_fee");
if(_medicsOnline) exitWith {hint "Es sind noch andere Ärzte da! Ich bin aktuell zu beschäftigt"};
if(CASH < _healCost) exitWith {hint format[localize "STR_NOTF_HS_NoCash",[_healCost] call life_fnc_numberText];};
CASH = CASH - _healCost;
titleText[localize "STR_NOTF_HS_Healing","PLAIN"];
sleep 8;
if(player distance (_this select 0) > 5) exitWith {titleText[localize "STR_NOTF_HS_ToFar","PLAIN"]};
titleText[localize "STR_NOTF_HS_Healed","PLAIN"];
[player,player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
};
case "heal_all":
{
_healCostAll = LIFE_SETTINGS(getNumber,"hospital_heal_fee_all");
if(_medicsOnline) exitWith {hint "Es sind noch andere Ärzte da! Ich bin aktuell zu beschäftigt"};
if(CASH < _healCostAll) exitWith {hint format[localize "STR_NOTF_HS_NoCash",[_healCostAll] call life_fnc_numberText];};
CASH = CASH - _healCostAll;
titleText["Heile alle Personen","PLAIN"];
sleep 3;
if(player distance (_this select 0) > 5) exitWith {titleText[localize "STR_NOTF_HS_ToFar","PLAIN"]};
{[_x,_x] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;}forEach (player nearEntities ["Man", 10]);
titleText["Alle Personen im Umkreis von 10 Metern wurden geheilt!","PLAIN"];
};
};
In der Config_Master.hpp habe ich dann einfach die Preise angegeben.
Bei den Medical System Configurations. Bei mir ab Zeile 104:
/* Medical System Configurations */
revive_cops = false; //true to enable cops the ability to revive everyone or false for only medics/ems.
revive_civ = false; //true to enable civs the ability to revive everyone or false for only medics/ems or medic/ems/cops.
revive_east = false; //true to enable opfor the ability to revive everyone or false for only medics/ems or medic/ems/cops.
revive_fee = 1500; //Revive fee that players have to pay and medics only EMS(independent) are rewarded with this amount.
hospital_heal_fee = 100; //Fee to heal at a hospital NPC
hospital_heal_fee_all = 1500;
also wir haben das so
#include "..\..\script_macros.hpp"
/*
File: fn_healHospital.sqf
Author: Bryan "Tonic" Boardwine
Description:
Doesn't matter, will be revised later.
*/
private ["_healCost","_healCostAll"];
_mode = _this select 3;
_medicsOnline = {_x != player && {side _x == independent} && {alive _x}} count playableUnits > 0;
switch (_mode) do
{
case "heal":
{
_healCost = LIFE_SETTINGS(getNumber,"hospital_heal_fee");
if(_medicsOnline) exitWith {hint "Es sind noch andere Ärzte da! Ich bin aktuell zu beschäftigt"};
if(CASH < _healCost) exitWith {hint format[localize "STR_NOTF_HS_NoCash",[_healCost] call life_fnc_numberText];};
CASH = CASH - _healCost;
titleText[localize "STR_NOTF_HS_Healing","PLAIN"];
sleep 8;
if(player distance (_this select 0) > 5) exitWith {titleText[localize "STR_NOTF_HS_ToFar","PLAIN"]};
titleText[localize "STR_NOTF_HS_Healed","PLAIN"];
[player,player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
};
case "heal_all":
{
_healCostAll = LIFE_SETTINGS(getNumber,"hospital_heal_fee_all");
if(_medicsOnline) exitWith {hint "Es sind noch andere Ärzte da! Ich bin aktuell zu beschäftigt"};
if(CASH < _healCostAll) exitWith {hint format[localize "STR_NOTF_HS_NoCash",[_healCostAll] call life_fnc_numberText];};
CASH = CASH - _healCostAll;
titleText["Heile alle Personen","PLAIN"];
sleep 3;
if(player distance (_this select 0) > 5) exitWith {titleText[localize "STR_NOTF_HS_ToFar","PLAIN"]};
{[_x,_x] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;}forEach (player nearEntities ["Man", 10]);
titleText["Alle Personen im Umkreis von 10 Metern wurden geheilt!","PLAIN"];
};
};
Alles anzeigen
und im NPC
init="call{this addAction [""Heile"", life_fnc_healHoospital, ""heal""]; this addAction [""Heile Umkreis"", life_fnc_healHoospital, ""heal_all""];}";
Die fn_healHospital haben wir in core/actions drinnen und ist auch in der Funktions.hpp eingetragen dennoch passiert nichts wenn jemand sich heilen will woran liegt das.
Wir haben die 5.0
#Edit habe schon den Fehler entdeckt war klar das es nicht geht wenn ich schreibe life_fnc_healHoospital