07.10.2018, 05:17
Compile error:
Line 22597:
The whole cmd:
Код:
./includes/commands.pwn(22597) : warning 202: number of arguments does not match definition ./includes/commands.pwn(22597) : warning 202: number of arguments does not match definition ./includes/commands.pwn(22597) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Warnings.
Код:
SendClientMessageEx(playerid, COLOR_WHITE, "You have issued a $%s ticket on %s's %s.", number_format(amount), GetPlayerNameEx(i), GetVehicleName(PlayerVehicleInfo[i][veh][pvId]));
PHP код:
CMD:vticket(playerid, params[])
{
if(IsACop(playerid) || IsATowman(playerid)) {
new vehid, amount;
if(sscanf(params, "ii", vehid, amount)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /vticket [registration] [amount]");
if(PlayerInfo[playerid][pTicketTime] != 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "You must wait within a minute in order to use this command again!");
if(amount > 50000) return SendClientMessageEx(playerid, COLOR_GREY, "The maximum vehicle ticket amount is $50,000.");
if(amount < 1) return SendClientMessageEx(playerid, COLOR_GREY, "You can't ticket any vehicle below $1.");
new string[128], Float: x, Float: y, Float: z, veh = -1;
GetVehiclePos(vehid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z)) {
foreach(new i: Player) {
if((veh = GetPlayerVehicle(i, vehid)) != -1) {
PlayerVehicleInfo[i][veh][pvTicket] += amount;
PlayerInfo[playerid][pTicketTime] = 60;
SendClientMessageEx(playerid, COLOR_WHITE, "You have issued a $%s ticket on %s's %s.", number_format(amount), GetPlayerNameEx(i), GetVehicleName(PlayerVehicleInfo[i][veh][pvId]));
format(string, sizeof(string), "[VTICKET] Officer %s has ticketed %s's %s (%d) for $%s.", GetPlayerNameEx(playerid), GetPlayerNameEx(i), GetVehicleName(PlayerVehicleInfo[i][veh][pvId]), PlayerVehicleInfo[i][veh][pvSlotId], number_format(amount));
GroupLog(PlayerInfo[playerid][pMember], string);
break;
}
}
/*if((veh = IsDynamicCrateVehicle(vehid)) != -1) {
if(ValidGroup(CrateVehicle[veh][cvGroupID])) {
if(PlayerInfo[playerid][pMember] == CrateVehicle[veh][cvGroupID]) return SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Your group owns this vehicle you can't put a ticket on it!");
CrateVehicle[veh][cvTickets] += amount;
PlayerInfo[playerid][pTicketTime] = 60;
SendClientMessageEx(playerid, COLOR_WHITE, "You have issued a $%s ticket on the %s.", number_format(amount), VehicleName[CrateVehicle[veh][cvModel] - 400]);
format(string, sizeof(string), "[VTICKET] Officer %s has ticketed %s's %s (%d) for $%s.", GetPlayerNameEx(playerid), arrGroupData[CrateVehicle[veh][cvGroupID]][g_szGroupName], VehicleName[CrateVehicle[veh][cvModel] - 400], CrateVehicle[veh][cvId], number_format(amount));
GroupLog(PlayerInfo[playerid][pMember], string);
SaveCrateVehicle(veh);
} else veh = -1;
}*/
if(veh == -1) {
SendClientMessageEx(playerid, COLOR_GRAD2, "This vehicle does not have any registration!");
}
}
else SendClientMessageEx(playerid, COLOR_GRAD2, "You need to be near such vehicle!");
}
else SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
return 1;
}