why my /mir doesnt work
#1

hi users,

I have made a /showbadge and a /mir command but the /mir doesnt work

pawn Код:
command(cuff, playerid, params[])
{
    new id, string[128];
    if(sscanf(params, "u", id))
    {
        SendClientMessage(playerid, WHITE, "SYNTAX: /cuff [playerid]");
    }
    else
    {
        if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
        {
            if(Player[id][Tazed] == 1)
            {
                if(GetDistanceBetweenPlayers(playerid, id) < 7)
                {
                    TogglePlayerControllable(id, false);
                    ApplyAnimation(id, "ped", "cower", 1, 1, 0, 0, 0, 0);
                    Player[id][Cuffed] = 1;
                    Player[id][Tazed] = 0;
                    format(string, sizeof(string), "* %s has cuffed %s.", GetName(playerid), GetName(id));
                    NearByMessage(playerid, NICESKY, string);
                    format(string, sizeof(string), "You have cuffed %s.", GetName(id));
                    SendClientMessage(playerid, WHITE, string);
                    format(string, sizeof(string), "You have been cuffed by %s.", GetName(playerid));
                    SendClientMessage(id, WHITE, string);
                    TogglePlayerControllable(id, false);
                }
                else
                {
                    SendClientMessage(playerid, WHITE, "You're too far away!");
                }
            }
            else
            {
                if(GetDistanceBetweenPlayers(playerid, id) < 7)
                {
                    if(GetPlayerSpecialAction(id) == SPECIAL_ACTION_HANDSUP)
                    {
                        TogglePlayerControllable(id, false);
                        ApplyAnimation(id, "ped", "cower", 1, 1, 0, 0, 0, 0);
                        Player[id][Cuffed] = 1;
                        Player[id][Tazed] = 0;
                        format(string, sizeof(string), "* %s has cuffed %s.", GetName(playerid), GetName(id));
                        NearByMessage(playerid, NICESKY, string);
                        format(string, sizeof(string), "You have cuffed %s.", GetName(id));
                        SendClientMessage(playerid, WHITE, string);
                        format(string, sizeof(string), "You have been cuffed by %s.", GetName(playerid));
                        SendClientMessage(id, WHITE, string);
                        TogglePlayerControllable(id, false);
                    }
                }
            }
        }
    }
    return 1;
}

command(mir, playerid, params[])
{
        new id, string[128];
        if(sscanf(params, "u", id))
        {
                SendClientMessage(playerid, WHITE, "SYNTAX: /mir [playerid]");
        }
        else
        {
            if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
            {
                if(Player[id][Tazed] == 1)
                {
                    if(GetDistanceBetweenPlayers(playerid, id) < 7)
                    {
                        TogglePlayerControllable(id, true);
                        ApplyAnimation(id, "ped", "cower", 1, 1, 0, 0, 0, 0);
                        Player[id][Cuffed] = 1;
                        Player[id][Tazed] = 1;
                        format(string, sizeof(string), "* %s has said the mir rights to %s.", GetName(playerid), GetName(id));
                        NearByMessage(playerid, NICESKY, string);
                        format(string, sizeof(string), "You have said the mir rights to %s.", GetName(id));
                        SendClientMessage(playerid, WHITE, string);
                        format(string, sizeof(string), "You have the right to keep silence, Everything you say can be used agaisnt you in a court of the Law", GetName(playerid));
                        SendClientMessage(id, WHITE, string);
                        format(string, sizeof(string), "You have the right to a Lawyer, If you cannot afford one, the state will appoint you one", GetName(playerid));
                        SendClientMessage(id, WHITE, string);
                        format(string, sizeof(string), "You have the right to a Phone Call, but only to ONE. Did you understood your rights?", GetName(playerid));
                        SendClientMessage(id, WHITE, string);
                        TogglePlayerControllable(id, true);
                    }
                    else
                    {
                        SendClientMessage(playerid, WHITE, "You're too far away!");
                    }
                }
                else
                {
                    if(GetDistanceBetweenPlayers(playerid, id) < 7)
                    {
                        if(GetPlayerSpecialAction(id) == SPECIAL_ACTION_HANDSUP)
                        {
                            TogglePlayerControllable(id, true);
                            ApplyAnimation(id, "ped", "cower", 1, 1, 0, 0, 0, 0);
                            Player[id][Cuffed] = 0;
                            Player[id][Tazed] = 0;
                            format(string, sizeof(string), " %s has said the mir rights to %s.", GetName(playerid), GetName(id));
                            NearByMessage(playerid, NICESKY, string);
                            format(string, sizeof(string), "You have said the mir rights to %s.", GetName(id));
                            SendClientMessage(playerid, WHITE, string);
                            format(string, sizeof(string), "You have the right to keep silence, Everything you say can be used agaisnt you in a court of the Law", GetName(playerid));
                            format(string, sizeof(string), "You have the right to a Lawyer, If you cannot afford one, the state will appoint you one", GetName(playerid));
                            format(string, sizeof(string), "You have the right to a Phone Call, but only to ONE. Did you understood your rights?", GetName(playerid));
                            SendClientMessage(id, WHITE, string);
                            TogglePlayerControllable(id, true);
                        }
                    }
                }
            }
        }
        return 1;
}

command(showbadge, playerid, params[])
{
        new id, string[128];
        if(sscanf(params, "u", id))
        {
                SendClientMessage(playerid, WHITE, "SYNTAX: /showbadge [playerid]");
        }
        else
        {
            if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
            {
                    if(GetDistanceBetweenPlayers(playerid, id) < 7)
                    {
                        TogglePlayerControllable(id, true);
                        ApplyAnimation(id, "ped", "cower", 1, 1, 0, 0, 0, 0);
                        Player[id][Cuffed] = 0;
                        Player[id][Tazed] = 0;
                        format(string, sizeof(string), "* %s has showed his badge to %s.", GetName(playerid), GetName(id));
                        NearByMessage(playerid, NICESKY, string);
                        format(string, sizeof(string), "You have showed your badge to %s.", GetName(id));
                        SendClientMessage(playerid, WHITE, string);
                        format(string, sizeof(string), "-------------Official-Police/FBI-Badge-------------", GetName(playerid));
                        SendClientMessage(id, RED, string);
                        format(string, sizeof(string), "This Player is an law enforcement officer!", GetName(playerid));
                        SendClientMessage(id, BLUE, string);
                        format(string, sizeof(string), "-------------Official-Police/FBI-Badge-------------", GetName(playerid));
                        SendClientMessage(id, RED, string);
                        TogglePlayerControllable(id, true);
                    }
                    else
                    {
                        SendClientMessage(playerid, WHITE, "You're too far away!");
                    }
                }
                else
                {
                    if(GetDistanceBetweenPlayers(playerid, id) < 7)
                    {
                        if(GetPlayerSpecialAction(id) == SPECIAL_ACTION_HANDSUP)
                        {
                            TogglePlayerControllable(id, true);
                            ApplyAnimation(id, "ped", "cower", 1, 1, 0, 0, 0, 0);
                            Player[id][Cuffed] = 0;
                            Player[id][Tazed] = 0;
                            format(string, sizeof(string), " %s has showed his badge to %s.", GetName(playerid), GetName(id));
                            NearByMessage(playerid, NICESKY, string);
                            format(string, sizeof(string), "You have your badge to %s.", GetName(id));
                            SendClientMessage(playerid, WHITE, string);
                            format(string, sizeof(string), "Official Police Badge", GetName(playerid));
                            format(string, sizeof(string), "This Person is an Law enforcer", GetName(playerid));
                            format(string, sizeof(string), "This basge is not fake", GetName(playerid));
                            SendClientMessage(id, WHITE, string);
                            TogglePlayerControllable(id, true);
                        }
                    }
                }
            }
        return 1;
}
Reply
#2

Please help me?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)