Dialog not showed correctly
#1

PHP код:
Dialog:stats(playeridresponselistiteminputtext[])
{
    if(
response)
    {
        new 
id g_SelectedOption[playerid];
        if(!
IsPlayerConnected(id) || !IsPlayer(idloggedin))
            return 
1;
        new 
gang g_Player[id][gangid], fmt[1024], title[56], gangstr[56];
        
format(title56"%p's statistics"id);
        switch(
listitem)
        {
            case 
0:
            {
                if(
gang == -1)
                    
strcat(gangstr"{FF0000}None");
                else
                    
format(gangstr56"{%s}[%s]%s"g_Gang[gang][gcolour], g_Gang[gang][gtag], g_Gang[gang][gname]);
                new 
modestr[28];
                switch(
g_Player[id][playermode])
                {
                    case 
PMODE_NORMAL:
                    {
                        
format(modestr28"Normal");
                    }
                    case 
PMODE_PEACE:
                    {
                        
format(modestr28"Peace");
                    }
                    default:
                    {
                        
format(modestr28"None");
                    }
                }
                
format(fmt1024"{FFFFFF} \
                                "
BLUE"General"WHITE"\n\
                                Account id \t%d\n \
                                Registered date \t%n\n \
                                Last logged in \t%n\n \
                                Kills \t\t%d\n \
                                Deaths \t%d\n \
                                K/D Ratio \t%.2f\n \
                                Money \t"
GREEN"${FFFFFF}%m\n \
                                Coins \t\t%d\n \
                                Mode \t%s \n \
                                Playtime \t%d Hours %d Minutes %d Seconds\n \
                                Reaction test win \t%d \n \
                                Math quiz win \t%d \n \
                                Max Spree \t%d \n \
                                Gravity \t%f\n \
                                Skin \t\t%d\n \
                                Reaction Test Record \t%.2f Seconds\n \
                                Total Arrest \t%d\n \
                                "
RED"Minigames"WHITE"\n\
                                Race Won \t\t%d \n \
                                Derby Won \t\t%d \n \
                                Parkour Completed \t%d \n \
                                Skydive Completed \t%d \n \
                                Vehicle Parkour Completed \t%d \n \
                                Moneybag Found \t%d \n \
                                "
GREY"Jobs"WHITE"\n\
                                Bus Completed \t%d \n \
                                Pizza Completed \t%d \n \
                                Ojek Completed \t%d \n \
                                Taxi Completed \t%d \n \
                                Trashmaster Completed \t%d \n \
                                Truck Completed \t%d \n \
                                Sweeper Completed \t%d \n \
                                "
PURPLE"Others"WHITE"\n\
                                Total Donasi \t$%m\n \
                                Packet Loss \t%.2f\n \
                                Gang \t\t%s"
g_Player[id][dbid], g_Player[id][registered], g_Player[id][lastlogged], g_Player[id][kills], g_Player[id][deaths], ((g_Player[id][kills] * 1.0) / g_Player[id][deaths]), GetPlayerMoney(id), g_Player[id][coins], modestrg_Player[id][logintime] / 3600, (g_Player[id][logintime] % 3600) / 60g_Player[id][logintime] % 60g_Player[id][reactiontest], g_Player[id][mathquiz], g_Player[id][maxspree], GetPlayerGravity(id), GetPlayerSkin(id), floatdiv(float(g_Player[id][reactiontestticks]), 1000), g_Player[id][arrest], g_Player[id][racewon], g_Player[id][derbywon], g_Player[id][parkourcomplete], g_Player[id][skydivecomplete], g_Player[id][vparkourcomplete], g_Player[id][moneybagfound], g_Player[id][buscompleted], g_Player[id][pizzacompleted], g_Player[id][ojekcompleted], g_Player[id][taxicompleted], g_Player[id][trashcompleted], g_Player[id][truckcompleted], g_Player[id][sweepercompleted], g_Player[id][totaldonation], NetStats_PacketLossPercent(id), gangstr);
                
Dialog_Show(playerid""DIALOG_STYLE_MSGBOXtitlefmtCLOSE"");
            }
            case 
1:
            {
                new 
query[256], Cache:cachecountrankpointcombo;
                
strcat(fmt"Rank\tTrack Name\tPoint\tCombo\n");
                foreach(new 
Drifts)
                {
                    
mysql_format(g_Sqlquery256"SELECT point, combo, 1  + (SELECT count(*) from drift_points a WHERE a.point > b.point AND driftid = %d) as rank FROM drift_points b WHERE playerid = %d AND driftid = %d ORDER BY rank ASC LIMIT 1"g_Drift[i][drid], g_Player[id][dbid], g_Drift[i][drid]);
                    
cache mysql_query(g_Sqlquerytrue);
                    
cache_get_row_count(count);
                    if(
count)
                    {
                        
cache_get_value_index_int(00point);
                        
cache_get_value_index_int(01combo);
                        
cache_get_value_index_int(02rank);
                        
format(fmt512"%s#%d\t%s\t%d\t%d\n"fmtrankg_Drift[i][drname], pointcombo);
                    }
                    else
                        
format(fmt512"%s-\t%s\t-\t-\n"fmtg_Drift[i][drname]);
                    
cache_delete(cache);
                }
                
Dialog_Show(playerid""DIALOG_STYLE_TABLIST_HEADERStitlefmtCLOSE"");
            }
            case 
2:
            {
                new 
name[MAX_PLAYER_NAME];
                
GetPlayerName(idnameMAX_PLAYER_NAME);
                
cmd_achievements(GetCommandID("achievements"), playeridname);
            }
        }
    }
    return 
1;



The text should be more left
EDIT:I found out that every msg dialog do the same with this,what could be the problem?

EDIT2:I found out that it's easyDialog.inc
I got this error now.

Код:
easyDialog.inc(63) : error 004: function "va_formatex" is not implemented
PHP код:
stock Dialog_Open(playerid, function[], stylecaption[], info[], button1[], button2[], va_args<>)
{
    static
        
string[4096]
    ;
    if (!
strlen(info))
    {
        return 
0;
    }
    
va_formatex(string4096infova_start<7>);
    
ShowPlayerDialog(playerid32700stylecaptionstringbutton1button2);
    
s_DialogOpened[playerid] = 1;
    
strpack(s_DialogName[playerid], function, 32 char);
    return 
1;

Reply
#2

The image above is when I'm using your version of easyDialog while the error is when I revert back to Emmet's one.
TABLIST_HEADERS is working fine
Reply
#3

I've test the includes with Grandlarc gamemode and it works fine.
The thing is,it's not just /stats cmd,it's all cmd with msgbox dialogs.

my includes:

PHP код:
// @Credits: SA-MP team
#include <a_samp>
#undef MAX_PLAYERS
#define MAX_PLAYERS 50
// @Credits: Gammix, ****** and all fixes contributor

#define FIX_OnPlayerSpawn         0
#define FIX_HideGameText         1
#define FIX_SpawnPlayer         0
#define FIX_PutPlayerInVehicle     0
#include <fixes>
// @Credits: BlueG, maddinat0r, and all MySQL plugins contributor
#include <a_mysql>
// @Credits: ******, Emmet_, maddinat0r and all sscanf2 plugins Contributors
#include <sscanf2>
// @Credits: Incognito and all streamer plugins Contributors
#define STREAMER_ENABLE_TAGS
#define STREAMER_CP_SD 15.0
#include <streamer>
// @Credits: Zeex
// #include <profiler>
// @Credits: Pottus
#include <colandreas>
// @Credits: Kurta999, ******, and all YSF contributor
#include <YSF>
// @Credits: Slice
#include <SKY>
// @Credits: Gamer_Z
#include <DriftPointsCounter>
// @Credits: maddinat0r
#include <log-plugin>
// @Credits: ziggi
#include <FCNPC>
// #define _DEBUG         0
#include <evf>

// @Credits: ******, Misiur, and all YSI Contributors
// #include <YSI-Includes\YSI\y_debug>
forward VA_OnScriptInit(); // YSI Fix
#define MAX_HOOK_REPLACEMENTS 20
#include <YSI-Includes\YSI\y_timers>
#include <YSI-Includes\YSI\y_bit>
#include <YSI-Includes\YSI\y_vehicledata>
// #include "anticheat.pwn"

// @Credits: Incognito and all irc plugins Contributors
#include <irc>
// @Credits: Slice
#include <formatex>
// @Credits: Gammix
#include <dialogs>
// @Credits: Emmet_
#include <easyDialog>
#define STRLIB_USE_FORMATEX
#include <strlib>
// @Credits: Southclaw
#include <progress2>
// @Credits: Whitetiger
#include <geolocation>
// @Credits: Ryder`
#include <CTime>
// @Credits: Yashas and all smartcmd contributor
#define MAX_COMMANDS         700
#define MAX_PUBLIC_FUNCTIONS 1500
#include <smartcmd/smartcmd>
// @Credits: Slice
#define DEFAULT_THOUSAND_SEP ','
#include <formatnumber>
// @Credits: Yashas
#define BUSTAIM_IS_PAUSED_FUNCTION IsPlayerPaused
#include <BustAim>
// @Credits: Slice
// #define WC_DEBUG true 
#include <weapon-config>
// @Credits: MP2
#include <cuffs>
// @Credits: AbyssMorgan
#define ENABLE_3D_TRYG_YSI_SUPPORT
#include <SAM/3DTryg>
#include <Missile>
#include <magic>
#include <vehpara>
#include <VehicleMissileCol>
// @Credits: Ostgot
#include <nex-ac>
#include <spike_strip>
// @Credits: Crayder
#include <garage_block> 
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)