ich suche ein script wen man ins Gefängnis gesteckt wird das man eine bestimmte Kleidung an hat.
hat einer eine Idee wo ich so ein script finde??
Schön, dass du den Weg zu NodeZone.net gefunden hast! Aktuell bist du nicht angemeldet und kannst deshalb nur eingeschränkt auf unsere Community zugreifen. Um alle Funktionen freizuschalten, spannende Inhalte zu entdecken und dich aktiv einzubringen, registriere dich jetzt kostenlos oder melde dich mit deinem Account an.
ich suche ein script wen man ins Gefängnis gesteckt wird das man eine bestimmte Kleidung an hat.
hat einer eine Idee wo ich so ein script finde??
#include "..\..\script_macros.hpp"
/*
Author Bryan "Tonic" Boardwine
Description:
Once word is received by the server the rest of the jail execution is completed.
Edited by Neil Smith
*/
private["_time","_bail","_esc","_countDown"];
params [
["_ret",[],[[]]],
["_bad",false,[false]],
["_time",15,[0]]
];
//Begin jail uniform
hint "Your gear has been placed in the evidence locker!";
old_gear = getUnitLoadout player;
removeUniform player;
removeHeadgear player;
removeVest player;
removeGoggles player;
removeBackpack player;
removeallWeapons player;
removeallAssignedItems player;
player addUniform "PUT YOUR UNIFORM FOR JAIL HERE!!!!!";
_time = time + (_time * 60);
if (count _ret > 0) then { life_bail_amount = (_ret select 2); } else { life_bail_amount = 1500; };
_esc = false;
_bail = false;
if(_time <= 0) then { _time = time + (15 * 60); hintC "Please Report to Admin: JAIL_FALLBACK_15, time is zero!"; };
[_bad,_time] spawn {
life_canpay_bail = false;
life_bail_amount = life_bail_amount * 5;
if(_this select 0) then {
sleep ( (_this select 1) * 0.5 );
} else {
sleep ( (_this select 1) * 0.2 );
};
life_canpay_bail = nil;
};
while {true} do {
if((round(_time - time)) > 0) then {
_countDown = if(round (_time - time) > 60) then {format["%1 Minute(s)",round(round(_time - time) / 60)]} else {format["%1 Second(s)",round(_time - time)]};
if(isNil "life_canpay_bail") then {
hintSilent format["Time Remaining:\n %1\n\nCan pay Bail: %3\nBail Amount: $%2",_countDown,[life_bail_amount] call life_fnc_numberText, "dass"];
} else {
hintSilent format["Time Remaining:\n %1\n",_countDown];
};
};
if(player distance (getMarkerPos "jail_marker") > 300) exitWith {
_esc = true;
};
if(life_bail_paid) exitWith {
_bail = true;
};
if((round(_time - time)) < 1) exitWith {hint ""};
if(!alive player && ((round(_time - time)) > 0)) exitWith {};
sleep 1;
};
switch (true) do {
case (_bail): {
life_is_arrested = false;
life_bail_paid = false;
hint localize "STR_Jail_Paid";
serv_wanted_remove = [player];
player setPos (getMarkerPos "civ_spawn_1");
[getPlayerUID player] remoteExecCall ["life_fnc_wantedRemove",RSERV];
hint "Because you have paid your bail, you will recieve your clothing shortly";
player setUnitLoadout old_gear;
[] call life_fnc_saveGear;
[5] call SOCK_fnc_updatePartial;
};
case (_esc): {
life_is_arrested = false;
hint localize "STR_Jail_EscapeSelf";
[0,"STR_Jail_EscapeNOTF",true,[profileName]] remoteExecCall ["life_fnc_broadcast",RCLIENT];
[getPlayerUID player,profileName,"901"] remoteExecCall ["life_fnc_wantedAdd",RSERV];
hint "Because you escaped from jail, the jail guards have placed your gear in the trash";
[] call life_fnc_saveGear;
[5] call SOCK_fnc_updatePartial;
};
case (alive player && !_esc && !_bail): {
life_is_arrested = false;
hint localize "STR_Jail_Released";
[getPlayerUID player] remoteExecCall ["life_fnc_wantedRemove",RSERV];
player setPos (getMarkerPos "civ_spawn_1");
player setUnitLoadout old_gear;
hint "Because you have done your time in prison, you will recieve your clothing shortly";
[] call life_fnc_saveGear;
[5] call SOCK_fnc_updatePartial;
};
};
Alles anzeigen
Spoiler anzeigen
Code Alles anzeigen#include "..\..\script_macros.hpp" /* Author Bryan "Tonic" Boardwine Description: Once word is received by the server the rest of the jail execution is completed. Edited by Neil Smith */ private["_time","_bail","_esc","_countDown"]; params [ ["_ret",[],[[]]], ["_bad",false,[false]], ["_time",15,[0]] ]; //Begin jail uniform hint "Your gear has been placed in the evidence locker!"; old_gear = getUnitLoadout player; removeUniform player; removeHeadgear player; removeVest player; removeGoggles player; removeBackpack player; removeallWeapons player; removeallAssignedItems player; player addUniform "PUT YOUR UNIFORM FOR JAIL HERE!!!!!"; _time = time + (_time * 60); if (count _ret > 0) then { life_bail_amount = (_ret select 2); } else { life_bail_amount = 1500; }; _esc = false; _bail = false; if(_time <= 0) then { _time = time + (15 * 60); hintC "Please Report to Admin: JAIL_FALLBACK_15, time is zero!"; }; [_bad,_time] spawn { life_canpay_bail = false; life_bail_amount = life_bail_amount * 5; if(_this select 0) then { sleep ( (_this select 1) * 0.5 ); } else { sleep ( (_this select 1) * 0.2 ); }; life_canpay_bail = nil; }; while {true} do { if((round(_time - time)) > 0) then { _countDown = if(round (_time - time) > 60) then {format["%1 Minute(s)",round(round(_time - time) / 60)]} else {format["%1 Second(s)",round(_time - time)]}; if(isNil "life_canpay_bail") then { hintSilent format["Time Remaining:\n %1\n\nCan pay Bail: %3\nBail Amount: $%2",_countDown,[life_bail_amount] call life_fnc_numberText, "dass"]; } else { hintSilent format["Time Remaining:\n %1\n",_countDown]; }; }; if(player distance (getMarkerPos "jail_marker") > 300) exitWith { _esc = true; }; if(life_bail_paid) exitWith { _bail = true; }; if((round(_time - time)) < 1) exitWith {hint ""}; if(!alive player && ((round(_time - time)) > 0)) exitWith {}; sleep 1; }; switch (true) do { case (_bail): { life_is_arrested = false; life_bail_paid = false; hint localize "STR_Jail_Paid"; serv_wanted_remove = [player]; player setPos (getMarkerPos "civ_spawn_1"); [getPlayerUID player] remoteExecCall ["life_fnc_wantedRemove",RSERV]; hint "Because you have paid your bail, you will recieve your clothing shortly"; player setUnitLoadout old_gear; [] call life_fnc_saveGear; [5] call SOCK_fnc_updatePartial; }; case (_esc): { life_is_arrested = false; hint localize "STR_Jail_EscapeSelf"; [0,"STR_Jail_EscapeNOTF",true,[profileName]] remoteExecCall ["life_fnc_broadcast",RCLIENT]; [getPlayerUID player,profileName,"901"] remoteExecCall ["life_fnc_wantedAdd",RSERV]; hint "Because you escaped from jail, the jail guards have placed your gear in the trash"; [] call life_fnc_saveGear; [5] call SOCK_fnc_updatePartial; }; case (alive player && !_esc && !_bail): { life_is_arrested = false; hint localize "STR_Jail_Released"; [getPlayerUID player] remoteExecCall ["life_fnc_wantedRemove",RSERV]; player setPos (getMarkerPos "civ_spawn_1"); player setUnitLoadout old_gear; hint "Because you have done your time in prison, you will recieve your clothing shortly"; [] call life_fnc_saveGear; [5] call SOCK_fnc_updatePartial; }; };
ausgetestet? geht es
ausgetestet? geht es
Mit dem Classname PUT YOUR UNIFORM FOR JAIL HERE!!!!! zu 100%
Mit dem Classname PUT YOUR UNIFORM FOR JAIL HERE!!!!! zu 100%
ja da muss ja die kleidung hin die man dan an haben soll nur meine frage ist ob es getestet wurde
Schau dir doch den Code an, ob er ungefähr funktionieren kann, falls du dem (noch) nicht mächtig bist dann halt einfach mal schnell testen. Das ist ja echt eine Kleinigkeit und schneller getestet als wenn du hier auf eine Antwort wartest.
Also ich habe in der fn_jail.sqf einfach das unter die Zeilen:
{
_amount = ITEM_VALUE(_x);
if (_amount > 0) then {
[false,_x,_amount] call life_fnc_handleInv;
};
} forEach _illegalItems;
life_is_arrested = true;
eingetragen, teste das mal, bei mir klappt es und wenn man ins Gefängnis gesteckt wird, hat man meine selbst erstellte Gefängnisuniform an.
if (LIFE_SETTINGS(getNumber,"jail_seize_inventory") isEqualTo 1) then {
[] spawn life_fnc_seizeClient;
sleep 1;
removeAllItems player;
removeVest player;
removeBackpack player;
removeHeadgear player;
player forceAddUniform "U_C_Poloshirt_tricolour"; //Fix Uniform Bug
player setObjectTextureGlobal [0, "textures\jail_clothing.paa"]; //Fix Uniform Bug
removeAllWeapons player;
{player removeMagazine _x} forEach (magazines player);
} else {
sleep 1;
removeAllItems player;
removeVest player;
removeBackpack player;
removeHeadgear player;
//sleep 1;
player forceAddUniform "U_C_Poloshirt_tricolour"; //Fix Uniform Bug
player setObjectTextureGlobal [0, "textures\jail_clothing.paa"]; //Fix Uniform Bug
removeAllWeapons player;
{player removeMagazine _x} forEach (magazines player);
};
sleep 1; //Fix Uniform Bug
Alles anzeigen
Also ich habe in der fn_jail.sqf einfach das unter die Zeilen:
Code{ _amount = ITEM_VALUE(_x); if (_amount > 0) then { [false,_x,_amount] call life_fnc_handleInv; }; } forEach _illegalItems; life_is_arrested = true;
eingetragen, teste das mal, bei mir klappt es und wenn man ins Gefängnis gesteckt wird, hat man meine selbst erstellte Gefängnisuniform an.
Code Alles anzeigenif (LIFE_SETTINGS(getNumber,"jail_seize_inventory") isEqualTo 1) then { [] spawn life_fnc_seizeClient; sleep 1; removeAllItems player; removeVest player; removeBackpack player; removeHeadgear player; player forceAddUniform "U_C_Poloshirt_tricolour"; //Fix Uniform Bug player setObjectTextureGlobal [0, "textures\jail_clothing.paa"]; //Fix Uniform Bug removeAllWeapons player; {player removeMagazine _x} forEach (magazines player); } else { sleep 1; removeAllItems player; removeVest player; removeBackpack player; removeHeadgear player; //sleep 1; player forceAddUniform "U_C_Poloshirt_tricolour"; //Fix Uniform Bug player setObjectTextureGlobal [0, "textures\jail_clothing.paa"]; //Fix Uniform Bug removeAllWeapons player; {player removeMagazine _x} forEach (magazines player); }; sleep 1; //Fix Uniform Bug
ah danke
Also ich habe in der fn_jail.sqf einfach das unter die Zeilen:
Code{ _amount = ITEM_VALUE(_x); if (_amount > 0) then { [false,_x,_amount] call life_fnc_handleInv; }; } forEach _illegalItems; life_is_arrested = true;
eingetragen, teste das mal, bei mir klappt es und wenn man ins Gefängnis gesteckt wird, hat man meine selbst erstellte Gefängnisuniform an.
Code Alles anzeigenif (LIFE_SETTINGS(getNumber,"jail_seize_inventory") isEqualTo 1) then { [] spawn life_fnc_seizeClient; sleep 1; removeAllItems player; removeVest player; removeBackpack player; removeHeadgear player; player forceAddUniform "U_C_Poloshirt_tricolour"; //Fix Uniform Bug player setObjectTextureGlobal [0, "textures\jail_clothing.paa"]; //Fix Uniform Bug removeAllWeapons player; {player removeMagazine _x} forEach (magazines player); } else { sleep 1; removeAllItems player; removeVest player; removeBackpack player; removeHeadgear player; //sleep 1; player forceAddUniform "U_C_Poloshirt_tricolour"; //Fix Uniform Bug player setObjectTextureGlobal [0, "textures\jail_clothing.paa"]; //Fix Uniform Bug removeAllWeapons player; {player removeMagazine _x} forEach (magazines player); }; sleep 1; //Fix Uniform Bug
Klappt super danke