Problem /ticket dialog -
Jimmi - 01.09.2015
I tried to do coamnda/ticket on/ticket but when I write dialog ID only appears in the dialog box Select don't show up fines
Код:
//========================================[CMD:TICKET]=========================================================
CMD:ticket(playerid, params[])
{
new amendat, giveplayerid, string[256], sendername[MAX_PLAYER_NAME], giveplayer, moneys, result;
if(sscanf(params, "u", amendat)) return SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /ticket[PlayerID/PartOfName]");
if(IsPlayerConnected(playerid))
{
if(!IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Nu esti politist!");
return 1;
}
if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " Nu esti la datorie!");
return 1;
}
new amenda [80];
strcat(amenda, "1. Folosire telefon la volan -> 5.000$ amenda\n");
strcat(amenda, "2. Condus fara centura -> 10.000$ amenda\n");
strcat(amenda, "3. Condus neregulamentar (contra-sens, etc.) -> Suspendarea permisului + 25.000$ amenda\n");
strcat(amenda, "4. Oprire/Stationare/Parcare Neregulamentara -> 10.000$ amenda\n");
strcat(amenda, "5. Conducerea vehiculelor cu roti sparte -> 10.000$ amenda\n");
strcat(amenda, "6. Folosire NOS -> Suspendarea permisului + 10.000$ amenda\n");
strcat(amenda, "7. Folosire Hidraulice -> Suspendarea permisului + 10.000$ amenda\n");
strcat(amenda, "8. Faruri stinse (headlights off) (pe timpul noptii, dupa ora 21:00) -> 10.000$ amenda\n");
strcat(amenda, "9. Condus sub influenta alcoolului -> Suspendarea permisului + 20.000$ amenda\n");
strcat(amenda, "10. Depasirea limitei de viteza cu:\n-> 10 - 50 km/h -> 10.000$ amenda\n-> 50+ km/h -> Suspendarea permisului de conducere + 20.000$\n");
ShowPlayerDialog(playerid,769, DIALOG_STYLE_LIST, "Selecteaza amenda:","Select", "Close", "");
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pLevel] < 2) return SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Ticket: {FFFFFF}Nu poti da amenda jucatorilor cu level 1!");
format(string, sizeof(string), "* You gave %s a Ticket costing $%d, reason: %s", giveplayer, moneys, (result));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Offiterul %s ti-a dat o amenda in valoare de $%d, motiv: %s", sendername, moneys, (result));
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "* Scrie /accept ticket, pentru a plati amenda.");
TicketOffer[giveplayerid] = playerid;
TicketMoney[giveplayerid] = moneys;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Acel jucator nu este langa tine !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Acel jucator este offline !");
return 1;
}
return 1;
}
Re: Problem /ticket dialog -
MarvinPWN - 01.09.2015
Sorry, but I don't get what your problem is.
What does not work, and what should happen?
Re: Problem /ticket dialog -
Bomber07 - 01.09.2015
Sorry, I did not understand your problem, give me errors.
Re: Problem /ticket dialog -
Jimmi - 01.09.2015
Does not appear in dialog fines
Re: Problem /ticket dialog -
MarvinPWN - 01.09.2015
PHP код:
ShowPlayerDialog(playerid,769, DIALOG_STYLE_LIST, "Selecteaza amenda:","Select", "Close", "");
to
PHP код:
ShowPlayerDialog(playerid,769, DIALOG_STYLE_LIST, "Selecteaza amenda:",amenda, "Select", "Close");
Re: Problem /ticket dialog -
Logofero - 01.09.2015
to
PHP код:
ShowPlayerDialog(playerid,769, DIALOG_STYLE_LIST, "Selecteaza amenda:",amenda, "Select", "Love", "Pice", "The End");
Re: Problem /ticket dialog -
MarvinPWN - 01.09.2015
@Logofero:
ShowPlayerDialog has only 7 Parameters, but you have 9. You have 2 Parameters too much.