How to make this dialog? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to make this dialog? (
/showthread.php?tid=659681)
How to make this dialog? -
Longover - 12.10.2018
Problem:
Код:
C:\Users\Sorin\Desktop\GM AC\gamemodes\ASCARDIA.pwn(23715) : warning 202: number of arguments does not match definition
Command:
Код:
CMD:jobs(playerid, params[])
{
new pDialog[MAX_STRING],pDialog2[MAX_STRING],allstring[MAX_STRING];
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa fi logat pentru a scrie comenzi.");
if(CP[playerid] < 1 && IsCollectingRubbish[playerid] < 1 && !IsATruck(GetPlayerVehicleID(playerid)) && MechanicCallTime[playerid] < 1 && CheckBus[playerid] < 1 && GotoMats[playerid] < 1 && CarJacker[playerid] < 1)
{
format(pDialog, sizeof(pDialog)), "{08ce1f}Detectiv {ffcc00}-\n{ff0000}Dealer De Droguri {ffcc00}$\n{08ce1f}Baiat Cu Pizza {ffcc00}$$$\n{08ce1f}Sofer De Autobuz {ffcc00}$$$\n{08ce1f}Mecanic {ffcc00}$$$\n{08ce1f}Dealer De Arme {ffcc00}$$\n{08ce1f}Gunoier {ffcc00}$$$\n{08ce1f}Pescar {ffcc00}$$\n{08ce1f}Tirist {ffcc00}$$$\n{08ce1f}Fermier {ffcc00}$$\n{ff0000}Hot De Masini {ffcc00}$$");
format(pDialog2, sizeof(pDialog2)), "{ff0000}Taietor de iarba {ffcc00}$$\n{ff0000}Vanzator de inghetata {ffcc00}$$$\n{ff0000}Livrator {ffcc00}$$\n{ff0000}Vanzator de hotdogi {ffcc00}$$");
format(allstring, sizeof(allstring), "%s\n%s", pDialog, pDialog2);
ShowPlayerDialog(playerid, DIALOG_JOBS, DIALOG_STYLE_LIST,"Job-uri:", allstring,"Alege", "Anuleaza");
return 1;
}
else
{
ShowPlayerDialog(playerid, DIALOG_JOBULETES, DIALOG_STYLE_MSGBOX, "Anulare Checkpoint", "Esti sigur ca vrei sa anulezi checkpoint-ul curent?", "Da", "Nu");
}
return 1;
}
Re: How to make this dialog? -
Chyakka - 12.10.2018
Код:
format(pDialog, sizeof(pDialog)), "{08ce1f}Detectiv {ffcc00}-\n{ff0000}Dealer De Droguri {ffcc00}$\n{08ce1f}Baiat Cu Pizza {ffcc00}$$$\n{08ce1f}Sofer De Autobuz {ffcc00}$$$\n{08ce1f}Mecanic {ffcc00}$$$\n{08ce1f}Dealer De Arme {ffcc00}$$\n{08ce1f}Gunoier {ffcc00}$$$\n{08ce1f}Pescar {ffcc00}$$\n{08ce1f}Tirist {ffcc00}$$$\n{08ce1f}Fermier {ffcc00}$$\n{ff0000}Hot De Masini {ffcc00}$$");
format(pDialog2, sizeof(pDialog2)), "{ff0000}Taietor de iarba {ffcc00}$$\n{ff0000}Vanzator de inghetata {ffcc00}$$$\n{ff0000}Livrator {ffcc00}$$\n{ff0000}Vanzator de hotdogi {ffcc00}$$");
format(allstring, sizeof(allstring), "%s\n%s", pDialog, pDialog2);
You shouldn't be using two closing brackets at the end of sizeof, in the case of formats anyway.
Replace:
Код:
sizeof(pDialog2))
sizeof(pDialog))
With:
Код:
sizeof(pDialog2)
sizeof(pDialog)
Re: How to make this dialog? -
Dennis12 - 13.10.2018
Код:
format(pDialog, sizeof(pDialog), "{08ce1f}Detectiv {ffcc00}-\n{ff0000}Dealer De Droguri {ffcc00}$\n{08ce1f}Baiat Cu Pizza {ffcc00}$$$\n{08ce1f}Sofer De Autobuz {ffcc00}$$$\n{08ce1f}Mecanic {ffcc00}$$$\n{08ce1f}Dealer De Arme {ffcc00}$$\n{08ce1f}Gunoier {ffcc00}$$$\n{08ce1f}Pescar {ffcc00}$$\n{08ce1f}Tirist {ffcc00}$$$\n{08ce1f}Fermier {ffcc00}$$\n{ff0000}Hot De Masini {ffcc00}$$");
format(pDialog2, sizeof(pDialog2), "{ff0000}Taietor de iarba {ffcc00}$$\n{ff0000}Vanzator de inghetata {ffcc00}$$$\n{ff0000}Livrator {ffcc00}$$\n{ff0000}Vanzator de hotdogi {ffcc00}$$");
format(allstring, sizeof(allstring), "%s\n%s", pDialog, pDialog2);