Dialog help
#1

Hi , i use bondowocopz dealership system and i want to dйveloppe it using textdraws , so i want to store the Model ID value.

i have create a function ShowConcessTD to show the Info of the car by textdraws , when i go to the dealership i got a dialog they have too many Vehicles type , when i choose one i got the vehicles that should be in this type ( at now all working with dialogs ) , when i click one of the vehicles , i got the textdraws , but always when i do this it show always the Informations of the first car in the dialog, this is the script:

variables
PHP код:

enum __dealerInfo
{
    
dialogID,
    
dealerModel,
    
dealerPrice,
    
dealerType
}
new 
Dealership[][__dealerInfo] =
{
    {
0451450000SPORTVEHICLES},
    {
1411450000SPORTVEHICLES},
    {
2415150000SPORTVEHICLES},
    {
3402150000SPORTVEHICLES},
    {
4541200000SPORTVEHICLES},
    {
5477150000SPORTVEHICLES},
    {
6603120000SPORTVEHICLES},
    {
7565120000SPORTVEHICLES},
    {
8429120000SPORTVEHICLES},
    {
9506120000SPORTVEHICLES},
    {
10589120000SPORTVEHICLES},
    {
11559120000SPORTVEHICLES},
    {
0560180000SALOONS},
    {
1562175000SALOONS},
    {
242670000SALOONS},
    {
351640000SALOONS},
    {
451820000SALOONS},
    {
552640000SALOONS},
    {
655070000SALOONS},
    {
754040000SALOONS},
    {
854220000SALOONS},
    {
954740000SALOONS},
    {
10434120000SALOONS},
    
    {
052290000BIKES},
    {
146320000BIKES},
    {
246820000BIKES},
    {
347120000BIKES},
    {
446220000BIKES},
    {
54815000BIKES},
    {
05561500000UNIQUE},
    {
15571500000UNIQUE},
    {
2539500000UNIQUE},
    {
358890000UNIQUE},
    {
457120000UNIQUE},
    {
557210000UNIQUE},
    {
650890000UNIQUE},
    {
745720000UNIQUE},
    
    {
0515300000INDUSTRIAL},
    {
1455250000INDUSTRIAL},
    {
2456250000INDUSTRIAL},
    {
3499250000INDUSTRIAL},
    {
4482500000INDUSTRIAL},
    {
5543500000INDUSTRIAL},
    {
6478200000INDUSTRIAL},
    {
7403175000INDUSTRIAL},
    {
8431165000INDUSTRIAL},
    {
9443200000INDUSTRIAL},
    {
10514220000INDUSTRIAL},
    {
11578240000INDUSTRIAL},
    
    {
041220000LOWRIDER},
    {
153420000LOWRIDER},
    {
253520000LOWRIDER},
    {
353620000LOWRIDER},
    {
456620000LOWRIDER},
    {
556720000LOWRIDER},
    {
657620000LOWRIDER},
    {
757520000LOWRIDER},
    {
048920000OFFROAD},
    {
1495120000OFFROAD},
    {
257990000OFFROAD},
    {
340090000OFFROAD},
    
    {
0469500000AIR},
    {
14872000000AIR},
    {
25132000000AIR},
    {
35192500000AIR}
}; 
dialog
PHP код:
Dialog_DealerShip(playeridresponse)
{
    if(
response)
    {
        for(new 
0sizeof(Dealership); i++)
        {
            if(
Dealership[i][dealerType] == Player[playerid][dealershipChoice])
            {
                
ShowConcessTD(playeridFormatNumber(Dealership[i][dealerPrice]), GetVehicleModelTopSpeed(Dealership[i][dealerModel]), Dealership[i][dealerType], namaCar[Dealership[i][dealerModel] - 400], Dealership[i][dealerModel]);
                return 
1;
            }
        }
    }
    return 
1;

My textdraw function

PHP код:
ShowConcessTD(playeridprice[], MaxSpeedConcessTypeVehName[], VehModel)
{
    new 
string[128];
    
PlayerTextDrawSetPreviewModel(playeridConcess_PTD[playerid][0], VehModel);
    
format(string128"~y~Vehicle Name : ~w~ %s"VehName);
    
convert_encoding(string);
    
PlayerTextDrawSetString(playeridConcess_PTD[playerid][1], string);
    
format(string128"~y~Max speed : ~w~%d ~r~Km/h"MaxSpeed);
    
convert_encoding(string);
    
PlayerTextDrawSetString(playeridConcess_PTD[playerid][2], string);
    
format(string128"~y~Price : ~w~ %s$"price);
    
convert_encoding(string);
    
PlayerTextDrawSetString(playeridConcess_PTD[playerid][3], string);
    
format(string128"~y~Type : ~w~%d"ConcessType);
    
convert_encoding(string);
    
PlayerTextDrawSetString(playeridConcess_PTD[playerid][4], string);
    for(new 
i=05i++) PlayerTextDrawShow(playeridConcess_PTD[playerid][i]);
    for(new 
i=020i++) TextDrawShowForPlayer(playeridConcess_TD[i]);
    
SelectTextDraw(playerid, -1);
    
putinVehicle(playerid);
    return 
1;

to be clear , the problem is from "Dealership[i][dealerModel]" it's not return the correct value.
Reply
#2

Any one plz ?
Reply
#3

Bump, if anyone one know the solution please x)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)