1 post in this topic

Спойлер
//==============================================================================
        if(strcmp(cmd, "/ydar", true) == 0)
        {
                if(IsPlayerConnected(playerid))
                {
                    if(gPlayerLogged[playerid] == 0)
                {
                    SCM(playerid, COLOR_RED, "** Сначала нужно залогиниться.");
                        return 1;
                }
                if(PlayerInfo[playerid][pLevel] < 3)
                {
                    SCM(playerid, COLOR_RED, "** Тебе нужно быть 3 уровня, чтобы использовать эту команду.");
                    return 1;
                }
                if(KnockedDown[playerid] == 1)
                {
                    SCM(playerid, COLOR_RED, "** Вас отпиздили, ты не можешь сделать это.");
                    return 1;
                }
                if(MnePizda[playerid] == 1)
                {
                    SCM(playerid, COLOR_RED, "** Вы не можете сделать это.");
                    return 1;
                }
            if(PlayerInfo[playerid][pSex] == 2)
            {
                SCM(playerid, COLOR_RED, "** Вы слишком слабая, чтобы навернуть кого-нибудь.");
                    return 1;
            }
            if(PlayerBoxing[playerid] != 0)
            {
                SCM(playerid, COLOR_RED, "** Нельзя использовать эту команду во время драки.");
                return 1;
            }
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                        {
                                SCM(playerid, COLOR_ISPOLZUY, "*Используйте: /knockout [ид игрока]");
                                return 1;
                        }
                        giveplayerid = ReturnUser(tmp);
                        if(IsPlayerConnected(giveplayerid))
                        {
                            if(giveplayerid != INVALID_PLAYER_ID)
                            {
                                if (ProxDetectorS(1.0, playerid, giveplayerid))
                                {
                                           if(KnockedDown[giveplayerid] != 1 || PlayerCuffed[giveplayerid] > 0)
                                        {
                                            if(giveplayerid == playerid)
                                            {
                                                SCM(playerid, COLOR_RED, "** Вы не можете навернуть самого себя.");
                                                return 1;
                                            }
                                            if(PlayerInfo[giveplayerid][pSex] == 2)
                                            {
                                                SCM(playerid, COLOR_RED, "** Подлец! Захотел навернуть женщину???");
                                                return 1;
                                            }
                                            if(IsPlayerInAnyVehicle(giveplayerid))
                                            {
                                                return 1;
                                            }
                                            new giveplayername[MAX_PLAYER_NAME];
                                            GetPlayerName(playerid, sendername, sizeof(sendername));
                                            GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
                                            new rands = random(2)+1;
                                                        format(string, sizeof(string), "* %s собираеться ударить %s и сбить его с ног.", sendername, giveplayername);
                                                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                            ApplyAnimation(playerid,"FIGHT_D","FightD_3",4.0,0,1,1,0,0);
                                                        if(rands == 1)
                                                        {
                                                            TogglePlayerControllable(giveplayerid, 0);
                                                                ApplyAnimation(giveplayerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
                                                                SetTimerEx("ClearKnock", 20000, false, "i", giveplayerid);
                                                                KnockedDown[giveplayerid] = 1;
                                                                format(string, sizeof(string), "* %s Уебал по голове.", sendername);
                                                                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                                                        }
                                                        else
                                                        {
                                                            format(string, sizeof(string), "* %s уворачиваеться от удара.", sendername);
                                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                                                        }
                                                        return 1;
                                                }
                                                else
                                                {
                                                    SCM(playerid, COLOR_RED, "** Этот игрок уже обездвижен.");
                                                }
                                }
                                else
                                {
                                    SCM(playerid, COLOR_RED, "** Игрок находится не рядом с тобой.");
                                }
                            }
                        }
 
                }
                return 1;
        }

 

Автор: Артур321

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • nocare.
      By nocare.
      Фризит(замораживает) при телепортах, переходах через пикапы, и так далее. Помогите, не могу понять в чем проблемма