Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "..\..\script_macros.hpp"
- /*
- Müllfarmen by BrandyScotchland
- */
- if(!hasInterface) exitWith {};
- if(life_action_inUse) exitWith {};
- if(playerSide in [west,independent]) exitWith {["Du kannst als Polizist oder Medic nicht Müll farmen!",true,"fast"] call life_fnc_notification_system;};
- if((vehicle player) !=player) exitWith {["Du kannst aus dem Auto keine Müll farmen!",true,"fast"] call life_fnc_notification_system;};
- if(!alive player) exitWith {["Du musst am Leben sein um Müll zu farmen",true,"fast"] call life_fnc_notification_system;};
- if(player getVariable "restrained") exitWith {[localize "STR_NOTF_isrestrained",true,"fast"] call life_fnc_notification_system;};
- if(player getVariable "playerSurrender") exitWith {[localize "STR_NOTF_surrender",true,"fast"] call life_fnc_notification_system;};
- _exit = false;
- _markerPos = markerPos "Muellplatz";
- _meters = _markerPos distance player;
- life_action_inUse = true;
- if(_meters > 30) exitWith {
- ["Hier findest du keine Sachen. Bleibe im Radius von 30 Metern",true,"fast"] call life_fnc_notification_system;
- life_action_inUse = false;
- };
- if(life_inv_toolbox <= 0) exitWith {
- ["Du brauchst eine ToolBox um Müll zu farmen!",true,"fast"] call life_fnc_notification_system;
- life_action_inUse = false;
- _exit = true;
- };
- if(_exit) exitWith {life_action_inUse = false;};
- for "_i" from 0 to 4 do {
- player playMoveNow "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
- waitUntil {
- animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
- };
- sleep 0.5;
- };
- _random = round(random(100));
- _rnd = round(random(10));
- if(_rnd < 3) exitWith {["Du hast nichts gefunden!",true,"fast"] call life_fnc_notification_system;};
- _new = switch {true} do {
- case(_random < 5): {[true,"muell",3] call life_fnc_handleInv; titleText ["Du hast 3 Müll gesammelt", "PLAIN DOWN"];};
- case(_random >= 5 && _random < 10): {[true,"schrott",3] call life_fnc_handleInv; titleText ["Du hast 3 Schrott gesammelt", "PLAIN DOWN"];};
- case(_random >= 10 && _random < 15): {[true,"muell",3] call life_fnc_handleInv; titleText ["Du hast 3 Müll gesammelt", "PLAIN DOWN"];};
- case(_random >= 15 && _random < 20): {[true,"muell",1] call life_fnc_handleInv; titleText ["Du hast 1 Müll gesammelt", "PLAIN DOWN"];};
- case(_random >= 20 && _random < 25): {[true,"schrott",1] call life_fnc_handleInv; titleText ["Du hast 1 Müll gesammelt", "PLAIN DOWN"];};
- case(_random >= 25 && _random < 30): {[true,"muell",1] call life_fnc_handleInv; titleText ["Du hast 1 Müll gesammelt", "PLAIN DOWN"];};
- case(_random >= 30 && _random < 35): {[true,"rabbit",4] call life_fnc_handleInv; titleText ["Du hast 4 Hasen gesammelt", "PLAIN DOWN"];};
- case(_random >= 35 && _random < 40): {[true,"muell",4] call life_fnc_handleInv; titleText ["Du hast 4 Müll gesammelt", "PLAIN DOWN"];};
- case(_random >= 40 && _random < 45): {[true,"bauplan",1] call life_fnc_handleInv; titleText ["Du hast einen Bauplan gesammelt", "PLAIN DOWN"];};
- case(_random >= 45 && _random < 50): {[true,"muell",1] call life_fnc_handleInv; titleText ["Du hast 1 Müll gesammelt", "PLAIN DOWN"];};
- case(_random >= 50 && _random < 55): {[true,"marijuana",3] call life_fnc_handleInv; titleText ["Du hast 3 Marijuana gesammelt", "PLAIN DOWN"];};
- case(_random >= 55 && _random < 60): {[true,"muell",5] call life_fnc_handleInv; titleText ["Du hast 5 Müll gesammelt", "PLAIN DOWN"];};
- case(_random >= 60 && _random < 65): {[true,"muell",6] call life_fnc_handleInv; titleText ["Du hast 6 Müll gesammelt", "PLAIN DOWN"];};
- case(_random >= 65 && _random < 70): {[true,"muell",10] call life_fnc_handleInv; titleText ["Du hast 10 Müll gesammelt", "PLAIN DOWN"];};
- case(_random >= 70 && _random < 75): {[true,"goldbar",1] call life_fnc_handleInv; titleText ["Du hast einen Goldbarren gesammelt", "PLAIN DOWN"];};
- case(_random >= 75 && _random < 80): {[true,"waffenteile",1] call life_fnc_handleInv; titleText ["Du hast Waffenteile gesammelt", "PLAIN DOWN"];};
- case(_random >= 80 && _random < 85): {[true,"fakeidcard",1] call life_fnc_handleInv; titleText ["Du hast ein Fakeausweiß gesammelt", "PLAIN DOWN"];};
- case(_random >= 85 && _random < 90): {[true,"muell",1] call life_fnc_handleInv; titleText ["Du hast ein Müll gesammelt", "PLAIN DOWN"];};
- case(_random >= 90 && _random < 95): {[true,"schrott",10] call life_fnc_handleInv; titleText ["Du hast 10 Schrott gesammelt", "PLAIN DOWN"];};
- case(_random >= 95 && _random < 98): {[true,"artifact",1] call life_fnc_handleInv; titleText ["Du hast ein Artefakt gesammelt", "PLAIN DOWN"];};
- case(_random >= 100): {[true,"artifact_minor",1] call life_fnc_handleInv; titleText ["Du hast ein Artefakt gesammelt", "PLAIN DOWN"];};
- };
- sleep 2.5;
- life_action_inUse = false;
- ["SachenAbgebaut"] spawn mav_ttm_fnc_addExp;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement