Français ID au dessus de la tête

  • Auteur de la discussion Auteur de la discussion Said
  • Date de début Date de début

Said

User
29/12/19
131
16
12
1 100
Hey !

Voici mon premier tuto qui consiste a avoir des id au dessus de la tête. Vous pouvez configurer le nom des grades et ainsi que le chemin de la texture pour l'icon dans le fn_playerTags.sqf.

Lets'go

Rendez vous dans votre fn_playerTags.sqf qui se situe dans le dossier core\functions de votre mission

Remplacer le par :
Code:
#include "..\..\script_macros.hpp"
/*
    File: fn_playerTags.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    ID Joueurs
*/
if (!life_settings_tagson) exitWith {};
private ["_ui","_units","_masks"];
#define iconID 78000
#define scale 0.8

if (visibleMap || {!alive player} || {dialog}) exitWith {
    500 cutText["","PLAIN"];
};

_ui = uiNamespace getVariable ["Life_HUD_nameTags",displayNull];
if (isNull _ui) then {
    500 cutRsc["Life_HUD_nameTags","PLAIN"];
    _ui = uiNamespace getVariable ["Life_HUD_nameTags",displayNull];
};

_units = nearestObjects[(visiblePosition player),["CAManBase","Land_Pallet_MilBoxes_F","Land_Sink_F"],50];
_units = _units - [player];

_masks = LIFE_SETTINGS(getArray,"clothing_masks");

private _index = -1;
{
    private _texteID = format["ID : %1",_x getVariable ["id_player", 0]];
    private "_text";
    _idc = _ui displayCtrl (iconID + _forEachIndex);
    if (!(lineIntersects [eyePos player, eyePos _x, player, _x]) && alive _x && {!isNil "_texteID"}) then {
        _pos = switch (typeOf _x) do {
            case "Land_Pallet_MilBoxes_F": {[visiblePosition _x select 0, visiblePosition _x select 1, (getPosATL _x select 2) + 1.5]};
            case "Land_Sink_F": {[visiblePosition _x select 0, visiblePosition _x select 1, (getPosATL _x select 2) + 2]};
            default {[visiblePosition _x select 0, visiblePosition _x select 1, ((_x modelToWorld (_x selectionPosition "head")) select 2)+.5]};
        };
        _sPos = worldToScreen _pos;
        _distance = _pos distance player;
        if (!((headgear _x) in _masks || (goggles _x) in _masks || (uniform _x) in _masks)) then {
            if (count _sPos > 1 && {_distance < 15}) then {
                _text = switch (true) do
                {
                    case (_x in (units group player) && playerSide isEqualTo civilian):
                    {
                        format ["<t color='#00FF00'>%1</t>",_texteID];
                    };
                    case (side _x isEqualTo west && {!isNil {_x getVariable "rank"}}):
                    {
                        private _texte_format = "";

                        switch (playerSide) do
                        {
                            case civilian:
                            {
                                _texte_format = "<t size ='1'>%3</t>";
                            };
                            case west:
                            {
                                _texte_format = "<img image='%1' size='1'></img> <t size ='1'>%2</t><br/>%3<br/>%4";
                            };
                            case independent:
                            {
                                _texte_format = "<img image='%1' size='1'></img> <t size ='1'>%2</t><br/>%3<br/>%4";
                            };
                        };
                      
                        format [_texte_format,
                        switch ((_x getVariable "rank")) do
                        {
                            case 1:  {"SunWise_Core\Gendarmerie\gav.paa"};
                            case 2:  {"SunWise_Core\Gendarmeriee\gendarme.paa"};
                            case 3:  {"SunWise_Core\Gendarmerie\marechal_des_logis_chef.paa"};
                            case 4:  {"SunWise_Core\Gendarmerie\adjudant.paa"};
                            case 5:  {"SunWise_Core\Gendarmerie\major.paa"};
                            case 6:  {"SunWise_Core\Gendarmerie\sous_lieutenant.paa"};
                            case 7:  {"SunWise_Core\Gendarmerie\lieutenant.paa"};
                            case 8:  {"SunWise_Core\Gendarmerie\Capitaine.paa"};
                            case 9: {"SunWise_Core\Gendarmerie\Commandan.paa"};
                            case 10: {"SunWise_Core\Gendarmerie\Colonel.paa"};
                            case 11: {"SunWise_Core\Gendarmerie\General.paa"};
                            default  {"\a3\ui_f\data\gui\cfg\Ranks\private_gs.paa"};
                        },
                        switch ((_x getVariable "rank")) do
                        {
                            case 1: {"GAV"};
                            case 2: {"Gendarme"};
                            case 3: {"Maréchal des Logis Chef"};
                            case 4: {"Adjudant"};
                            case 5: {"Major"};
                            case 6: {"Sous-Lieutenant"};
                            case 7: {"Lieutenant"};
                            case 8: {"Capitaine"};
                            case 9: {"Commandant"};
                            case 10: {"Colonel"};
                            case 11: {"Général"};
                        },
                        _texteID,
                        name _x];
                    };
                    case (side _x isEqualTo independent):
                    {
                        private _texte_format = "";

                        switch (playerSide) do
                        {
                            case civilian:
                            {
                                _texte_format = "<t size ='1'>%3</t>";
                            };
                            case west:
                            {
                                _texte_format = "<img image='%1' size='1'></img> <t size ='1'>%2</t><br/>%3<br/>%4";
                            };
                            case independent:
                            {
                                _texte_format = "<img image='%1' size='1'></img> <t size ='1'>%2</t><br/>%3<br/>%4";
                            };
                        };

                        format [_texte_format,
                        switch ((_x getVariable "rank_medic")) do
                        {
                            case 1:  {"SunWise_Core\SP\2nd.paa"};
                            case 2:  {"SunWise_Core\SP\1eresp.paa"};
                            case 3:  {"SunWise_Core\SP\caposp.paa"};
                            case 4:  {"SunWise_Core\SP\capocsp.paa"};
                            case 5:  {"SunWise_Core\SP\sgsp.paa"};
                            case 6:  {"SunWise_Core\SP\sgscsp.paa"};
                            case 7:  {"SunWise_Core\SP\adjsp.paa"};
                            case 8:  {"SunWise_Core\SP\adjcsp.paa"};
                            case 9:  {"SunWise_Core\SP\ltsp.paa"};
                            case 10: {"SunWise_Core\SP\cptsp.paa"};
                            case 11: {"SunWise_Core\SP\commsp.paa"};
                            case 12: {"SunWise_Core\SP\ltcolsp.paa"};
                            case 13: {"SunWise_Core\SP\colsp.paa"};
                            default  {"a3\ui_f\data\gui\cfg\Ranks\private_gs.paa"};
                        },
                        switch ((_x getVariable "rank_medic")) do
                        {
                            case 1: {"Seconde Classe"};
                            case 2: {"Première Classe"};
                            case 3: {"Caporal"};
                            case 4: {"Caporal-Chef"};
                            case 5: {"Sergent"};
                            case 6: {"Sergent-Chef"};
                            case 7: {"Adjudant"};
                            case 8: {"Adjudant-Chef"};
                            case 9: {"Lieutenant"};
                            case 10: {"Capitaine"};
                            case 11: {"Commandant"};
                            case 12: {"Lieutenant-Colonel"};
                            case 13: {"Colonel"};
                        },
                        _texteID,
                        name _x];
                    };
                    default
                    {
                        if (!isNil {(group _x) getVariable "gang_name"}) then {
                            format ["%1<br/><t size='0.8' color='#B6B6B6'>%2</t>",_texteID/*(group _x) getVariable ["gang_name",""]*/];
                        } else {
                            if (alive _x) then {
                                _texteID;
                            } else {
                                if (!isPlayer _x) then {
                                    _x getVariable ["realname","ERROR"];
                                };
                            };
                        };
                    };
                };

                _idc ctrlSetStructuredText parseText _text;
                _idc ctrlSetPosition [_sPos select 0, _sPos select 1, 0.4, 0.65];
                _idc ctrlSetScale scale;
                _idc ctrlSetFade 0;
                _idc ctrlCommit 0;
                _idc ctrlShow true;
            } else {
                _idc ctrlShow false;
            };
        } else {
            _idc ctrlShow false;
        };
    } else {
        _idc ctrlShow false;
    };
    _index = _forEachIndex;
} forEach _units;
(_ui displayCtrl (iconID + _index + 1)) ctrlSetStructuredText parseText "";

Puis rendez vous dans votre fn_requestReceived.sqf qui se situe dans le dossier \core\session de votre mission.


Après ce bloc
Code:
 case west: {
        CONST(life_coplevel,(_this select 7));
        CONST(life_medicLevel,0);
        life_blacklisted = _this select 9;
        if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
            life_hunger = ((_this select 10) select 0);
            life_thirst = ((_this select 10) select 1);
            player setDamage ((_this select 10) select 2);            
        };
Ajoutez
Code:
 //Recup de l'id + setVariable.
         private _id = _this select 12;
         player setVariable["id_player", _id, true];
    };


Puis après ce bloc
Code:
//Position
        if (LIFE_SETTINGS(getNumber,"save_civilian_position") isEqualTo 1) then {
            life_is_alive = _this select 10;
            life_civ_position = _this select 11;
            if (life_is_alive) then {
                if !(count life_civ_position isEqualTo 3) then {diag_log format ["[requestReceived] Bad position received. Data: %1",life_civ_position];life_is_alive =false;};
                if (life_civ_position distance (getMarkerPos "respawn_civilian") < 300) then {life_is_alive = false;};
            };
        };

Rajoutez
Code:
//Recup de l'id + setVariable.
        private _id = _this select 13;
        player setVariable["id_player", _id, true];

Et pour finir après ce bloc
Code:
case independent: {
        CONST(life_medicLevel,(_this select 7));
        CONST(life_coplevel,0);
        if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
            life_hunger = ((_this select 9) select 0);
            life_thirst = ((_this select 9) select 1);
            player setDamage ((_this select 9) select 2);
        };

Ajoutez

Code:
//Recup de l'id + setVariable.
        private _id = _this select 11;
        player setVariable["id_player", _id, true];
    };
};

Et enfin rendez vous votre life_server puis dans le fichier fn_queryRequest.sqf qui se situe dans le dossier \Functions\MySQL de votre life_server.

Trouvez cette ligne : case west: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, cop_licenses, coplevel, cop_gear, blacklist, cop_stats, playtime, uid FROM players WHERE pid='%1'",_uid];}; et ajoutez : , uid de cette manière :
case west: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, cop_licenses, coplevel, cop_gear, blacklist, cop_stats, playtime, uid FROM players WHERE pid='%1'",_uid];};

Faite la même chose pour la ligne 31 et 33.

Et voila n'oubliez pas de repack votre life_server.
 
Dernière édition:
  • Like
Les réactions: -Huzah et IceEagle132
Ce serait mieux de donner les modifications à faire plutôt que le fichier à remplacer car si d'autres tutoriels modifient le même fichier et le font de cette manière les gens ne sauront pas faire les deux tutoriels ;)
Yep, je fait sa ce soir merci
 
  • Like
Les réactions: Maxence
Modification effectué, j'ai fait de mon mieux pour que se soit compréhensible
 
  • Like
Les réactions: Majishann
heu pour ce fiché fn_queryRequest.sqf est ce que tu a un model car je suis perdu ^^ stp

car moi jai fait comme celas

_query = switch (_side) do {
// West - 11 entries returned
case west: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, cop_licenses, coplevel, cop_gear, blacklist, cop_stats, playtime FROM players WHERE pid='%1'",_uid];};
// Civilian - 12 entries returned
case civilian: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, civ_licenses, arrested, civ_gear, civ_stats, civ_alive, civ_position, playtime FROM players WHERE pid='%1'",_uid];};
// Independent - 10 entries returned
case independent: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, med_licenses, mediclevel, med_gear, med_stats, playtime FROM players WHERE pid='%1'",_uid];};
};

//Recup de l'id + setVariable.
private _id = _this select 12;
player setVariable["id_player", _id, true];
};

//Recup de l'id + setVariable.
private _id = _this select 13;
player setVariable["id_player", _id, true];

//Recup de l'id + setVariable.
private _id = _this select 13;
player setVariable["id_player", _id, true];
 
Tiens Rosil Ortega Rosil Ortega

fn_requestReceived.sqf
Code:
#include "..\..\script_macros.hpp"
/*
    File: fn_requestReceived.sqf
    Author: Bryan "Tonic" Boardwine
    Description:
    Called by the server saying that we have a response so let's
    sort through the information, validate it and if all valid
    set the client up.
*/
private _count = count _this;
life_session_tries = life_session_tries + 1;
if (life_session_completed) exitWith {}; //Why did this get executed when the client already initialized? Fucking arma...
if (life_session_tries > 3) exitWith {cutText[localize "STR_Session_Error","BLACK FADED"]; 0 cutFadeOut 999999999;};

0 cutText [localize "STR_Session_Received","BLACK FADED"];
0 cutFadeOut 9999999;

//Error handling and junk..
if (isNil "_this") exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if (_this isEqualType "") exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if (count _this isEqualTo 0) exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if ((_this select 0) isEqualTo "Error") exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if (!(getPlayerUID player isEqualTo (_this select 0))) exitWith {[] call SOCK_fnc_dataQuery;};

//Lets make sure some vars are not set before hand.. If they are get rid of them, hopefully the engine purges past variables but meh who cares.
if (!isServer && (!isNil "life_adminlevel" || !isNil "life_coplevel" || !isNil "life_donorlevel")) exitWith {
    [profileName,getPlayerUID player,"VariablesAlreadySet"] remoteExecCall ["SPY_fnc_cookieJar",RSERV];
    [profileName,format ["Variables set before client initialization...\nlife_adminlevel: %1\nlife_coplevel: %2\nlife_donorlevel: %3",life_adminlevel,life_coplevel,life_donorlevel]] remoteExecCall ["SPY_fnc_notifyAdmins",RCLIENT];
    sleep 0.9;
    failMission "SpyGlass";
};

//Parse basic player information.
CASH = parseNumber (_this select 2);
BANK = parseNumber (_this select 3);
CONST(life_adminlevel,(_this select 4));
if (LIFE_SETTINGS(getNumber,"donor_level") isEqualTo 1) then {
    CONST(life_donorlevel,(_this select 5));
} else {
    CONST(life_donorlevel,0);
};

//Loop through licenses
if (count (_this select 6) > 0) then {
    {missionNamespace setVariable [(_x select 0),(_x select 1)];} forEach (_this select 6);
};

//Parse side specific information.
switch (playerSide) do {
    case west: {
        CONST(life_coplevel,(_this select 7));
        CONST(life_medicLevel,0);
        life_blacklisted = _this select 9;
        if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
            life_hunger = ((_this select 10) select 0);
            life_thirst = ((_this select 10) select 1);
            player setDamage ((_this select 10) select 2);
        };
        //Recup de l'id + setVariable.
        private _id = _this select 12;
        player setVariable["id_player", _id, true];
    };

    case civilian: {
        life_is_arrested = _this select 7;
        CONST(life_coplevel, 0);
        CONST(life_medicLevel, 0);
        life_houses = _this select (_count - 3);
        if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
            life_hunger = ((_this select 9) select 0);
            life_thirst = ((_this select 9) select 1);
            player setDamage ((_this select 9) select 2);
        };

        //Position
        if (LIFE_SETTINGS(getNumber,"save_civilian_position") isEqualTo 1) then {
            life_is_alive = _this select 10;
            life_civ_position = _this select 11;
            if (life_is_alive) then {
                if !(count life_civ_position isEqualTo 3) then {diag_log format ["[requestReceived] Bad position received. Data: %1",life_civ_position];life_is_alive =false;};
                if (life_civ_position distance (getMarkerPos "respawn_civilian") < 300) then {life_is_alive = false;};
            };
        };

        //Recup de l'id + setVariable.
        private _id = _this select 13;
        player setVariable["id_player", _id, true];


        {
            _house = nearestObject [(call compile format ["%1",(_x select 0)]), "House"];
            life_vehicles pushBack _house;
        } forEach life_houses;

        life_gangData = _this select (_count - 2);
        if !(count life_gangData isEqualTo 0) then {
            [] spawn life_fnc_initGang;
        };
        [] spawn life_fnc_initHouses;
    };

    case independent: {
        CONST(life_medicLevel,(_this select 7));
        CONST(life_coplevel,0);
        if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
            life_hunger = ((_this select 9) select 0);
            life_thirst = ((_this select 9) select 1);
            player setDamage ((_this select 9) select 2);
        };
   
        //Recup de l'id + setVariable.
        private _id = _this select 11;
        player setVariable["id_player", _id, true];
    };
};


life_gear = _this select 8;
call life_fnc_loadGear;

if (count (_this select (_count - 1)) > 0) then {
    {life_vehicles pushBack _x;} forEach (_this select (_count - 1));
};

life_session_completed = true;

Et l'autre :

fn_queryRequest.sqf
Code:
#include "\life_server\script_macros.hpp"
/*
    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","_queryResult","_tickTime","_tmp"];
_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 {};

if (LIFE_SETTINGS(getNumber,"player_deathLog") isEqualTo 1) then {
    _ownerID addMPEventHandler ["MPKilled", {_this call fn_whoDoneIt}];
};

_ownerID = owner _ownerID;

_query = switch (_side) do {
    // West - 11 entries returned
    case west: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, cop_licenses, coplevel, cop_gear, blacklist, cop_stats, playtime, uid FROM players WHERE pid='%1'",_uid];};
    // Civilian - 12 entries returned
    case civilian: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, civ_licenses, arrested, civ_gear, civ_stats, civ_alive, civ_position, playtime, uid FROM players WHERE pid='%1'",_uid];};
    // Independent - 10 entries returned
    case independent: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, med_licenses, mediclevel, med_gear, med_stats, playtime, uid FROM players WHERE pid='%1'",_uid];};
};

_tickTime = diag_tickTime;
_queryResult = [_query,2] call DB_fnc_asyncCall;

if (EXTDB_SETTING(getNumber,"DebugMode") isEqualTo 1) then {
    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 (_queryResult isEqualType "") exitWith {
    [] remoteExecCall ["SOCK_fnc_insertPlayerInfo",_ownerID];
};

if (count _queryResult isEqualTo 0) exitWith {
    [] remoteExecCall ["SOCK_fnc_insertPlayerInfo",_ownerID];
};

//Blah conversion thing from a2net->extdb
_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 (_new isEqualType "") 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 (_new isEqualType "") then {_new = call compile format ["%1", _new];};
_queryResult set[8,_new];
//Parse data for specific side.
switch (_side) do {
    case west: {
        _queryResult set[9,([_queryResult select 9,1] call DB_fnc_bool)];

        //Parse Stats
        _new = [(_queryResult select 10)] call DB_fnc_mresToArray;
        if (_new isEqualType "") then {_new = call compile format ["%1", _new];};
        _queryResult set[10,_new];

        //Playtime
        _new = [(_queryResult select 11)] call DB_fnc_mresToArray;
        if (_new isEqualType "") then {_new = call compile format ["%1", _new];};
        _index = TON_fnc_playtime_values_request find [_uid, _new];
        if (_index != -1) then {
            TON_fnc_playtime_values_request set[_index,-1];
            TON_fnc_playtime_values_request = TON_fnc_playtime_values_request - [-1];
            TON_fnc_playtime_values_request pushBack [_uid, _new];
        } else {
            TON_fnc_playtime_values_request pushBack [_uid, _new];
        };
        [_uid,_new select 0] call TON_fnc_setPlayTime;
    };

    case civilian: {
        _queryResult set[7,([_queryResult select 7,1] call DB_fnc_bool)];

        //Parse Stats
        _new = [(_queryResult select 9)] call DB_fnc_mresToArray;
        if (_new isEqualType "") then {_new = call compile format ["%1", _new];};
        _queryResult set[9,_new];

        //Position
        _queryResult set[10,([_queryResult select 10,1] call DB_fnc_bool)];
        _new = [(_queryResult select 11)] call DB_fnc_mresToArray;
        if (_new isEqualType "") then {_new = call compile format ["%1", _new];};
        _queryResult set[11,_new];

        //Playtime
        _new = [(_queryResult select 12)] call DB_fnc_mresToArray;
        if (_new isEqualType "") then {_new = call compile format ["%1", _new];};
        _index = TON_fnc_playtime_values_request find [_uid, _new];
        if (_index != -1) then {
            TON_fnc_playtime_values_request set[_index,-1];
            TON_fnc_playtime_values_request = TON_fnc_playtime_values_request - [-1];
            TON_fnc_playtime_values_request pushBack [_uid, _new];
        } else {
            TON_fnc_playtime_values_request pushBack [_uid, _new];
        };
        [_uid,_new select 2] call TON_fnc_setPlayTime;

        /* Make sure nothing else is added under here */
        _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],[]]);

    };

    case independent: {
        //Parse Stats
        _new = [(_queryResult select 9)] call DB_fnc_mresToArray;
        if (_new isEqualType "") then {_new = call compile format ["%1", _new];};
        _queryResult set[9,_new];

        //Playtime
        _new = [(_queryResult select 10)] call DB_fnc_mresToArray;
        if (_new isEqualType "") then {_new = call compile format ["%1", _new];};
        _index = TON_fnc_playtime_values_request find [_uid, _new];
        if !(_index isEqualTo -1) then {
            TON_fnc_playtime_values_request set[_index,-1];
            TON_fnc_playtime_values_request = TON_fnc_playtime_values_request - [-1];
            TON_fnc_playtime_values_request pushBack [_uid, _new];
        } else {
            TON_fnc_playtime_values_request pushBack [_uid, _new];
        };
        [_uid,_new select 1] call TON_fnc_setPlayTime;
    };
};

publicVariable "TON_fnc_playtime_values_request";

_keyArr = missionNamespace getVariable [format ["%1_KEYS_%2",_uid,_side],[]];
_queryResult pushBack _keyArr;

_queryResult remoteExec ["SOCK_fnc_requestReceived",_ownerID];
 
Dernière édition:
  • Like
Les réactions: Said
Bonjour, après essaie de votre script en version Altis Life 4.4,
Un message s'affiche permanent avec l'ecran noir " Envoi de la requête au serveur pour obtenir des informations lecteur UID "

Avez vous une solution à me fournir pour régler ce problème ?

C'est normal, entre la 4.4 et la 5.0, c'est différent. Beaucoup de choses ont changé. Donc c'est normal que ca ne fonctionne pas, parce qu'il faut adapter selon la 4.4 et non la 5.0
 
So I'v tested this and I have a few issues:
NPC's Have ID above there head instead of set realname
Medics & Cops Don't have rank or icon above there head just the ID


20201011104530_1.jpg

20201011104545_1.jpg
 
Dernière édition:
Did you add images for the ranks icon first ?
Then you should check if player is not a npc (not sure), but you should go to the helping section if you need more help.
 
Pourquoi ajoutée une case UID dans le queryRequest ?
Clairement dans core/sessionRequestReceived tu faisait un _this select 0;
ça te récupère le PID de queryRequest :D Et ça t'évite d'ajouter encore une query :D
 
Bonjour,
Je pense que tout est bon ici puisque IceEagle132 IceEagle132 va recréer un topic pour son aide ? :)
 
Dernière édition:
Good morning
I think everything is good here, [USER-115]@Said[/USER] can I close the topic since [USER-184]@IceEagle132[/USER] will recreate a topic? :)
No need to close the topic, Just remove the comments since the post works 100% I just wanted to change how it appeared.
 
Pourquoi ajoutée une case UID dans le queryRequest ?
Clairement dans core/sessionRequestReceived tu faisait un _this select 0;
ça te récupère le PID de queryRequest :D Et ça t'évite d'ajouter encore une query :D
Le _this select 0 retournera le player id du joueur (ce qui n'a aucun intérêt puisqu'il peut être obtenu avec un getPlayerUID tout simplement).
Le but ici était d'avoir l'ID dans la base de données du joueur
 
Bonjour j'aimerai savoir comment faire pour que dans le menu pour donner un objets ce soit l'id et pas le nom du joueurs S'il vous plait