[Ajuda] DIALOG_STYLE_TABLIST_HEADERS
#1

Boa tarde, bem, estava pesquisando vendo as novas atualizaзхes, e tentei colocar no meu gamemode o DIALOG_STYLE_TABLIST_HEADERS, mas dб errado, tem como alguem dar um help aqui ?

Comando

pawn Код:
COMMAND:ircasa(playerid, params[])
{
    new HouseList[1000];
    SendAdminText(playerid, "/ircasa", params);
    // jб tentei e deu a mesma coisa, como podem ver a format que tem em baixo.
    new list[144];
    format(list, sizeof(list), "Nome\tLevel/Max.\n");
    if (APlayerData[playerid][LoggedIn] == true)
    {
        if (GetPlayerWantedLevel(playerid) < 3)
        {
            if (APlayerData[playerid][PlayerJailed] == 0)
            {
                if (GetPlayerVehicleID(playerid) == 0)
                {
                    for (new i; i < MAX_HOUSESPERPLAYER; i++)
                    {
                        if (APlayerData[playerid][Houses][i] != 0)
                            format(HouseList, sizeof(HouseList), "Nome\tLevel/Max\n%s\n%s\t%i/%i\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName], AHouseData[APlayerData[playerid][Houses][i]][HouseLevel], AHouseData[APlayerData[playerid][Houses][i]][HouseMaxLevel]);
                            //format(HouseList, sizeof(HouseList), "%s%s%s\t%i/%i\n", list, HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName], AHouseData[APlayerData[playerid][Houses][i]][HouseLevel], AHouseData[APlayerData[playerid][Houses][i]][HouseMaxLevel]);
                        else
                            format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Slot vazio");
                    }
                    ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_TABLIST_HEADERS, "Selecione a casa que vocк quer ir:", HouseList, "Selecionar", "Cancelar");
                }
                else
                    SendClientMessage(playerid, 0xFF0000FF, "Vocк precisa estar a pй, para ir atй a sua casa!");
            }
            else
                SendClientMessage(playerid, 0xFF0000FF, "Vocк nгo pode usar o comando /irparacasa quando estб preso!");
        }
        else
            SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nгo pode usar o comando /irparacasa quando estб procurado!");
    }
    else
        return 0;
    return 1;
}
Tambйm deixei ai o print como fica no servidor ..
Reply
#2

Voce nao precisa colocar isso dnv!
Код:
Nome\tLevel/Max
Vc ja definiu la em cima
Код:
format(list, sizeof(list), "Nome\tLevel/Max.\n");
Coloque assim
Код:
COMMAND:ircasa(playerid, params[])
{
	new HouseList[1000];
	SendAdminText(playerid, "/ircasa", params);
    strins(HouseList,"Nome\tLevel/Max.\n",strlen(HouseList));
    if (APlayerData[playerid][LoggedIn] == true)
	{
		if (GetPlayerWantedLevel(playerid) < 3)
		{
			if (APlayerData[playerid][PlayerJailed] == 0)
			{
				if (GetPlayerVehicleID(playerid) == 0)
				{
					for (new i; i < MAX_HOUSESPERPLAYER; i++)
					{
						if (APlayerData[playerid][Houses][i] != 0)
                            format(HouseList, sizeof(HouseList), "%s%s\t%i/%i\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName], AHouseData[APlayerData[playerid][Houses][i]][HouseLevel], AHouseData[APlayerData[playerid][Houses][i]][HouseMaxLevel]);
                            //format(HouseList, sizeof(HouseList), "%s%s%s\t%i/%i\n", list, HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName], AHouseData[APlayerData[playerid][Houses][i]][HouseLevel], AHouseData[APlayerData[playerid][Houses][i]][HouseMaxLevel]);
                        else
							format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Slot vazio");
					}
					ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_TABLIST_HEADERS, "Selecione a casa que vocк quer ir:", HouseList, "Selecionar", "Cancelar");
                }
				else
					SendClientMessage(playerid, 0xFF0000FF, "Vocк precisa estar a pй, para ir atй a sua casa!");
			}
			else
			    SendClientMessage(playerid, 0xFF0000FF, "Vocк nгo pode usar o comando /irparacasa quando estб preso!");
		}
		else
			SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nгo pode usar o comando /irparacasa quando estб procurado!");
	}
	else
	    return 0;
	return 1;
}
Reply
#3

Quote:
Originally Posted by IgorLuiz
Посмотреть сообщение
Voce nao precisa colocar isso dnv!
Код:
Nome\tLevel/Max
Vc ja definiu la em cima
Код:
format(list, sizeof(list), "Nome\tLevel/Max.\n");
Coloque assim
Код:
COMMAND:ircasa(playerid, params[])
{
	new HouseList[1000];
	SendAdminText(playerid, "/ircasa", params);
    // jб tentei e deu a mesma coisa, como podem ver a format que tem em baixo.
    new list[144];
    format(list, sizeof(list), "Nome\tLevel/Max.\n");
    if (APlayerData[playerid][LoggedIn] == true)
	{
		if (GetPlayerWantedLevel(playerid) < 3)
		{
			if (APlayerData[playerid][PlayerJailed] == 0)
			{
				if (GetPlayerVehicleID(playerid) == 0)
				{
					for (new i; i < MAX_HOUSESPERPLAYER; i++)
					{
						if (APlayerData[playerid][Houses][i] != 0)
                            format(HouseList, sizeof(HouseList), "%s\t%s\t%i/%i\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName], AHouseData[APlayerData[playerid][Houses][i]][HouseLevel], AHouseData[APlayerData[playerid][Houses][i]][HouseMaxLevel]);
                            //format(HouseList, sizeof(HouseList), "%s%s%s\t%i/%i\n", list, HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName], AHouseData[APlayerData[playerid][Houses][i]][HouseLevel], AHouseData[APlayerData[playerid][Houses][i]][HouseMaxLevel]);
                        else
							format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Slot vazio");
					}
					ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_TABLIST_HEADERS, "Selecione a casa que vocк quer ir:", HouseList, "Selecionar", "Cancelar");
                }
				else
					SendClientMessage(playerid, 0xFF0000FF, "Vocк precisa estar a pй, para ir atй a sua casa!");
			}
			else
			    SendClientMessage(playerid, 0xFF0000FF, "Vocк nгo pode usar o comando /irparacasa quando estб preso!");
		}
		else
			SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nгo pode usar o comando /irparacasa quando estб procurado!");
	}
	else
	    return 0;
	return 1;
}
Continua a mesma coisa irmгo, igual ao do print ..
Reply
#4

Quote:
Originally Posted by JoaoMonteiro452
Посмотреть сообщение
Continua a mesma coisa irmгo, igual ao do print ..
desculpe coloquei code errado!
coloque esse
Код:
COMMAND:ircasa(playerid, params[])
{
	new HouseList[1000];
	SendAdminText(playerid, "/ircasa", params);
    strins(HouseList,"Nome\tLevel/Max.\n",strlen(HouseList));
    if (APlayerData[playerid][LoggedIn] == true)
	{
		if (GetPlayerWantedLevel(playerid) < 3)
		{
			if (APlayerData[playerid][PlayerJailed] == 0)
			{
				if (GetPlayerVehicleID(playerid) == 0)
				{
					for (new i; i < MAX_HOUSESPERPLAYER; i++)
					{
						if (APlayerData[playerid][Houses][i] != 0)
                            format(HouseList, sizeof(HouseList), "%s%s\t%i/%i\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName], AHouseData[APlayerData[playerid][Houses][i]][HouseLevel], AHouseData[APlayerData[playerid][Houses][i]][HouseMaxLevel]);
                            //format(HouseList, sizeof(HouseList), "%s%s%s\t%i/%i\n", list, HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName], AHouseData[APlayerData[playerid][Houses][i]][HouseLevel], AHouseData[APlayerData[playerid][Houses][i]][HouseMaxLevel]);
                        else
							format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Slot vazio");
					}
					ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_TABLIST_HEADERS, "Selecione a casa que vocк quer ir:", HouseList, "Selecionar", "Cancelar");
                }
				else
					SendClientMessage(playerid, 0xFF0000FF, "Vocк precisa estar a pй, para ir atй a sua casa!");
			}
			else
			    SendClientMessage(playerid, 0xFF0000FF, "Vocк nгo pode usar o comando /irparacasa quando estб preso!");
		}
		else
			SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nгo pode usar o comando /irparacasa quando estб procurado!");
	}
	else
	    return 0;
	return 1;
}
Reply
#5

Quote:
Originally Posted by IgorLuiz
Посмотреть сообщение
desculpe coloquei code errado!
coloque esse
Код:
COMMAND:ircasa(playerid, params[])
{
	new HouseList[1000];
	SendAdminText(playerid, "/ircasa", params);
    strins(HouseList,"Nome\tLevel/Max.\n",strlen(HouseList));
    if (APlayerData[playerid][LoggedIn] == true)
	{
		if (GetPlayerWantedLevel(playerid) < 3)
		{
			if (APlayerData[playerid][PlayerJailed] == 0)
			{
				if (GetPlayerVehicleID(playerid) == 0)
				{
					for (new i; i < MAX_HOUSESPERPLAYER; i++)
					{
						if (APlayerData[playerid][Houses][i] != 0)
                            format(HouseList, sizeof(HouseList), "%s%s\t%i/%i\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName], AHouseData[APlayerData[playerid][Houses][i]][HouseLevel], AHouseData[APlayerData[playerid][Houses][i]][HouseMaxLevel]);
                            //format(HouseList, sizeof(HouseList), "%s%s%s\t%i/%i\n", list, HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName], AHouseData[APlayerData[playerid][Houses][i]][HouseLevel], AHouseData[APlayerData[playerid][Houses][i]][HouseMaxLevel]);
                        else
							format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Slot vazio");
					}
					ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_TABLIST_HEADERS, "Selecione a casa que vocк quer ir:", HouseList, "Selecionar", "Cancelar");
                }
				else
					SendClientMessage(playerid, 0xFF0000FF, "Vocк precisa estar a pй, para ir atй a sua casa!");
			}
			else
			    SendClientMessage(playerid, 0xFF0000FF, "Vocк nгo pode usar o comando /irparacasa quando estб preso!");
		}
		else
			SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nгo pode usar o comando /irparacasa quando estб procurado!");
	}
	else
	    return 0;
	return 1;
}
vlw irmгo deu certo + rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)