Guten Tag,
ich möchte beim Durchsuchen das Bargeld sehen, weiß jemand wie ich das machen kann?

Bargeld beim Durchsuchen sehen!
-
KenAnderson -
4. Juni 2018 um 14:11 -
Geschlossen -
Erledigt
-
-
du muss es mit ausgeben
, welche Version nutzt du und bei welchem durchsuchen möchtest Du es sehen? Beim durchsuchen nach illegalen Items oder Waffen?
-
du muss es mit ausgeben
, welche Version nutzt du und bei welchem durchsuchen möchtest Du es sehen? Beim durchsuchen nach illegalen Items oder Waffen?
Beim Durchsuchen nach Illegalen Items vom Player ich nutze die 5.0 Wie oben im Label angegeben
-
ja sorry, wer lesen kann ist klar vorteil. Ich schaue mal sollte kein riesenaufwand sein
-
ja sorry, wer lesen kann ist klar vorteil. Ich schaue mal sollte kein riesenaufwand sein
Ich bedanke mich im Vorraus und ja stimmt Wer Lesen kann ist klar im Vorteil so geht es mir auch manchmal xD
-
So hier mal ein Ansatz
ersetze die fn_copSearch.sqf durch das
C
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_copSearch.sqf Author: Bryan "Tonic" Boardwine Description: Returns information on the search. */ life_action_inUse = false; private ["_license","_guns","_gun"]; params [ ["_civ",objNull,[objNull]], ["_invs",[],[[]]], ["_money",0,[0]], ["_robber",false,[false]] ]; if (isNull _civ) exitWith {}; _illegal = 0; _inv = ""; if (count _invs > 0) then { { _displayName = M_CONFIG(getText,"VirtualItems",(_x select 0),"displayName"); _inv = _inv + format ["%1 %2<br/>",(_x select 1),(localize _displayName)]; _price = M_CONFIG(getNumber,"VirtualItems",(_x select 0),"sellPrice"); if (!isNull (missionConfigFile >> "VirtualItems" >> (_x select 0) >> "processedItem")) then { _processed = M_CONFIG(getText,"VirtualItems",(_x select 0),"processedItem"); _price = M_CONFIG(getNumber,"VirtualItems",_processed,"sellPrice"); }; if (!(_price isEqualTo -1)) then { _illegal = _illegal + ((_x select 1) * _price); }; } forEach _invs; if (_illegal > 6000) then { if (life_HC_isActive) then { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"482"] remoteExecCall ["HC_fnc_wantedAdd",HC_Life]; } else { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"482"] remoteExecCall ["life_fnc_wantedAdd",RSERV]; }; }; if (life_HC_isActive) then { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"481"] remoteExecCall ["HC_fnc_wantedAdd",HC_Life]; } else { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"481"] remoteExecCall ["life_fnc_wantedAdd",RSERV]; }; [0,"STR_Cop_Contraband",true,[(_civ getVariable ["realname",name _civ]),[_illegal] call life_fnc_numberText]] remoteExecCall ["life_fnc_broadcast",west]; } else { _inv = localize "STR_Cop_NoIllegal"; }; if (!alive _civ || player distance _civ > 5) exitWith {hint format [localize "STR_Cop_CouldntSearch",_civ getVariable ["realname",name _civ]]}; //hint format ["%1",_this]; hint parseText format ["<t color='#FF0000'><t size='2'>%1</t></t><br/><t color='#FFD700'><t size='1.5'><br/>" +(localize "STR_Cop_IllegalItems")+ "</t></t><br/>%2<br/><br/><br/><br/><t color='#FF0000'>%3</t><t color='#FFD700>Bargeld %4</t>" ,(_civ getVariable ["realname",name _civ]),_inv,if (_robber) then {"Robbed the bank"} else {""},[_money] call numberText]; if (_robber) then { [0,"STR_Cop_Robber",true,[(_civ getVariable ["realname",name _civ])]] remoteExecCall ["life_fnc_broadcast",RCLIENT]; };
und die fn_searchClient.sqf durch das
Code
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_searchClient.sqf Author: Bryan "Tonic" Boardwine Description: Searches the player and he returns information back to the player. */ private ["_inv","_val","_var","_robber","_money"]; params [ ["_cop",objNull,[objNull]] ]; if (isNull _cop) exitWith {}; _inv = []; _robber = false; //Illegal items { _var = configName(_x); _val = ITEM_VALUE(_var); if (_val > 0) then { _inv pushBack [_var,_val]; [false,_var,_val] call life_fnc_handleInv; }; } forEach ("getNumber(_x >> 'illegal') isEqualTo 1" configClasses (missionConfigFile >> "VirtualItems")); if (!life_use_atm) then { CASH = 0; _robber = true; }; _money = CASH; [player,_inv,_money,_robber] remoteExec ["life_fnc_copSearch",_cop];
damit könnte es funktionieren
-
So hier mal ein Ansatz
ersetze die fn_copSearch.sqf durch das
C
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_copSearch.sqf Author: Bryan "Tonic" Boardwine Description: Returns information on the search. */ life_action_inUse = false; private ["_license","_guns","_gun"]; params [ ["_civ",objNull,[objNull]], ["_invs",[],[[]]], ["_money",0,[0]], ["_robber",false,[false]] ]; if (isNull _civ) exitWith {}; _illegal = 0; _inv = ""; if (count _invs > 0) then { { _displayName = M_CONFIG(getText,"VirtualItems",(_x select 0),"displayName"); _inv = _inv + format ["%1 %2<br/>",(_x select 1),(localize _displayName)]; _price = M_CONFIG(getNumber,"VirtualItems",(_x select 0),"sellPrice"); if (!isNull (missionConfigFile >> "VirtualItems" >> (_x select 0) >> "processedItem")) then { _processed = M_CONFIG(getText,"VirtualItems",(_x select 0),"processedItem"); _price = M_CONFIG(getNumber,"VirtualItems",_processed,"sellPrice"); }; if (!(_price isEqualTo -1)) then { _illegal = _illegal + ((_x select 1) * _price); }; } forEach _invs; if (_illegal > 6000) then { if (life_HC_isActive) then { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"482"] remoteExecCall ["HC_fnc_wantedAdd",HC_Life]; } else { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"482"] remoteExecCall ["life_fnc_wantedAdd",RSERV]; }; }; if (life_HC_isActive) then { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"481"] remoteExecCall ["HC_fnc_wantedAdd",HC_Life]; } else { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"481"] remoteExecCall ["life_fnc_wantedAdd",RSERV]; }; [0,"STR_Cop_Contraband",true,[(_civ getVariable ["realname",name _civ]),[_illegal] call life_fnc_numberText]] remoteExecCall ["life_fnc_broadcast",west]; } else { _inv = localize "STR_Cop_NoIllegal"; }; if (!alive _civ || player distance _civ > 5) exitWith {hint format [localize "STR_Cop_CouldntSearch",_civ getVariable ["realname",name _civ]]}; //hint format ["%1",_this]; hint parseText format ["<t color='#FF0000'><t size='2'>%1</t></t><br/><t color='#FFD700'><t size='1.5'><br/>" +(localize "STR_Cop_IllegalItems")+ "</t></t><br/>%2<br/><br/><br/><br/><t color='#FF0000'>%3</t><t color='#FFD700>Bargeld %4</t>" ,(_civ getVariable ["realname",name _civ]),_inv,if (_robber) then {"Robbed the bank"} else {""},[_money] call numberText]; if (_robber) then { [0,"STR_Cop_Robber",true,[(_civ getVariable ["realname",name _civ])]] remoteExecCall ["life_fnc_broadcast",RCLIENT]; };
und die fn_searchClient.sqf durch das
Code
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_searchClient.sqf Author: Bryan "Tonic" Boardwine Description: Searches the player and he returns information back to the player. */ private ["_inv","_val","_var","_robber","_money"]; params [ ["_cop",objNull,[objNull]] ]; if (isNull _cop) exitWith {}; _inv = []; _robber = false; //Illegal items { _var = configName(_x); _val = ITEM_VALUE(_var); if (_val > 0) then { _inv pushBack [_var,_val]; [false,_var,_val] call life_fnc_handleInv; }; } forEach ("getNumber(_x >> 'illegal') isEqualTo 1" configClasses (missionConfigFile >> "VirtualItems")); if (!life_use_atm) then { CASH = 0; _robber = true; }; _money = CASH; [player,_inv,_money,_robber] remoteExec ["life_fnc_copSearch",_cop];
damit könnte es funktionieren
Wird leider kein Bargeld angezeigt!
-
fn_copSearch:
Code
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_copSearch.sqf Author: Bryan "Tonic" Boardwine Description: Returns information on the search. */ life_action_inUse = false; private ["_license","_guns","_gun"]; params [ ["_civ",objNull,[objNull]], ["_invs",[],[[]]], ["_money",0,[0]], ["_robber",false,[false]] ]; if (isNull _civ) exitWith {}; _illegal = 0; _inv = ""; if (count _invs > 0) then { { _displayName = M_CONFIG(getText,"VirtualItems",(_x select 0),"displayName"); _inv = _inv + format ["%1 %2<br/>",(_x select 1),(localize _displayName)]; _price = M_CONFIG(getNumber,"VirtualItems",(_x select 0),"sellPrice"); if (!isNull (missionConfigFile >> "VirtualItems" >> (_x select 0) >> "processedItem")) then { _processed = M_CONFIG(getText,"VirtualItems",(_x select 0),"processedItem"); _price = M_CONFIG(getNumber,"VirtualItems",_processed,"sellPrice"); }; if (!(_price isEqualTo -1)) then { _illegal = _illegal + ((_x select 1) * _price); }; } forEach _invs; if (_illegal > 6000) then { if (life_HC_isActive) then { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"482"] remoteExecCall ["HC_fnc_wantedAdd",HC_Life]; } else { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"482"] remoteExecCall ["life_fnc_wantedAdd",RSERV]; }; }; if (life_HC_isActive) then { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"481"] remoteExecCall ["HC_fnc_wantedAdd",HC_Life]; } else { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"481"] remoteExecCall ["life_fnc_wantedAdd",RSERV]; }; [0,"STR_Cop_Contraband",true,[(_civ getVariable ["realname",name _civ]),[_illegal] call life_fnc_numberText]] remoteExecCall ["life_fnc_broadcast",west]; } else { _inv = localize "STR_Cop_NoIllegal"; }; if (!alive _civ || player distance _civ > 5) exitWith {hint format [localize "STR_Cop_CouldntSearch",_civ getVariable ["realname",name _civ]]}; //hint format ["%1",_this]; hint parseText format ["<t color='#FF0000'><t size='2'>%1</t></t><br/><t color='#FFD700'><t size='1.5'><br/>" +(localize "STR_Cop_IllegalItems")+ "</t></t><br/>%2<br/><br/><br/><br/><t color='#FF0000'>%3</t><t color='#FFD700>Bargeld %4</t>" ,(_civ getVariable ["realname",name _civ]),_inv,if (_robber) then {"Robbed the bank"} else {""},[_money] call life_fnc_numberText]; if (_robber) then { [0,"STR_Cop_Robber",true,[(_civ getVariable ["realname",name _civ])]] remoteExecCall ["life_fnc_broadcast",RCLIENT]; };
-
fn_copSearch:
Code
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_copSearch.sqf Author: Bryan "Tonic" Boardwine Description: Returns information on the search. */ life_action_inUse = false; private ["_license","_guns","_gun"]; params [ ["_civ",objNull,[objNull]], ["_invs",[],[[]]], ["_money",0,[0]], ["_robber",false,[false]] ]; if (isNull _civ) exitWith {}; _illegal = 0; _inv = ""; if (count _invs > 0) then { { _displayName = M_CONFIG(getText,"VirtualItems",(_x select 0),"displayName"); _inv = _inv + format ["%1 %2<br/>",(_x select 1),(localize _displayName)]; _price = M_CONFIG(getNumber,"VirtualItems",(_x select 0),"sellPrice"); if (!isNull (missionConfigFile >> "VirtualItems" >> (_x select 0) >> "processedItem")) then { _processed = M_CONFIG(getText,"VirtualItems",(_x select 0),"processedItem"); _price = M_CONFIG(getNumber,"VirtualItems",_processed,"sellPrice"); }; if (!(_price isEqualTo -1)) then { _illegal = _illegal + ((_x select 1) * _price); }; } forEach _invs; if (_illegal > 6000) then { if (life_HC_isActive) then { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"482"] remoteExecCall ["HC_fnc_wantedAdd",HC_Life]; } else { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"482"] remoteExecCall ["life_fnc_wantedAdd",RSERV]; }; }; if (life_HC_isActive) then { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"481"] remoteExecCall ["HC_fnc_wantedAdd",HC_Life]; } else { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"481"] remoteExecCall ["life_fnc_wantedAdd",RSERV]; }; [0,"STR_Cop_Contraband",true,[(_civ getVariable ["realname",name _civ]),[_illegal] call life_fnc_numberText]] remoteExecCall ["life_fnc_broadcast",west]; } else { _inv = localize "STR_Cop_NoIllegal"; }; if (!alive _civ || player distance _civ > 5) exitWith {hint format [localize "STR_Cop_CouldntSearch",_civ getVariable ["realname",name _civ]]}; //hint format ["%1",_this]; hint parseText format ["<t color='#FF0000'><t size='2'>%1</t></t><br/><t color='#FFD700'><t size='1.5'><br/>" +(localize "STR_Cop_IllegalItems")+ "</t></t><br/>%2<br/><br/><br/><br/><t color='#FF0000'>%3</t><t color='#FFD700>Bargeld %4</t>" ,(_civ getVariable ["realname",name _civ]),_inv,if (_robber) then {"Robbed the bank"} else {""},[_money] call life_fnc_numberText]; if (_robber) then { [0,"STR_Cop_Robber",true,[(_civ getVariable ["realname",name _civ])]] remoteExecCall ["life_fnc_broadcast",RCLIENT]; };
Teste ich morgen
Danke aber für einen Beitrag
-
du hattest auch illegale items dabei?
-
fn_copSearch:
Code
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_copSearch.sqf Author: Bryan "Tonic" Boardwine Description: Returns information on the search. */ life_action_inUse = false; private ["_license","_guns","_gun"]; params [ ["_civ",objNull,[objNull]], ["_invs",[],[[]]], ["_money",0,[0]], ["_robber",false,[false]] ]; if (isNull _civ) exitWith {}; _illegal = 0; _inv = ""; if (count _invs > 0) then { { _displayName = M_CONFIG(getText,"VirtualItems",(_x select 0),"displayName"); _inv = _inv + format ["%1 %2<br/>",(_x select 1),(localize _displayName)]; _price = M_CONFIG(getNumber,"VirtualItems",(_x select 0),"sellPrice"); if (!isNull (missionConfigFile >> "VirtualItems" >> (_x select 0) >> "processedItem")) then { _processed = M_CONFIG(getText,"VirtualItems",(_x select 0),"processedItem"); _price = M_CONFIG(getNumber,"VirtualItems",_processed,"sellPrice"); }; if (!(_price isEqualTo -1)) then { _illegal = _illegal + ((_x select 1) * _price); }; } forEach _invs; if (_illegal > 6000) then { if (life_HC_isActive) then { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"482"] remoteExecCall ["HC_fnc_wantedAdd",HC_Life]; } else { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"482"] remoteExecCall ["life_fnc_wantedAdd",RSERV]; }; }; if (life_HC_isActive) then { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"481"] remoteExecCall ["HC_fnc_wantedAdd",HC_Life]; } else { [getPlayerUID _civ,_civ getVariable ["realname",name _civ],"481"] remoteExecCall ["life_fnc_wantedAdd",RSERV]; }; [0,"STR_Cop_Contraband",true,[(_civ getVariable ["realname",name _civ]),[_illegal] call life_fnc_numberText]] remoteExecCall ["life_fnc_broadcast",west]; } else { _inv = localize "STR_Cop_NoIllegal"; }; if (!alive _civ || player distance _civ > 5) exitWith {hint format [localize "STR_Cop_CouldntSearch",_civ getVariable ["realname",name _civ]]}; //hint format ["%1",_this]; hint parseText format ["<t color='#FF0000'><t size='2'>%1</t></t><br/><t color='#FFD700'><t size='1.5'><br/>" +(localize "STR_Cop_IllegalItems")+ "</t></t><br/>%2<br/><br/><br/><br/><t color='#FF0000'>%3</t><t color='#FFD700>Bargeld %4</t>" ,(_civ getVariable ["realname",name _civ]),_inv,if (_robber) then {"Robbed the bank"} else {""},[_money] call life_fnc_numberText]; if (_robber) then { [0,"STR_Cop_Robber",true,[(_civ getVariable ["realname",name _civ])]] remoteExecCall ["life_fnc_broadcast",RCLIENT]; };
Funktioniert ebenfalls nicht! Danke trotzdem
-
du hattest auch illegale items dabei?
Jap hatte ich.
-
Erscheint die Meldung Bargeld und dahinter steht kein Wert oder wie sieht es aus?
-
Negativ der Dialog ist etwas größer also nach unten gezogen aber da steht nichtmal Bargeld:
-
ändere mal die Farbe
Codehint parseText format ["<t color='#FF0000'><t size='2'>%1</t></t><br/><t color='#FFD700'><t size='1.5'><br/>" +(localize "STR_Cop_IllegalItems")+ "</t></t><br/>%2<br/><br/><br/><br/><t color='#FF0000'>%3</t><t color='#FFD700'>Bargeld %4</t>" ,(_civ getVariable ["realname",name _civ]),_inv,if (_robber) then {"Robbed the bank"} else {""},[_money] call life_fnc_numberText];
habe gerade gesehen in den hint fehlte noch ein ' ersetze mal die Zeile in der fn_copSearch.sqf
-
Hat Funktioniert Danke moeck. Darf ich das mal in ein Tutorial für die Nachwelt schreiben?
-
ja mach doch
-
//close + Lösung als Tutorial im Tutorial Bereich