ZeCo Posted November 7, 2015 Posted November 7, 2015 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
0 ZeCo Posted November 7, 2015 Author Posted November 7, 2015 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)
0 Maje Posted November 7, 2015 Posted November 7, 2015 (edited) 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 November 7, 2015 by Maje
0 ZeCo Posted November 7, 2015 Author Posted November 7, 2015 Nu inteleg ce vrei sa zici.. Daca ma poti ajuta, imi poti face comanda? . Daca ai timp.
0 NoNamed Posted November 7, 2015 Posted November 7, 2015 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 .
0 Maje Posted November 7, 2015 Posted November 7, 2015 (edited) Clar....is very very simple Edited November 7, 2015 by Maje
0 ZeCo Posted November 7, 2015 Author Posted November 7, 2015 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
0 NoNamed Posted November 7, 2015 Posted November 7, 2015 Banuiesc ca dialogul va fi foarte lung , asa ca iti recomand sa-l faci in strcat . Faci un strcat pe mai multe bucati pentru fiecare masina , apoi legi fiecare bucata intr-un singur strcat si il afisezi in dialog .
0 ZeCo Posted November 7, 2015 Author Posted November 7, 2015 Totusi, nu am rezolvat.. Inca astept pe cineva sa-mi explice mai bine
0 Джо Posted November 11, 2015 Posted November 11, 2015 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; }
Question
ZeCo
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
11 answers to this question
Recommended Posts