• StatutBar qui reste en chargement


    Hello ! J’ai un petit soucis, je m’explique.

    J’ai mis un script de pour une barre de statut en bas à droite de l’écran des joueurs, seul probleme c’est que quand l’on se connecte, la barre reste en " chargement des infos du serveur … ", j’aimerais savoir si vous savez d’ou celà peu venir ?

    Merci d’avant, voiçi les deux scripts !

    statusBar.hpp :

    #define INFINITE 1e+1000  
    
    class osefStatusBar  
    {  
        idd = -1;  
        duration = INFINITE;  
        movingEnable = 0;  
        fadein = 0;  
        fadeout = 0;  
        name = "statusBar";  
    	onLoad = "uiNamespace setVariable ['osefStatusBar', _this select 0]";  
    	onUnload = "uiNamespace setVariable ['osefStatusBar', objNull]";  
    	onDestroy = "uiNamespace setVariable ['osefStatusBar', objNull]";  
        objects[] = {};  
        controls[] = {  
                statusBarText  
        };  
    
    	class statusBarText: Life_RscText  
    	{  
    		idc = 1000;  
    		x = safezoneX + safezoneW - 1.20;  
    		y = safezoneY + safezoneH - 0.04;  
    		w = 1.2;  
    		h = 0.04;  
    		shadow = 2;  
    		colorBackground[] = { 0, 0, 0, 0.8 };  
    		font = "puristaLight";  
    		size = 0.03;  
    		type = 13;  
    		style = 1;  
    		text="Chargement des infos serveurs...";  
    		class Attributes {  
    			align="left";  
    			color = "#FF8700";  
    		};  
    	};  
    };  
    

    statusBar.sqf

    waitUntil {!(isNull (findDisplay 46))};  
    disableSerialization;  
    
    _rscLayer = "osefStatusBar" call BIS_fnc_rscLayer;  
    _rscLayer cutRsc["osefStatusBar","PLAIN"];  
    systemChat format["Bienvenue sur le serveur altis life de la team #EnergieWar %1!", _rscLayer];  
    
    [] spawn {  
    uiSleep 1;  
    _counter = 180;  
    _timeSinceLastUpdate = 0;  
    while {true} do  
    {  
    	uiSleep 1;  
    	_uptime = [time,"HH:MM:SS"] call BIS_fnc_secondsToString;  
    	_counter = _counter - 1;  
    	((uiNamespace getVariable "osefStatusBar")displayCtrl 1000)ctrlSetStructuredText parseText format["||<t color='#c0c0c0'> Reboot: %1</t> | <t color='#00eeee'>Flics: %2</t> | <t color='#900090'>Civils: %3</t> | <t color='#ff0000'>Medics: %4</t> | <t color='#009000'>Cash: %5</t> | <t color='#009000'>Banque: %6</t> | <t color='#00a0a0'>%7</t> | <t color='#ffff00'>Fps: %8</t> | <t color='#808080'>%9</t> ||", _uptime, west countSide playableUnits, civilian countSide playableUnits, independent countSide playableUnits,[gsn_life_cash] call life_fnc_numberText,[gsn_lifeatm_cash] call life_fnc_numberText,mapGridPosition player,round diag_fps,player getVariable ["realname",profileName]];  
    };  
    

    Merci d’avance !

  • statutBar.sqf

    waitUntil {!(isNull (findDisplay 46))};  
    disableSerialization;  
    
    4 cutRsc ["osefStatusBar","PLAIN"];  
    //systemChat format["chargement de vos informations …", _rscLayer];  
    
    [] spawn {  
    	sleep 5;  
    	_counter = 180;  
    	_timeSinceLastUpdate = 0;  
    	while {true} do  
    	{  
    		sleep 1;  
    		_counter = _counter - 1;  
    		((uiNamespace getVariable "osefStatusBar")displayCtrl 1000)ctrlSetText  
        format["| Fps: %2 | %3 Policier | %5 Medecins | %4 Civils | Argent %6 | Banque %7 |", _statusText, round diag_fps,  
        west countSide playableUnits, civilian countSide playableUnits,  
        independent countSide playableUnits,[life_cash] call life_fnc_numberText,[life_atmcash] call  
        life_fnc_numberText, mapGridPosition player, _counter];  
    	};  
    };  
    
  • Logs RPT - Client & Server

Messages 3Vues 370