SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 12/10/2011, 01:11 AM   #1
Macintosh
High-roller
 
Macintosh's Avatar
 
Join Date: Aug 2010
Location: Somewhere Far *User Type: Administrator
Posts: 3,635
Reputation: 115
Default [Help] Dealership

hi guys,
I need a little help on my system car dealership.

Here is the code.

pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SECONDARY_ATTACK)
    {
        if(IsPlayerInRangeOfPoint(playerid, 5.0, 2780.4939, -1812.2635, 11.8438)) return ShowPlayerDialog(playerid, DIALOG_CARROS, DIALOG_STYLE_LIST, "Concessionária", "Efetuar Compra de veiculo\nVisualizar Modelo", "Proximo", "Fechar");
    }
    return 1;
}

pawn Code:
if(dialogid == DIALOG_CARROS)
        {
            if(response)
            {
                if(listitem == 0)
                {
                    new Conteudo[3600];
                    SendClientMessage(playerid, -1, "Funcionou");
                    for(new i = 0; i < MAX_VEHICLES; i++)
                    {
                        format(drStr1, sizeof(drStr1), "Nome: %s | Preço: %s\n", GetVehicleNameByModel(VeiculoInfo[playerid][Modelo1] - 400), GetVehiclePreco(i));
                        strcat(Conteudo, drStr1);
                    }
                    ShowPlayerDialog(playerid, DIALOG_COMPRAR_CARRO, DIALOG_STYLE_LIST, "Escolha um Veículo para Comprar", Conteudo, "Comprar", "Cancelar");
                    return 1;
                }
                if(listitem == 1)
                {
                    new Conteudo[3600];
                    for(new i = 0; i < MAX_VEHICLES; i++)
                    {
                        format(drStr1, sizeof(drStr1), "Nome: %s | Preço: %s\n", GetVehicleNameByModel(VeiculoInfo[playerid][Modelo1] - 400), GetVehiclePreco(i));
                        strcat(Conteudo, drStr1);
                    }
                    ShowPlayerDialog(playerid, DIALOG_VISUALIZAR_CARRO, DIALOG_STYLE_LIST, "Escolha um Veículo para Visualizar", Conteudo, "Visualizar", "Cancelar");
                    return 1;
                }
            }
        }

The problem is, I click on any listitem and nothing happens.

Help-me please!
__________________

"É tão estranho
Os bons morrem jovens
Assim parece ser, quando me lembro de você
Que acabou indo embora, cedo demais
"

Os bons morrem jovens (Legião Urbana).

Um dia a gente irá se encontrar numa bem melhor brother

Macintosh is offline   Reply With Quote
Old 12/10/2011, 03:22 AM   #2
Jack_Leslie
High-roller
 
Jack_Leslie's Avatar
 
Join Date: Feb 2011
Location: Australia
Posts: 1,197
Reputation: 98
Default Re: [Help] Dealership

It'll be a problem with the string. Had this problem before with a dealership and dialog, and I just messed around with the string and it worked.
__________________
lol
Jack_Leslie is offline   Reply With Quote
Old 12/10/2011, 02:29 PM   #3
Macintosh
High-roller
 
Macintosh's Avatar
 
Join Date: Aug 2010
Location: Somewhere Far *User Type: Administrator
Posts: 3,635
Reputation: 115
Default Re: [Help] Dealership

so I put in a comment and put print to print If work got in the prompt. More is not picked up :/. help-me! D:
__________________

"É tão estranho
Os bons morrem jovens
Assim parece ser, quando me lembro de você
Que acabou indo embora, cedo demais
"

Os bons morrem jovens (Legião Urbana).

Um dia a gente irá se encontrar numa bem melhor brother

Macintosh is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Car Dealership? akif Help Archive 2 29/06/2011 05:17 PM
Dealership help THE_KNOWN Help Archive 4 25/01/2011 11:57 PM
Car Dealership [HELP...!] Cristiano[TW[ Help Archive 14 25/01/2011 09:11 PM
Car dealership [I will pay] yarrum3 Help Archive 0 19/01/2011 05:14 AM
Dealership :: IceKilla :: Help Archive 3 21/12/2009 02:35 PM


All times are GMT. The time now is 10:34 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.