Durchaus möglich, könnte aber auch an den anderen Fehlern liegen. Wie dem auch sei solltest du so oder so alle Fehler weg machen.
[TUTORIAL] Jail Time Altis Life 5.0
-
- Altis Life
-
Alice Kingsleigh -
7. März 2019 um 17:20
-
-
ich werde es probieren und ich werden mich später noch einmal melden
-
Hey ich bins wieder habe alle Datenbank fehler und alle anderen Fehler auser den NPC gefixed. Wenn ich jemanden in den Knast stecke würd in der Datenbank bei jai_time "-1" angezeigt. Die Person behält alles sachen und wird auch nicht mehr entlassen auch nicht nach 15 min.
-
Clientlogs bitte. Und da sind immer noch einige Fehler drin, die ich dir schon gesagt hatte, und auch ein DB Fehler existiert noch.
-
hab dan wohl was übersehen Hier der Log
-
Ich habe jetzt alle meine Logs durchsucht und das Skript 2 mal neuinstalliert. Ich finde den Fehler nicht.
-
Ich sehe so keine Feher, die dieses Tutorial betreffen. Wie gesagt aber durchaus noch andere Fehler, die dazu geeignet sind, die Funktionsfähigkeit der Jail Time zu beeinflussen. Also bitte erst mal ALLE anderen Fehler entfernen.
-
könntest du mir die fehlere nennen oder sagen nachwas ich suchen soll?
-
Die meisten, die ich dir zuerst schrieb, sind noch da. Schau also einfach mal danach oder eröffne am besten ein neues Thema, wenn du nicht weißt, wie du sie behebst.
-
alles klar danke
-
-
Meine Wantedlist geht auch nicht kann es daran leigen? Da sethet nur oben rechts die ganze zeit "Estembleshing connection"
-
Ja! Es kann wirklich ALLES sein. Mach doch bitte einen eigenen Beitrag, da können wir dann, ohne es hier zuzumüllen, alles gemeinsam bearbeiten.
-
Wenn ich jemanden für 15 Minuten ins Gefängnis stecken will wird er aber für ca. 140 Minuten ins Gefängnis gesteckt. Die 140 Minuten stehen dann auch in der Datenbank...
Was habe ich falsch gemacht?
Aber wenn ich folgendes in die Konsole eingeben ([player, 15] call life_fnc_arrestAction;) dann funktioniert es ... -
Puh eine gute Frage. Bei mir funktioniert alles einwandfrei. Ich werde alles noch mal prüfen, da du ja nicht der Einzige mit einem solchen Problem bist. Entweder ich hab was im Tut vergessen oder tatsache einen Fehler. Gebe mir bitte ein paar Tage.
-
Ich habe es gefixt bekommen. Ich habe einfach folgendes:
params [
["_unit",objNull,[objNull]],
["_bad",false,[false]],
["_time",15,[0]]
];durch das hier ersetzt:
-
Okay wenn das klappt dann ist gut. Ich war nicht untätig und habe es mir weiter angeschaut, nur bei mir funktioniert halt alles. Wenn das für dich der Fix ist, dann schau ich mir die Params noch mal an.
-
TheFireRunner Felix : also das was du gepostet hast kann eigentlich nicht der fix sein, der einzige Unterschied zwischen dem von dir und den Params ist, dass es bei Dir kein Fehlerhandling gibt. Eventuell hast Du ja noch was anderes geändert.
-
Hier mal alle Files:
Code: fn_arrestDialog_Arrest.sqf
Alles anzeigen#include "..\..\script_macros.hpp" /* Player clicked arrest/ok [player, _time] call life_fnc_arrestAction; */ if(playerSide != west) exitWith {}; //Get minutes private _time = ctrlText 1400; if(! ([_time] call TON_fnc_isnumber)) exitWith { hint localize "STR_ATM_notnumeric"; }; _time = parseNumber _time; //requested number _time = round _time; if(_time < 1 || _time > 120) exitWith { hint "Die Zeit muss zwischen 1 und 120 Minuten sein!"; }; titleText[format ["Du hast ihn für %1 Monate verhaftet!",_time],"PLAIN"]; closeDialog 0; [cursorObject, _time] call life_fnc_arrestAction; // [player, 34] call life_fnc_arrestAction; [0,"STR_NOTF_Arrested_1",true, [cursorObject getVariable ["realname",name cursorObject], player getVariable ["realname", name player], _time]] remoteExecCall ["life_fnc_broadcast",0];
Code: fn_arrestAction.sqf
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_arrestAction.sqf Author: Description: Arrests the targeted person. */ private _unit = _this select 0; private _time = _this select 1; /*if (isNull _unit) exitWith {}; //Not valid if (isNil "_unit") exitWith {}; //Not Valid if (!(_unit isKindOf "Man")) exitWith {}; //Not a unit if (!isPlayer _unit) exitWith {}; //Not a human if (!(_unit getVariable "restrained")) exitWith {}; //He's not restrained. //if (!((side _unit) in [civilian,independent,east])) exitWith {}; Not a civ if (isNull _unit) exitWith {}; //Not valid*/ detach _unit; [_unit,false,_time] remoteExecCall ["life_fnc_jail",_unit]; [format ["Jail Log: Cop %1 hat %2 (%3) für %4 Minuten ins Gefängnis gesteckt",player getVariable ["realname",name player], _unit getVariable ["realname",name _unit], getPlayerUID _unit, _time]] remoteExec ["SOCK_fnc_diaLog",2];
Code: fn_jail.sqf
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_jail.sqf Author: Bryan "Tonic" Boardwine Description: Starts the initial process of jailing. */ private _unit = _this select 0; private _bad = _this select 1; private _time = _this select 2; if (life_is_arrested) exitWith {}; //Dafuq i'm already arrested private _illegalItems = LIFE_SETTINGS(getArray,"jail_seize_vItems"); player setVariable ["restrained",false,true]; player setVariable ["Escorting",false,true]; player setVariable ["transporting",false,true]; titleText[localize "STR_Jail_Warn","PLAIN"]; player setPos (getMarkerPos "jail_marker"); if (_bad) then { waitUntil {alive player}; sleep 1; }; //Check to make sure they goto check if (player distance (getMarkerPos "jail_marker") > 40) then { player setPos (getMarkerPos "jail_marker"); }; life_is_arrested = true; if (LIFE_SETTINGS(getNumber,"jail_seize_inventory") isEqualTo 1) then { [] spawn life_fnc_seizeClient; } else { removeAllWeapons player; {player removeMagazine _x} forEach (magazines player); }; [player,_bad,_time] remoteExecCall ["life_fnc_jailSys",RSERV]; [5] call SOCK_fnc_updatePartial;
Code: fn_jailMe.sqf
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_jailMe.sqf Author Bryan "Tonic" Boardwine Description: Once word is received by the server the rest of the jail execution is completed. */ private ["_time","_bail","_esc","_countDown"]; params [ ["_ret",[],[[]]], ["_bad",false,[false]], ["_time",15,[0]] ]; _handle = [] spawn life_fnc_stripDownPlayer; waitUntil {scriptDone _handle}; player forceAddUniform "U_C_WorkerCoveralls"; [] call life_fnc_playerSkins; _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!"; }; while {true} do { if((round(_time - time)) > 0) then { _countDown = if(round (_time - time) > 60) then {format["%1 Minuten",round(round(_time - time) / 60)]} else {format["%1 Sekunden",round(_time - time)]}; hintSilent format["Verbleibende Zeit:\n %1\n",_countDown]; }; _remain = (round(_time - time)); if ((_remain % 60) isEqualTo 0) then { player setVariable ["JailTime", (round(_remain / 60)) ]; [5] call SOCK_fnc_updatePartial; }; player forceWalk true; if (player distance (getMarkerPos "jail_marker") > 60) exitWith { _esc = true; }; if ((round(_time - time)) < 1) exitWith {hint ""}; if (!alive player && ((round(_time - time)) > 0)) exitWith {}; sleep 0.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 "jail_release"); player setVariable ["JailTime",0]; if (life_HC_isActive) then { [getPlayerUID player] remoteExecCall ["HC_fnc_wantedRemove",HC_Life]; } else { [getPlayerUID player] remoteExecCall ["life_fnc_wantedRemove",RSERV]; }; [5] call SOCK_fnc_updatePartial; }; case (_esc): { life_is_arrested = false; hint localize "STR_Jail_EscapeSelf"; [format ["Jail Log: %1 (%2) ist aus dem Gefängnis ausgebrochen",player getVariable ["realname",name player], getPlayerUID player]] remoteExec ["SOCK_fnc_diaLog",2]; [0,"STR_Jail_EscapeNOTF",true,[profileName]] remoteExecCall ["life_fnc_broadcast",west]; player setVariable ["JailTime",0]; if (life_HC_isActive) then { [getPlayerUID player,profileName,"901"] remoteExecCall ["HC_fnc_wantedAdd",HC_Life]; } else { [getPlayerUID player,profileName,"901"] remoteExecCall ["life_fnc_wantedAdd",RSERV]; }; [5] call SOCK_fnc_updatePartial; }; case (alive player && !_esc && !_bail): { life_is_arrested = false; hint localize "STR_Jail_Released"; [format ["Jail Log: %1 (%2) wurde aus dem Gefängnis entlassen",player getVariable ["realname",name player], getPlayerUID player]] remoteExec ["SOCK_fnc_diaLog",2]; if (life_HC_isActive) then { [getPlayerUID player] remoteExecCall ["HC_fnc_wantedRemove",HC_Life]; } else { [getPlayerUID player] remoteExecCall ["life_fnc_wantedRemove",RSERV]; }; player setPos (getMarkerPos "jail_release"); [5] call SOCK_fnc_updatePartial; }; }; player forceWalk false; // Enable running & jumping
Code: fn_jailSys.sqf
Alles anzeigen#include "\life_server\script_macros.hpp" /* File: fn_jailSys.sqf Author: Bryan "Tonic" Boardwine Description: I forget? */ private["_unit","_bad","_id","_ret","_time"]; _unit = _this select 0; _bad = _this select 1; _time = _this select 2; if(_bad) then {//Load time from database _query = format["SELECT jail_time FROM players WHERE playerid='%2'", _time, getPlayerUID _unit]; _result = [_query,2] call DB_fnc_asyncCall; _result = (_result select 0); _time = _result; } else { _query = format["UPDATE players SET jail_time='%1' WHERE playerid='%2'", _time, getPlayerUID _unit]; _result = [_query,1] call DB_fnc_asyncCall; }; _id = owner _unit; _ret = [_unit] call life_fnc_wantedPerson; [_ret,_bad,_time] remoteExec ["life_fnc_jailMe",_id];
Code: fn_JailPlayer.sqf
Alles anzeigen#include "\life_server\script_macros.hpp" /* Sets jail values for player */ private["_player", "_playeruid", "_query", "_time"]; _player = _this select 0; _playeruid = _this select 1; _time = _this select 2; _time = ceil _time; //to be sure _player = owner _player; _query = format["UPDATE players SET arrested='1', jail_time='%1' WHERE playerid='%2'", _time, _playeruid]; [_query,1] call DB_fnc_asyncCall;
-
Hier mal alle Files:
Code: fn_arrestDialog_Arrest.sqf
Alles anzeigen#include "..\..\script_macros.hpp" /* Player clicked arrest/ok [player, _time] call life_fnc_arrestAction; */ if(playerSide != west) exitWith {}; //Get minutes private _time = ctrlText 1400; if(! ([_time] call TON_fnc_isnumber)) exitWith { hint localize "STR_ATM_notnumeric"; }; _time = parseNumber _time; //requested number _time = round _time; if(_time < 1 || _time > 120) exitWith { hint "Die Zeit muss zwischen 1 und 120 Minuten sein!"; }; titleText[format ["Du hast ihn für %1 Monate verhaftet!",_time],"PLAIN"]; closeDialog 0; [cursorObject, _time] call life_fnc_arrestAction; // [player, 34] call life_fnc_arrestAction; [0,"STR_NOTF_Arrested_1",true, [cursorObject getVariable ["realname",name cursorObject], player getVariable ["realname", name player], _time]] remoteExecCall ["life_fnc_broadcast",0];
Code: fn_arrestAction.sqf
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_arrestAction.sqf Author: Description: Arrests the targeted person. */ private _unit = _this select 0; private _time = _this select 1; /*if (isNull _unit) exitWith {}; //Not valid if (isNil "_unit") exitWith {}; //Not Valid if (!(_unit isKindOf "Man")) exitWith {}; //Not a unit if (!isPlayer _unit) exitWith {}; //Not a human if (!(_unit getVariable "restrained")) exitWith {}; //He's not restrained. //if (!((side _unit) in [civilian,independent,east])) exitWith {}; Not a civ if (isNull _unit) exitWith {}; //Not valid*/ detach _unit; [_unit,false,_time] remoteExecCall ["life_fnc_jail",_unit]; [format ["Jail Log: Cop %1 hat %2 (%3) für %4 Minuten ins Gefängnis gesteckt",player getVariable ["realname",name player], _unit getVariable ["realname",name _unit], getPlayerUID _unit, _time]] remoteExec ["SOCK_fnc_diaLog",2];
Code: fn_jail.sqf
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_jail.sqf Author: Bryan "Tonic" Boardwine Description: Starts the initial process of jailing. */ private _unit = _this select 0; private _bad = _this select 1; private _time = _this select 2; if (life_is_arrested) exitWith {}; //Dafuq i'm already arrested private _illegalItems = LIFE_SETTINGS(getArray,"jail_seize_vItems"); player setVariable ["restrained",false,true]; player setVariable ["Escorting",false,true]; player setVariable ["transporting",false,true]; titleText[localize "STR_Jail_Warn","PLAIN"]; player setPos (getMarkerPos "jail_marker"); if (_bad) then { waitUntil {alive player}; sleep 1; }; //Check to make sure they goto check if (player distance (getMarkerPos "jail_marker") > 40) then { player setPos (getMarkerPos "jail_marker"); }; life_is_arrested = true; if (LIFE_SETTINGS(getNumber,"jail_seize_inventory") isEqualTo 1) then { [] spawn life_fnc_seizeClient; } else { removeAllWeapons player; {player removeMagazine _x} forEach (magazines player); }; [player,_bad,_time] remoteExecCall ["life_fnc_jailSys",RSERV]; [5] call SOCK_fnc_updatePartial;
Code: fn_jailMe.sqf
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_jailMe.sqf Author Bryan "Tonic" Boardwine Description: Once word is received by the server the rest of the jail execution is completed. */ private ["_time","_bail","_esc","_countDown"]; params [ ["_ret",[],[[]]], ["_bad",false,[false]], ["_time",15,[0]] ]; _handle = [] spawn life_fnc_stripDownPlayer; waitUntil {scriptDone _handle}; player forceAddUniform "U_C_WorkerCoveralls"; [] call life_fnc_playerSkins; _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!"; }; while {true} do { if((round(_time - time)) > 0) then { _countDown = if(round (_time - time) > 60) then {format["%1 Minuten",round(round(_time - time) / 60)]} else {format["%1 Sekunden",round(_time - time)]}; hintSilent format["Verbleibende Zeit:\n %1\n",_countDown]; }; _remain = (round(_time - time)); if ((_remain % 60) isEqualTo 0) then { player setVariable ["JailTime", (round(_remain / 60)) ]; [5] call SOCK_fnc_updatePartial; }; player forceWalk true; if (player distance (getMarkerPos "jail_marker") > 60) exitWith { _esc = true; }; if ((round(_time - time)) < 1) exitWith {hint ""}; if (!alive player && ((round(_time - time)) > 0)) exitWith {}; sleep 0.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 "jail_release"); player setVariable ["JailTime",0]; if (life_HC_isActive) then { [getPlayerUID player] remoteExecCall ["HC_fnc_wantedRemove",HC_Life]; } else { [getPlayerUID player] remoteExecCall ["life_fnc_wantedRemove",RSERV]; }; [5] call SOCK_fnc_updatePartial; }; case (_esc): { life_is_arrested = false; hint localize "STR_Jail_EscapeSelf"; [format ["Jail Log: %1 (%2) ist aus dem Gefängnis ausgebrochen",player getVariable ["realname",name player], getPlayerUID player]] remoteExec ["SOCK_fnc_diaLog",2]; [0,"STR_Jail_EscapeNOTF",true,[profileName]] remoteExecCall ["life_fnc_broadcast",west]; player setVariable ["JailTime",0]; if (life_HC_isActive) then { [getPlayerUID player,profileName,"901"] remoteExecCall ["HC_fnc_wantedAdd",HC_Life]; } else { [getPlayerUID player,profileName,"901"] remoteExecCall ["life_fnc_wantedAdd",RSERV]; }; [5] call SOCK_fnc_updatePartial; }; case (alive player && !_esc && !_bail): { life_is_arrested = false; hint localize "STR_Jail_Released"; [format ["Jail Log: %1 (%2) wurde aus dem Gefängnis entlassen",player getVariable ["realname",name player], getPlayerUID player]] remoteExec ["SOCK_fnc_diaLog",2]; if (life_HC_isActive) then { [getPlayerUID player] remoteExecCall ["HC_fnc_wantedRemove",HC_Life]; } else { [getPlayerUID player] remoteExecCall ["life_fnc_wantedRemove",RSERV]; }; player setPos (getMarkerPos "jail_release"); [5] call SOCK_fnc_updatePartial; }; }; player forceWalk false; // Enable running & jumping
Code: fn_jailSys.sqf
Alles anzeigen#include "\life_server\script_macros.hpp" /* File: fn_jailSys.sqf Author: Bryan "Tonic" Boardwine Description: I forget? */ private["_unit","_bad","_id","_ret","_time"]; _unit = _this select 0; _bad = _this select 1; _time = _this select 2; if(_bad) then {//Load time from database _query = format["SELECT jail_time FROM players WHERE playerid='%2'", _time, getPlayerUID _unit]; _result = [_query,2] call DB_fnc_asyncCall; _result = (_result select 0); _time = _result; } else { _query = format["UPDATE players SET jail_time='%1' WHERE playerid='%2'", _time, getPlayerUID _unit]; _result = [_query,1] call DB_fnc_asyncCall; }; _id = owner _unit; _ret = [_unit] call life_fnc_wantedPerson; [_ret,_bad,_time] remoteExec ["life_fnc_jailMe",_id];
Code: fn_JailPlayer.sqf
Alles anzeigen#include "\life_server\script_macros.hpp" /* Sets jail values for player */ private["_player", "_playeruid", "_query", "_time"]; _player = _this select 0; _playeruid = _this select 1; _time = _this select 2; _time = ceil _time; //to be sure _player = owner _player; _query = format["UPDATE players SET arrested='1', jail_time='%1' WHERE playerid='%2'", _time, _playeruid]; [_query,1] call DB_fnc_asyncCall;
Ich habe das genauso gemacht , es werden aber Personen gekickt wenn sie aus dem Gefängnis freigelassen werden (Gefängniszeit vorbei). In der remoteexec.log steht das:
"#1 "sock_fnc_dialog ["Jail Log: Maurizio Scancarello (765442323322361198127248827) wurde aus dem Gefängnis entlassen"]" (ID wurde per Hand verändert)
Dann habe ich in der remoteexec.txt. das eingefügt:
1 "" !="sock_fnc_dialog"
Lieder konnte ich diesen Fehler nicht beheben. Könnte mir jemand helfen? -