Fail in a defusing command?
#1

Hello,

I've following problem: When I type my defusing command I get 10-15 times the same message. Here's to code:

pawn Код:
if (strcmp(cmd, "/defuse", true) == 0)
        {
            for(new i; i<GetMaxPlayers(); i++)
            {
                if(UserStats[playerid][Fraktion] == 1)
                {
                    if(SonstigesStats[Armed] == 1)
                    {
                        if(GetPVarInt(i, "DefusingBomb") != 1)
                        {
                            if(IsPlayerInRangeOfPoint(playerid, 2, SonstigesStats[Bx], SonstigesStats[By], SonstigesStats[Bz]))
                            {
                                SendClientMessage(playerid, COLOR_GREEN, "Du entschдrfst die Bombe.. Du brauchst 20 Sekunden! {FF0000}Du darfst dich nicht bewegen, sonst brichst du den Vorgang ab!");
                                SetPVarInt(playerid, "DefusingBomb", 1);
                                ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.1,0,1,1,1,1,1);
                                SetPVarInt(playerid, "DefusingTime", SetTimerEx("Defusing", 20000, false, "i" ,playerid));
                            }
                            else return SendClientMessage(playerid, COLOR_ADMINMESS, "Du bist nicht bei der Bombe!");
                        }
                        else return SendClientMessage(playerid, COLOR_ADMINMESS, "Die Bombe wird bereits entschдrft!");
                    }
                    else return SendClientMessage(playerid, COLOR_ADMINMESS, "Es wurde keine Bombe gelegt!");
                }
                else return SendClientMessage(playerid, COLOR_ADMINMESS, "Du bist kein Beamter!");
            }
            return 1;
        }
I know the problem (Max_Player -> i) but whatever I try it won't work..


Thanks in advance
Reply
#2

Got no-one a solution?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)