Thx
kann geschlossen werden
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.
Thx
kann geschlossen werden
Hi Leute
Kann mir einer helfen ich such in der 5.0 wo man die distance einstellen kann von verkäufer und verarbeiter
bin heute gegen 12 uhr zu erreichen
der fehler ist 100 % fn_updateRequest aus der mpmissions
zeig mal bitte dein fn_updateRequest aus der mpmissions
Mal so eine dumme frage hast du das ADAC Script drauf
ja geht ohne Fehler man kann das System in z Inventar offen man sieht das skillsystem
man bekommt beim Farmen die skillpunkte und wird auch gespeichert in der Datenbank
Mit diesem Dialog ist das Problem mit der KL Einheiten weg
habe alles getestet läuft wunderbare
danke an
AmaZiinG
für das Tutorial
class Life_Prof_Dialog
{
idd = 7730;
name = "life_prof_dialog";
movingEnabled = false;
enableSimulation = true;
class controlsBackground
{
class Frame: Life_RscText
{
colorBackground[] = {0, 0, 0, 0.7};
idc = -1;
x = 10.5 * GUI_GRID_W + GUI_GRID_X;
y = 2 * GUI_GRID_H + GUI_GRID_Y;
w = 18 * GUI_GRID_W;
h = 18 * GUI_GRID_H;
};
class Title: Life_RscText
{
idc = -1;
text = "Proficicency Levels";
//--- ToDo: Localize;
x = 15.5 * GUI_GRID_W + GUI_GRID_X;
y = 2.5 * GUI_GRID_H + GUI_GRID_Y;
w = 8.5 * GUI_GRID_W;h = 1 * GUI_GRID_H;
};
};
class controls
{
class Prof_Text: Life_RscStructuredText
{
idc = 7731;
x = 11 * GUI_GRID_W + GUI_GRID_X;
y = 4 * GUI_GRID_H + GUI_GRID_Y;
w = 5 * GUI_GRID_W;
h = 13.5 * GUI_GRID_H;
};
class Prof2_Text: Life_RscStructuredText
{
idc = 7732;
x = 16 * GUI_GRID_W + GUI_GRID_X;
y = 4 * GUI_GRID_H + GUI_GRID_Y;
w = 4 * GUI_GRID_W;
h = 13.5 * GUI_GRID_H;
};
class Prof3_Text: Life_RscStructuredText
{
idc = 7733;
x = 20 * GUI_GRID_W + GUI_GRID_X;
y = 4 * GUI_GRID_H + GUI_GRID_Y;
w = 7 * GUI_GRID_W;
h = 13.5 * GUI_GRID_H;
};
class CloseBTN: Life_RscButtonMenu
{
idc = -1;
text = "Close";
//--- ToDo: Localize;
onButtonClick = "closeDialog 0;";
x = 22 * GUI_GRID_W + GUI_GRID_X;
y = 18 * GUI_GRID_H + GUI_GRID_Y;
w = 6 * GUI_GRID_W;
h = 1.5 * GUI_GRID_H;
};
};
};
Alles anzeigen
/*
File: fn_queryRequest.sqf
Author: Bryan "Tonic" Boardwine
Description:
Handles the incoming request and sends an asynchronous query
request to the database.
Return:
ARRAY - If array has 0 elements it should be handled as an error in client-side files.
STRING - The request had invalid handles or an unknown error and is logged to the RPT.
*/
private["_uid","_side","_query","_return","_queryResult","_qResult","_handler","_thread","_tickTime","_loops","_returnCount"];
_uid = [_this,0,"",[""]] call BIS_fnc_param;
_side = [_this,1,sideUnknown,[civilian]] call BIS_fnc_param;
_ownerID = [_this,2,ObjNull,[ObjNull]] call BIS_fnc_param;
if(isNull _ownerID) exitWith {};
_ownerID = owner _ownerID;
/*
_returnCount is the count of entries we are expecting back from the async call.
The other part is well the SQL statement.
*/
_query = switch(_side) do {
case west: {_returnCount = 10; format["SELECT playerid, name, cash, bankacc, adminlevel, donatorlvl, cop_licenses, coplevel, cop_gear, cop_prof, blacklist FROM players WHERE playerid='%1'",_uid];};
case civilian: {_returnCount = 9; format["SELECT playerid, name, cash, bankacc, adminlevel, donatorlvl, civ_licenses, arrested, civ_gear, civ_prof FROM players WHERE playerid='%1'",_uid];};
case independent: {_returnCount = 9; format["SELECT playerid, name, cash, bankacc, adminlevel, donatorlvl, med_licenses, mediclevel, med_gear, med_prof FROM players WHERE playerid='%1'",_uid];};
};
waitUntil{sleep (random 0.3); !DB_Async_Active};
_tickTime = diag_tickTime;
_queryResult = [_query,2] call DB_fnc_asyncCall;
diag_log "------------- Client Query Request -------------";
diag_log format["QUERY: %1",_query];
diag_log format["Time to complete: %1 (in seconds)",(diag_tickTime - _tickTime)];
diag_log format["Result: %1",_queryResult];
diag_log "------------------------------------------------";
if(typeName _queryResult == "STRING") exitWith {
[[],"SOCK_fnc_insertPlayerInfo",_ownerID,false,true] spawn life_fnc_MP;
};
if(count _queryResult == 0) exitWith {
[[],"SOCK_fnc_insertPlayerInfo",_ownerID,false,true] spawn life_fnc_MP;
};
//Blah conversion thing from a2net->extdb
private["_tmp"];
_tmp = _queryResult select 2;
_queryResult set[2,[_tmp] call DB_fnc_numberSafe];
_tmp = _queryResult select 3;
_queryResult set[3,[_tmp] call DB_fnc_numberSafe];
//Parse licenses (Always index 6)
_new = [(_queryResult select 6)] call DB_fnc_mresToArray;
if(typeName _new == "STRING") then {_new = call compile format["%1", _new];};
_queryResult set[6,_new];
//Convert tinyint to boolean
_old = _queryResult select 6;
for "_i" from 0 to (count _old)-1 do
{
_data = _old select _i;
_old set[_i,[_data select 0, ([_data select 1,1] call DB_fnc_bool)]];
};
_queryResult set[6,_old];
_new = [(_queryResult select 8)] call DB_fnc_mresToArray;
if(typeName _new == "STRING") then {_new = call compile format["%1", _new];};
_queryResult set[8,_new];
//PROFICENCYS
//Parse licenses (Always index 9)
_new = [(_queryResult select 9)] call DB_fnc_mresToArray;
if(typeName _new == "STRING") then {_new = call compile format["%1", _new];};
_queryResult set[9,_new];
//Convert string to number
_old = _queryResult select 9;
for "_i" from 0 to (count _old)-1 do
{
_data = _old select _i;
_old set[_i,[_data select 0, ([_data select 1,1] call DB_fnc_numberSafe),([_data select 2,1] call DB_fnc_numberSafe) ]];
};
_queryResult set[9,_old];
//Parse data for specific side.
switch (_side) do {
case west: {
_queryResult set[10,([_queryResult select 10,1] call DB_fnc_bool)];
};
case civilian: {
_queryResult set[7,([_queryResult select 7,1] call DB_fnc_bool)];
_houseData = _uid spawn TON_fnc_fetchPlayerHouses;
waitUntil {scriptDone _houseData};
_queryResult pushBack (missionNamespace getVariable[format["houses_%1",_uid],[]]);
_gangData = _uid spawn TON_fnc_queryPlayerGang;
waitUntil{scriptDone _gangData};_queryResult pushBack (missionNamespace getVariable[format["gang_%1",_uid],[]]);
};
};
_keyArr = missionNamespace getVariable [format["%1_KEYS_%2",_uid,_side],[]];
_queryResult set[13,_keyArr];
[_queryResult,"SOCK_fnc_requestReceived",_ownerID,false] spawn life_fnc_MP;
Alles anzeigen
nein damit ist dein Problem mit den toten Tiere nicht aufheben kann geklärt
#include <macro.h>
/*
File: fn_actionKeyHandler.sqf
Author: Bryan "Tonic" Boardwine
Description:
Master action key handler, handles requests for picking up various items and
interacting with other players (Cops = Cop Menu for unrestrain,escort,stop escort, arrest (if near cop hq), etc).
*/
private["_curTarget","_isWater"];
_curTarget = cursorTarget;
if(life_action_inUse) exitWith {}; //Action is in use, exit to prevent spamming.
if(life_interrupted) exitWith {life_interrupted = false;};
_isWater = surfaceIsWater (getPosASL player);
if(isNull _curTarget) exitWith {
if(_isWater) then {
private["_fish"];
_fish = (nearestObjects[getPos player,["Fish_Base_F"],3]) select 0;
if(!isNil "_fish") then {
[_fish] call life_fnc_catchFish;
};
} else {
if(playerSide == civilian) then {
[] call life_fnc_gather;
};
};
};
if(_curTarget isKindOf "House_F" && {player distance _curTarget < 12} OR ((nearestObject [[16019.5,16952.9,0],"Land_Dome_Big_F"]) == _curTarget OR (nearestObject [[16019.5,16952.9,0],"Land_Research_house_V1_F"]) == _curTarget)) exitWith {
[_curTarget] call life_fnc_houseMenu;
};
if(dialog) exitWith {}; //Don't bother when a dialog is open.
if(vehicle player != player) exitWith {}; //He's in a vehicle, cancel!
life_action_inUse = true;
//Temp fail safe.
[] spawn {
sleep 60;
life_action_inUse = false;
};
//Check if it's a dead body.
if(_curTarget isKindOf "Man" && {!alive _curTarget} && {playerSide in [west,independent]}) exitWith {
//Hotfix code by ins0
if(((playerSide == blufor && {(call life_revive_cops)}) || playerSide == independent) && {"Medikit" in (items player)}) then {
[_curTarget] call life_fnc_revivePlayer;
};
};
//If target is a player then check if we can use the cop menu.
if(isPlayer _curTarget && _curTarget isKindOf "Man") then
{
if(playerSide == west && player distance cursorTarget < 3) then //Wenn COP
{
if(_curTarget isKindOf "Man") then
{
if(!dialog) then
{
[_curTarget] call life_fnc_copInteractionMenu;
};
};
}
else
{
if(playerSide == civilian && player distance cursorTarget < 3 && (license_civ_rebel) && !(player getVariable ["restrained", false])) then
{
if(_curTarget getVariable["restrained",false]) then
{
if(!dialog) then
{
[_curTarget] call life_fnc_InteractionMenu;
};
};
};
};
} else {
//OK, it wasn't a player so what is it?
private["_isVehicle","_miscItems","_money"];
_isVehicle = if((_curTarget isKindOf "landVehicle") OR (_curTarget isKindOf "Ship") OR (_curTarget isKindOf "Air")) then {true} else {false};
_miscItems = ["Land_BottlePlastic_V1_F","Land_TacticalBacon_F","Land_Can_V3_F","Land_CanisterFuel_F","Land_Suitcase_F"];
_animalTypes = ["Salema_F","Ornate_random_F","Mackerel_F","Tuna_F","Mullet_F","CatShark_F","Turtle_F","Goat_random_F","Sheep_random_F","Goat_small_random_F","Hen_random_F","Snake_random_F","Rabbit_F","Cock_random_F"];
_money = "Land_Money_F";
//It's a vehicle! open the vehicle interaction key!
if(_isVehicle) then {
if(!dialog) then {
if(player distance _curTarget < ((boundingBox _curTarget select 1) select 0) + 2) then {
[_curTarget] call life_fnc_vInteractionMenu;
};
};
} else {
//Is it a animal type?
if((typeOf _curTarget) in _animalTypes) then {
if((typeOf _curTarget) == "Turtle_F" && !alive _curTarget) then {
private["_handle"];
_handle = [_curTarget] spawn life_fnc_catchTurtle;
waitUntil {scriptDone _handle};
} else {
private["_handle"];
_handle = [_curTarget] spawn life_fnc_catchFish;
waitUntil {scriptDone _handle};
};
if((typeOf _curTarget) == "Goat_random_F" && !alive _curTarget) then {
private["_handle"];
_handle = [_curTarget] spawn life_fnc_catchGoat;
waitUntil {scriptDone _handle};
};
if((typeOf _curTarget) == "Sheep_random_F" && !alive _curTarget) then {
private["_handle"];
_handle = [cursorTarget] spawn life_fnc_catchSheep;
waitUntil {scriptDone _handle};
};
if((typeOf _curTarget) == "Goat_small_random_F" && !alive _curTarget) then {
private["_handle"];
_handle = [_curTarget] spawn life_fnc_catchGoat;
waitUntil {scriptDone _handle};
};
if((typeOf _curTarget) == "Cock_random_F" && !alive _curTarget) then {
private["_handle"];
_handle = [_curTarget] spawn life_fnc_catchCock;
waitUntil {scriptDone _handle};
};
if((typeOf _curTarget) == "Hen_random_F" && !alive _curTarget) then {
private["_handle"];
_handle = [_curTarget] spawn life_fnc_catchCock;
waitUntil {scriptDone _handle};
};
if((typeOf _curTarget) == "Rabbit_F" && !alive _curTarget) then {
private["_handle"];
_handle = [_curTarget] spawn life_fnc_catchRabbit;
waitUntil {scriptDone _handle};
};
if((typeOf cursorTarget) == "Snake_random_F" && !alive _curTarget) then {
private["_handle"];
_handle = [cursorTarget] spawn life_fnc_catchSnake;
waitUntil {scriptDone _handle};
};
} else {
//OK, it wasn't a vehicle so let's see what else it could be?
if((typeOf _curTarget) in _miscItems) then {
//OK, it was a misc item (food,water,etc).
private["_handle"];
_handle = [_curTarget] spawn life_fnc_pickupItem;
waitUntil {scriptDone _handle};
} else {
//It wasn't a misc item so is it money?
if((typeOf _curTarget) == _money && {!(_curTarget getVariable["inUse",false])}) then {
private["_handle"];
_curTarget setVariable["inUse",TRUE,TRUE];
_handle = [_curTarget] spawn life_fnc_pickupMoney;
waitUntil {scriptDone _handle};
};
};
};
};
};
Alles anzeigen
/*
Author: Bryan "Tonic" Boardwine
Description:
Spawns animals around the marker when a player
is near. Very basic WIP
TODO:
Change it up so animals repopulate over time.
*/
private["_animalList","_dist","_radius","_animals","_zoneName","_unitsNear","_animalsActive"];
_zoneName = [_this,0,"",[""]] call BIS_fnc_param;
//_maxAnimals = [_this,1,10,[0]] call BIS_fnc_param;
_maxAnimals = [_this,3,300,[0]] call BIS_fnc_param;
if(_zoneName == "") exitWith {};
_animalList = ["Sheep_random_F","Goat_random_F","Hen_random_F","Cock_random_F"];
_radius = (getMarkerSize _zoneName) select 0;
_dist = _radius + 100;
_zone = getMarkerPos _zoneName;
_animals = [];
_unitsNear = false;
_animalsActive = false;
while {true} do {
{if((_x distance _zone) < _dist) exitWith {_unitsNear = true;}; _unitsNear = false;} foreach playableUnits;
if(_unitsNear && !_animalsActive) then {
_animalsActive = true;
for "_i" from 1 to _maxAnimals do {
_animalClass = _animalList select floor random count _animalList;
//_position = [((_zone select 0) - _radius + random (_radius * 2)), ((_zone select 1) - _radius + random (_radius * 2)),0];
_position = [((_zone select 0) - _radius + random (_radius * 4)), ((_zone select 1) - _radius + random (_radius * 4)),0];
_animal = createAgent [_animalClass,_position,[],0,"FORM"];
_animal setDir (random 360);
_animals pushBack _animal;
};
} else {
if(!_unitsNear && _animalsActive) then {
{deleteVehicle _x;} foreach _animals;
_animals = [];
_animalsActive = false;
};
};
sleep (3 + random 2);
Alles anzeigen
bin bei euch auf dem ts kannst du mir sagen wie das geht mit den tieren das die da
Spawnen
wie hast du es gemacht würde mich auch interessieren wägen den tieren
mal eine frage spwan bei dir die Tiere
gibst das auch für die 3.1.4.8 exdb
Kann geschlossen werden habe es
ich hoffe so ist es richtig