Cuff command
#9

pawn Код:
CMD:cuff(playerid, params[])
{
    if(IsACop(playerid) || Team_EDLS(playerid) && PlayerInfo[playerid][pDivision] == 2 || Team_EDLS(playerid) && PlayerInfo[playerid][pRank] >= 5 || (PlayerInfo[playerid][pMember] == 12 && PlayerInfo[playerid][pDivision] == 2))
    {
        if(GetPVarInt(playerid, "Injured") == 1)
        {
            SendClientMessageEx(playerid, COLOR_GREY, "You can't do this right now.");
            return 1;
        }

        new string[128], giveplayerid;
        if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /cuff [playerid]");

        if(!IsPlayerConnected(giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
        if(!ProxDetectorS(8.0, playerid, giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "That player isn't near you.");
        if(giveplayerid == playerid) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot cuff yourself!");
               
        format(string, sizeof(string), "* You have been handcuffed by %s.", GetPlayerNameEx(playerid));
        SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
        format(string, sizeof(string), "* You handcuffed %s, till uncuff.", GetPlayerNameEx(giveplayerid));
        SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
        format(string, sizeof(string), "* %s handcuffs %s, tightening the cuffs securely.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        GameTextForPlayer(giveplayerid, "~r~Cuffed", 2500, 3);
        TogglePlayerControllable(giveplayerid, 0);
        ClearAnimations(giveplayerid);
        ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0,0,0,1);
        PlayerCuffed[giveplayerid] = 2;
        SetPVarInt(giveplayerid, "PlayerCuffed", 2);
        SetPVarInt(giveplayerid, "IsFrozen", 1);
        //Frozen[giveplayerid] = 1;
        PlayerCuffedTime[giveplayerid] = 300;
    }
    else return SendClientMessageEx(playerid, COLOR_GREY, "You're not a law enforcement officer.");
    return 1;
}
Reply


Messages In This Thread
Cuff command - by AustinWeerdGuy - 12.03.2014, 17:22
Re: Cuff command - by AustinWeerdGuy - 12.03.2014, 21:13
Re: Cuff command - by AnonScripter - 12.03.2014, 21:23
Re: Cuff command - by CallumDaBest - 12.03.2014, 21:23
Re: Cuff command - by AustinWeerdGuy - 12.03.2014, 21:43
Re: Cuff command - by Necip - 12.03.2014, 21:55
Re: Cuff command - by AustinWeerdGuy - 12.03.2014, 22:18
Re: Cuff command - by AustinWeerdGuy - 13.03.2014, 14:26
Re: Cuff command - by Chrillzen - 13.03.2014, 14:31
Re: Cuff command - by Drago987 - 13.03.2014, 14:37

Forum Jump:


Users browsing this thread: 1 Guest(s)