This command is from the Scratch RP script but I cannot get it to work.
When you enter the license plate it will always send the: "there is not player with that license plate" line.
PHP код:
CMD:vmdc(playerid, params[])
{
new plate, string[128];
if(sscanf(params, "d", plate)) return SendClientMessage(playerid, COLOR_GREY, "[Usage:] /vmdc [plate].");
if(PlayerInfo[playerid][pFaction] != 2) return SCM(playerid, COLOR_LIGHTRED, "You are not a police officer.");
foreach(Player,i)
{
if(plate == PlayerInfo[i][pPlate1] || plate == PlayerInfo[i][pPlate2] || plate == PlayerInfo[i][pPlate3])
{
format(string, sizeof(string),"_______________________________[BS-%d]_______________________________", plate);
SCM(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "[Vehicle Owner:] "COL_WHITE"%s.", PlayerInfo[i][pName]);
SCM(playerid, COLOR_BSSD, string);
}
else return SCM(playerid, COLOR_LIGHTRED, "There is no player with that license plate.");
}
return 1;
}
So If I for example would do /vmdc 105892 it would still tell me there is no player with that plate.