19.09.2017, 11:46
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.
Player Info:
So If I for example would do /vmdc 105892 it would still tell me there is no player with that plate.
If anybody knows how to solve this you'd help me bigtime!
Thanks in advance.
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;
}
PHP код:
Plate1 = 105892
Plate2 = 0
Plate3 = 0
If anybody knows how to solve this you'd help me bigtime!
Thanks in advance.