• Personnalisation interpole


    Version :: 4.4

    Logs :: http://pastebin.com/M37dJd3E

    Bonjour,

    J’ai essayer de changer les crimes dans interpoles avec un systèmes de nombre par catégorie plus simple pour moi. Mais quand je veut voir les crimes de quelqu’un rien ne s’affiche.

    Voici mon config_master.hpp

    crimes[] = {  
    {"STR_Crime_101","1000","101"},  
    {"STR_Crime_102","5500","102"},  
    {"STR_Crime_103","1300","103"},  
    {"STR_Crime_104","2700","104"},  
    {"STR_Crime_105","4300","105"},  
    {"STR_Crime_106","2500","106"},  
    {"STR_Crime_107A","17500","107A"},  
    {"STR_Crime_107B","32000","107B"},  
    {"STR_Crime_108","600","108"},  
    {"STR_Crime_109","80000","109"},  
    {"STR_Crime_110","500","110"},  
    {"STR_Crime_111","7450","111"},  
    {"STR_Crime_201","35000","201"},  
    {"STR_Crime_202","4500","202"},  
    {"STR_Crime_203","12000","203"},  
    {"STR_Crime_204","85000","204"},  
    {"STR_Crime_301","125000","301"},  
    {"STR_Crime_302","95000","302"},  
    {"STR_Crime_303","125000","303"},  
    {"STR_Crime_304","200000","304"},  
    {"STR_Crime_401","32000","401"},  
    {"STR_Crime_402","38000","402"},  
    {"STR_Crime_403","4400","403"},  
    {"STR_Crime_404","225000","404"},  
    {"STR_Crime_405A","250000","405A"},  
    {"STR_Crime_405B","100000","405B"},  
    {"STR_Crime_406","150000","406"},  
    {"STR_Crime_407","225000","407"},  
    {"STR_Crime_501","25000","501"},  
    {"STR_Crime_601","5000","601"},  
    {"STR_Crime_602","4000","602"},  
    {"STR_Crime_603","4500","603"},  
    {"STR_Crime_604","5500","604"},  
    {"STR_Crime_701","16500","701"},  
    {"STR_Crime_801","8500","801"},  
    {"STR_Crime_802","23000","802"},  
    {"STR_Crime_803","5000","803"}  
    };```
    
    Quand j'essaye d'ajouter quelqu'un dans interpole tout fonctionne je voit bien le nom des amendes.
    
    Mais quand j'essaye de voir les crimes de quelqu'un rien ne s'affiche (même après réouverture de l'interpole)
    
    Voici mon mission/core/pmenu/fn_wantedInfo.sqf
    
    

    /*
        File: fn_wantedInfo.sqf
        Author: Bryan “Tonic” Boardwine

    Description:
        Pulls back information about the wanted criminal.
    */
    private["_display","_list","_crimes","_bounty","_mylist","_data"];
    disableSerialization;

    _data = [_this,0,[],[[]]] call BIS_fnc_param;
    _display = findDisplay 2400;
    _list = _display displayCtrl 2402;
    _mylist = [];
    _data = call compile format["%1", _data];
    if(isNil “_data”) exitWith {hint “Failed to fetch crimes”;};
    if(typeName _data != “ARRAY”) exitWith {hint “Failed to fetch crimes”;};
    if(count _data == 0) exitWith {hint “Failed to fetch crimes”;};
    lbClear _list;

    _crimes = _data select 0;
    _bounty = _data select 1;

    {
        _crime = _x;
        if(!(_crime in _mylist)) then
        {
            _mylist pushBack _crime;
            _list lbAdd format[localize “STR_Wanted_Count”,{_x == _crime} count _crimes,localize _crime];
        };
    } foreach _crimes;

    ctrlSetText[2403,format[localize “STR_Wanted_Bounty”,[_bounty] call life_fnc_numberText]]; ```

    Et mon life_server/Functions/wantedSystem/fn_wantedCrimes.sqf

    #include "\life_server\script_macros.hpp"  
    /*  
        File: fn_wantedCrimes.sqf  
        Author: ColinM  
        Assistance by: Paronity  
        Stress Tests by: Midgetgrimm  
    
        Description:  
        Grabs a list of crimes committed by a person.  
    */  
    private["_display","_criminal","_tab","_queryResult","_result","_ret","_crimesDb","_crimesArr","_type"];  
    disableSerialization;  
    _ret = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;  
    _criminal = [_this,1,[],[]] call BIS_fnc_param;  
    
    _query = format["SELECT wantedCrimes, wantedBounty FROM wanted WHERE active='1' AND wantedID='%1'",_criminal select 0];  
    _queryResult = [_query,2] call DB_fnc_asyncCall;  
    
    _ret = owner _ret;  
    _crimesArr = [];  
    
    _type = [_queryResult select 0] call DB_fnc_mresToArray;  
    if(typeName _type == "STRING") then {_type = call compile format["%1", _type];};  
    {  
        switch(_x) do  
        {  
            case "101": {_x = "STR_Crime_101"};  
            case "102": {_x = "STR_Crime_102"};  
            case "103": {_x = "STR_Crime_103"};  
            case "104": {_x = "STR_Crime_104"};  
            case "105": {_x = "STR_Crime_105"};  
            case "106": {_x = "STR_Crime_106"};  
            case "107A": {_x = "STR_Crime_107A"};  
            case "107B": {_x = "STR_Crime_107B"};  
            case "108": {_x = "STR_Crime_108"};  
            case "109": {_x = "STR_Crime_109"};  
            case "110": {_x = "STR_Crime_110"};  
            case "111": {_x = "STR_Crime_111"};  
            case "201": {_x = "STR_Crime_201"};  
            case "202": {_x = "STR_Crime_202"};  
            case "203": {_x = "STR_Crime_203"};  
            case "204": {_x = "STR_Crime_204"};  
            case "301": {_x = "STR_Crime_301"};  
            case "302": {_x = "STR_Crime_302"};  
            case "303": {_x = "STR_Crime_303"};  
            case "304": {_x = "STR_Crime_304"};  
            case "401": {_x = "STR_Crime_401"};  
    
            case "402": {_x = "STR_Crime_402"};  
            case "403": {_x = "STR_Crime_403"};  
            case "404": {_x = "STR_Crime_404"};  
            case "405A": {_x = "STR_Crime_405A"};  
            case "405B": {_x = "STR_Crime_405B"};  
            case "406": {_x = "STR_Crime_406"};  
            case "407": {_x = "STR_Crime_407"};  
            case "501": {_x = "STR_Crime_501"};  
            case "601": {_x = "STR_Crime_601"};  
            case "602": {_x = "STR_Crime_602"};  
            case "603": {_x = "STR_Crime_603"};  
            case "604": {_x = "STR_Crime_604"};  
            case "701": {_x = "STR_Crime_701"};  
            case "801": {_x = "STR_Crime_801"};  
            case "802": {_x = "STR_Crime_802"};  
            case "803": {_x = "STR_Crime_803"};  
        };  
        _crimesArr pushBack _x;  
    }forEach _type;  
    _queryResult set[0,_crimesArr];  
    
    [_queryResult] remoteExec ["life_fnc_wantedInfo",_ret];```
  • @Mikize tu as modifié dans le stringtable ?

  • Oui, j’ai préciser que la partie ajout fonctionnais

  • @Mikize donne les logs rpt et client complet stp

  • @adonis17 client : http://pastebin.com/pm7gVSeu

    Serveur : http://pastebin.com/R6T3cLTY

    Je sais c’est pas beau à voir :’)

  • @Mikize t’aurais pas ce genre de chose ?

    https://i.gyazo.com/f6cd15a267728e177274dcf5bd49c4fc.png

    Car moi sa affiche sa quand il commet ni’mporte quel infraction.

  • @Jaoued exactement

Messages 9Vues 767
Se connecter pour répondre