Jump to content
  • 0

/cars pe dialog


ZeCo

Question

Problema intalnita (descriere): Nu reusesc sa fac acesta comanda pe dialog:

if(strcmp(cmd, "/car", true) == 0)
    {
    if(IsPlayerConnected(playerid))
        {
                new carkey = PlayerData[playerid][pPcarkey];
                new carkey2 = PlayerData[playerid][pPcarkey2];
                new carkey3 = PlayerData[playerid][pPcarkey3];
                new carkey4 = PlayerData[playerid][pPcarkey4];
                new carkey5 = PlayerData[playerid][pPcarkey5];
                SendClientMessage(playerid, COLOR_RED," ");
                SendClientMessage(playerid, COLOR_LIGHTGREEN,"|_______________Masini Personale_______________|");
                if(carkey != 999 && carkey != 0)
                {
                    format(string, sizeof(string), "Slot 1| Model: [%s]  Valoare: [%d]  Culoare 1: [%d]  Culoare 2: [%d]  Incuiata: [%d]  Numar: [%s]  ", CarData[carkey][cDescription], CarData[carkey][cValue], CarData[carkey][cColorOne], CarData[carkey][cColorTwo], CarData[carkey][cLockk], CarData[carkey][cNum]);
                    SendClientMessage(playerid, COLOR_GRAD5,string);
                }
                 if(carkey2 != 999 && carkey2 != 0)
                {
                    format(string, sizeof(string), "Slot 2| Model: [%s]  Valoare: [%d]  Culoare 1: [%d]  Culoare 2: [%d]  Incuiata: [%d]  Numar: [%s]  ", CarData[carkey2][cDescription], CarData[carkey2][cValue], CarData[carkey2][cColorOne], CarData[carkey2][cColorTwo], CarData[carkey2][cLockk], CarData[carkey2][cNum]);
                    SendClientMessage(playerid, COLOR_GRAD5,string);
                }
                if(carkey3 != 999 && carkey3 != 0)
                {
                    format(string, sizeof(string), "Slot 3| Model: [%s]  Valoare: [%d]  Culoare 1: [%d]  Culoare 2: [%d]  Incuiata: [%d]  Numar: [%s]  ", CarData[carkey3][cDescription], CarData[carkey3][cValue], CarData[carkey3][cColorOne], CarData[carkey3][cColorTwo], CarData[carkey3][cLockk], CarData[carkey3][cNum]);
                    SendClientMessage(playerid, COLOR_GRAD5,string);
                }
                if(carkey4 != 999 && carkey4 != 0)
                {
                    format(string, sizeof(string), "Slot 4| Model: [%s]  Valoare: [%d]  Culoare 1: [%d]  Culoare 2: [%d]  Incuiata: [%d]  Numar: [%s]  ", CarData[carkey4][cDescription], CarData[carkey4][cValue], CarData[carkey4][cColorOne], CarData[carkey4][cColorTwo], CarData[carkey4][cLockk], CarData[carkey4][cNum]);
                    SendClientMessage(playerid, COLOR_GRAD5,string);
                }
                return 1;
        }
        return 1;
    }


Ero(area / rile) / warning-(ul / urile): Mi-a dat 26. 
Liniile de cod / sursa / script-ul(obligatoriu):
Imagini / Video (optional): 
Ati incercat sa rezolvati singur?:  Da

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

Practic eu am pus in loc de ”SendClientMesage” ”ShowPlayerDialog”.

error 035: argument type mismatch (argument 3)

error 035: argument type mismatch (argument 3)

 error 035: argument type mismatch (argument 3)

 error 035: argument type mismatch (argument 3)

Link to comment
Share on other sites

  • 0

Ai pus si 

DIALOG_STYLE_MSGBOX -> Tipul dialogului dorit

Adica ceva gen eu vreau sa fac un dialog de /gps si pun asa  sa le arate gen lista :

 ShowPlayerDialog(playerid, DIALOG_GPS + 1, DIALOG_STYLE_LIST, "GPS - Important Locations", "1. Spawn\n2. Bank\n3. CNN\n4. Car Dealership", "Select", "Cancel");

Edited by Maje
Link to comment
Share on other sites

  • 0
4 minutes ago, SupremAngel. said:

Nu inteleg ce vrei sa zici.. Daca ma poti ajuta, imi poti face comanda? :).

Daca ai timp.

Nu ai voie sa ceri comenzi . E simplu sa o faci . Undeva la inceputul gamemode-ului adauga #define DIALOGCARS unnumar . Apoi la comanda /cars adaugi ShowPlayerDialog(playerid, DIALOGCARS , DIALOG_STYLE_LIST, "Masinile tale personale", "1.Masina 1\nMasina 2\nETC"); este foarte simplu .

Link to comment
Share on other sites

  • 0
10 minutes ago, NoNamed said:

Nu ai voie sa ceri comenzi . E simplu sa o faci . Undeva la inceputul gamemode-ului adauga #define DIALOGCARS unnumar . Apoi la comanda /cars adaugi ShowPlayerDialog(playerid, DIALOGCARS , DIALOG_STYLE_LIST, "Masinile tale personale", "1.Masina 1\nMasina 2\nETC"); este foarte simplu .

Asta am facut. 

Dar la datele de la masini cum fac?.. Sa-mi apara ceva de gen:

Model: Monster B  | Valoare: 90.000.000$ | Culoare 1: 211  Culoare 2: 222 | Incuiata: Da | Numar: LS 06 FFF 

Link to comment
Share on other sites

  • 0

Ti s-a explicat daca nu ai inteles e treaba ta.

Din timpul meu liber (foarte putin in ultima vreme) ti-am facut comanda.

Daca nu merge,atunci pune case 2 3 4 etc.

Si asa mai departe..

#define DIALOG_CEVREITU 26

if(strcmp(cmd, "/car", true) == 0)
    {
    if(IsPlayerConnected(playerid))
        {
                new carkey = PlayerData[playerid][pPcarkey];
                new carkey2 = PlayerData[playerid][pPcarkey2];
                new carkey3 = PlayerData[playerid][pPcarkey3];
                new carkey4 = PlayerData[playerid][pPcarkey4];
                new carkey5 = PlayerData[playerid][pPcarkey5];
                new string[1000];
				strcat(string,"{FCA902}|| Masini personale ||\n\n");
                if(carkey != 999 && carkey != 0)
                {
				case 1:
				{
				strcat(string,"{FB0404}[Masini Personale]{FFFFFF} Slot 1| Model: [%s]  Valoare: [%d]  Culoare 1: [%d]  Culoare 2: [%d]  Incuiata: [%d]  Numar: [%s]  ", CarData[carkey][cDescription], CarData[carkey][cValue], CarData[carkey][cColorOne], CarData[carkey][cColorTwo], CarData[carkey][cLockk], CarData[carkey][cNum]\n);
				}
                 if(carkey2 != 999 && carkey2 != 0)
                {
				case 1:
				{
				strcat(string,"{FB0404}[Masini Personale]{FFFFFF} Slot 2| Model: [%s]  Valoare: [%d]  Culoare 1: [%d]  Culoare 2: [%d]  Incuiata: [%d]  Numar: [%s]  ", CarData[carkey][cDescription], CarData[carkey][cValue], CarData[carkey][cColorOne], CarData[carkey][cColorTwo], CarData[carkey][cLockk], CarData[carkey][cNum]\n);
				}
                if(carkey3 != 999 && carkey3 != 0)
                {
				case 1:
				{
				strcat(string,"{FB0404}[Masini Personale]{FFFFFF} Slot 3| Model: [%s]  Valoare: [%d]  Culoare 1: [%d]  Culoare 2: [%d]  Incuiata: [%d]  Numar: [%s]  ", CarData[carkey][cDescription], CarData[carkey][cValue], CarData[carkey][cColorOne], CarData[carkey][cColorTwo], CarData[carkey][cLockk], CarData[carkey][cNum]\n);
				}
                if(carkey4 != 999 && carkey4 != 0)
                {
				case 1:
				{
				strcat(string,"{FB0404}[Masini Personale]{FFFFFF} Slot 4| Model: [%s]  Valoare: [%d]  Culoare 1: [%d]  Culoare 2: [%d]  Incuiata: [%d]  Numar: [%s]  ", CarData[carkey][cDescription], CarData[carkey][cValue], CarData[carkey][cColorOne], CarData[carkey][cColorTwo], CarData[carkey][cLockk], CarData[carkey][cNum]\n);
				}
				ShowPlayerDialog(playerid, 26, DIALOG_STYLE_MSGBOX,"{FF0101}Veziti {0325FF}masini",string,"Ok","");
                return 1;
        }
        return 1;
    }

 

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.