Ребят, когда на сервере коп даёт розыск, игроку пишет что выдано 1-2-3 уровня преступления А на самом деле накидывает по 2 звезды сразу... Где ошибка? if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Ââåäèòå: (/su)spect [id] [ïðåñòóïëåíèå]"); giveplayerid = ReturnUser(tmp); if (IsACop(playerid)) { if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PlayerInfo[giveplayerid][pJailed] == 0) { if(PlayerInfo[giveplayerid][pWantedLevel] >= 6) return SendClientMessage(playerid, COLOR_GREY, "Ó äàííîãî èãðîêà óæå 6 óðîâíåé ðîçûñêà"); if(IsACop(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "Âû íå ìîæåòå äàâàòü ðîçûñê çàêîííèêàì"); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) return SendClientMessage(playerid, COLOR_WHITE, "Ââåäèòå: (/su)spect [id] [ïðåñòóïëåíèå]"); WantedPoints[giveplayerid] += 1; PlayerInfo[giveplayerid][pWantedLevel] += 1; SetPlayerCriminal(giveplayerid, playerid, result); SendClientMessage(giveplayerid, COLOR_WHITE, "Âàøà óçíîâàåìîñòü ïîâûñèëàñü"); return true; } else { SendClientMessage(playerid, COLOR_GREY, "Èãðîê óæå â òþðüìå"); } } } else { SendClientMessage(playerid, COLOR_GREY, "Èãðîê íå íàéäåí"); return true; } } else { SendClientMessage(playerid, COLOR_GREY, "Âû íåóïîëíîìî÷åíû èñïîëüçîâàòü äàííóþ êîìàíäó"); } return true;
|