31.08.2015, 09:05
I tried to do the command/ticket on the dialog. I mean ID and/ticket occur there fines but gives me error.
(2588 : warning 209: function "cmd_ticket" should return a value
(2588 : error 075: input line too long (after substitutions)
(25891) : error 010: invalid function or declaration
25888
}
26891
}
All commands
(2588 : warning 209: function "cmd_ticket" should return a value
(2588 : error 075: input line too long (after substitutions)
(25891) : error 010: invalid function or declaration
25888
}
26891
}
All commands
Код:
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; } 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; } } ShowPlayerDialog(917, DIALOG_AMENDA, DIALOG_STYLE_LIST, "Selecteaza amenda:", "1. Folosire telefon la volan -> 5.000$ amenda\n2. Condus fara centura -> 10.000$ amenda\3. Oprire/Stationare/Parcare Neregulamentara -> 10.000$ amenda\n4. Condus neregulamentar (contra-sens, etc.) -> Suspendarea permisului + 25.000$ amenda\n5. Conducerea vehiculelor cu roti sparte -> 10.000$ amenda\n6. Folosire NOS -> Suspendarea permisului + 10.000$ amenda\n7. Folosire Hidraulice -> Suspendarea permisului + 10.000$ amenda\n8. Faruri stinse (headlights off) (pe timpul noptii, dupa ora 21:00) -> 10.000$ amenda\n9. Condus sub influenta alcoolului -> Suspendarea permisului + 20.000$ amenda\n10. Depasirea limitei de viteza cu:\n-> 10 - 50 km/h -> 10.000$ amenda\n-> 50+ km/h -> Suspendarea permisului de conducere + 20.000$", "Select", "Close"); return 1; }