Dialog Help me Please
#8

Quote:
Originally Posted by 0x88
Посмотреть сообщение
What do you mean? Explain more with code
include used: https://sampforum.blast.hk/showthread.php?tid=570213

check the images below

1 - The normal code is that, can you see objects in list and spawning the object normally.

https://i.imgur.com/gxFyJWJ.png
PHP код:
Dialog:FurniturePurchase2(playeridresponselistiteminputtext[])
{
    if(!
response) return Dialog_Show(playeridFurniturePurchaseDIALOG_STYLE_LIST"Selecione uma categoria de mуveis"GetHouseCategoryList(), "Selecionar""Cancelar");
    
gstr[0] = EOS;
    
strcat(gstr"Nome da mobнlia\tCusto\n");
    for(new 
0MAX_FURNITUREx++)
    {
        if(
FurniData[x][fSubCategory] == listitem && FurniData[x][fCategory] == GetPVarInt(playerid"FurnCat") && FurniData[x][fModel] != 0)
        {
            
format(sgstrsizeof(sgstr), "%s\t$%s\n"FurniData[x][fuName], format_cash(FurniData[x][fPrice]));
            
strcat(gstrsgstr);
        }
    }
    
Dialog_Show(playeridFurniturePurchase3DIALOG_STYLE_TABLIST_HEADERS"Comprar mуveis"gstr"Selecionar""Cancelar");
    return 
true;

2 - This code is modified as I want, but different from the above code, is not spawning the objects.
When click on the object to spawn, it just closes the dialog.

https://i.imgur.com/Ldf8gli.png
PHP код:
Dialog:FurniturePurchase2(playeridresponselistiteminputtext[])
{
    if(!
response) return Dialog_Show(playeridFurniturePurchaseDIALOG_STYLE_LIST"Selecione uma categoria de mуveis"GetHouseCategoryList(), "Selecionar""Cancelar");
    
gstr[0] = EOS;
    
strcat(gstr"Nome da mobнlia\tCusto\n");
    for(new 
0MAX_FURNITUREx++)
    {
        if(
FurniData[x][fSubCategory] == listitem && FurniData[x][fCategory] == GetPVarInt(playerid"FurnCat") && FurniData[x][fModel] != 0)
        {
            
format(sgstrsizeof(sgstr), "%i\t%s~n~$%s\n"FurniData[x][fModel], FurniData[x][fuName], format_cash(FurniData[x][fPrice]));
            
strcat(gstrsgstr);
        }
    }
    
ShowPlayerDialog(playeridFurniturePurchase3DIALOG_STYLE_PREVIEW_MODEL"Comprar mуveis"gstr"Selecionar""Cancelar");
    return 
true;

Reply


Messages In This Thread
Dialog Help me Please - by Revolts - 26.10.2017, 18:39
Re: Dialog Help me Please - by maksicnm - 26.10.2017, 18:42
Re: Dialog Help me Please - by Revolts - 27.10.2017, 00:35
Re: Dialog Help me Please - by Gammix - 27.10.2017, 04:52
Re: Dialog Help me Please - by Revolts - 27.10.2017, 07:38
Re: Dialog Help me Please - by Revolts - 27.10.2017, 13:27
Re: Dialog Help me Please - by 0x88 - 27.10.2017, 13:48
Re: Dialog Help me Please - by Revolts - 27.10.2017, 14:26
Re: Dialog Help me Please - by Gammix - 27.10.2017, 18:11
Re: Dialog Help me Please - by Revolts - 27.10.2017, 18:27

Forum Jump:


Users browsing this thread: 1 Guest(s)