У меня есть готовый код, но идёт ошибка invalid function or declaration. Проверял ; , {}.
Код:
if(strcmp(cmd, "/mdc", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Вы не полицейский!");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "{F74848}» Введите: {FFFFFF} /mdc [id]");
giveplayerid = ReturnUser(tmp);
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
SendClientMessage(playerid, TEAM_BLUE_COLOR,"______-=МОБИЛЬНЫЙ КОМПЬЮТЕР ДАННЫХ=-_______");
format(string, sizeof(string), "Имя : %s", sendername), SendClientMessage(playerid, COLOR_WHITE,string);
format(string, sizeof(string), "Преступление : %s", PlayerCrime[giveplayerid][pAccusedof]), SendClientMessage(playerid, COLOR_GRAD2,string);
format(string, sizeof(string), "Сообщил : %s", PlayerCrime[giveplayerid][pVictim]), SendClientMessage(playerid, COLOR_GRAD3,string);
format(string, sizeof(string), "Уровень розыска : %s", PlayerInfo[giveplayerid][pZvezdi]), SendClientMessage(playerid, COLOR_GRAD4,string);
SendClientMessage(playerid, TEAM_BLUE_COLOR,"_______________________________________");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Игрок не найден!");
return true;
}
}
}
return true;
}