Wanted Problem
#6

Quote:
Originally Posted by rAzvAn18
Посмотреть сообщение
I have a big problem with Wanted system , work only if you kill an civil or Cop


2) The maximum wanted is 10 , but if you give to a player wanted 6 and then give him again wanted (eg . 8 ) the wanted level pass the maximum level

Код:
	if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp)) return SendClientMessage(playerid, -1, "USAGE: /(su)spect [PlayerID/PartOfName] [WantedLevel] [Reason]");
            new playa;
            new money;
            playa = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            money = strval(tmp);
            if (IsACop(playerid))
            {
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        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;
                        result[0] = toupper(result[0]);
                        if(!strlen(result)) return SendClientMessage(playerid, -1, "USAGE: /(su)spect [PlayerID/PartOfName] [WantedLevel] [Reason]");
                        if (gTeam[playa] == 2 || IsACop(playa)) return SendClientMessage(playerid, -1, "You can't Suspect a Cop!");
                        if(money > 10) return SendClientMessage(playerid, COLOR_GREY, "Maximum wanted level is 10!");
                        if(money == 0) return SendClientMessage(playerid, COLOR_GREY, "Minimum wanted level is 0!");
                        if(WantedLevel[playa] > 9) return SendClientMessage(playerid, COLOR_GREY, "That player have Maxim Wanted Level! (Wanted 10)");
                        WantedLevel[playa] += money;
                        new wl = WantedLevel[playa];
			SetPlayerWantedLevel(playa, wl);
                        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        format(string, sizeof(string), "You commited a crime ( %s ) [+%d],Raportat de: %s",result,money,sendername);
                        SendClientMessage(playa, COLOR_LIGHTRED, string);
                        for(new i = 0; i < MAX_PLAYERS; i++)
                        {
                            if(IsPlayerConnected(i))
                            {
                                if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1 || PlayerInfo[i][pMember] == 2 || PlayerInfo[i][pLeader] == 2 || PlayerInfo[i][pMember] == 3 || PlayerInfo[i][pLeader] == 3)
                                {
                                    format(string, sizeof(string), "HQ: All units APB: Reporter: %s.",sendername);
                                    SendClientMessage(i, 0x0000C1FF, string);
                                    format(string, sizeof(string), "HQ: Crime: %s[+%d], Suspect: %s. ",result,money,giveplayer);
                                    SendClientMessage(i, 0x0000C1FF, string);
                                }
                            }
                        }
                    }
                }
            } else return SendClientMessage(playerid, COLOR_GREY, "You are not a Cop!");
        }
        return 1;
    }
Can enybody help me with this ?
Reply


Messages In This Thread
Wanted Problem - by rAzvAn18 - 14.11.2011, 16:54
Re: Wanted Problem - by wumpyc - 14.11.2011, 17:07
Re: Wanted Problem - by rAzvAn18 - 14.11.2011, 20:12
Re: Wanted Problem - by Camacorn - 14.11.2011, 20:17
Re: Wanted Problem - by rAzvAn18 - 15.11.2011, 13:05
Re: Wanted Problem - by rAzvAn18 - 15.11.2011, 19:42
Re: Wanted Problem - by rAzvAn18 - 16.11.2011, 16:25
Re: Wanted Problem - by rAzvAn18 - 17.11.2011, 11:38

Forum Jump:


Users browsing this thread: 5 Guest(s)