0.3e Cuff system help REP+
#4

pawn Код:
}
    if(strcmp(cmd, "/cuff", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pFaction] == 3)
            {
                if(CopOnDuty[playerid] == 0)
                {
                    SendClientMessage(playerid, COLOR_GREY, "You are not on duty");
                    return 1;
                }
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /cuff [playerid]");
                    return 1;
                }
                giveplayerid = ReturnUser(tmp);
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        if(PlayerCuffed[giveplayerid] == 1)
                        {
                            SendClientMessage(playerid, COLOR_GREY, "That player is already cuffed");
                            return 1;
                        }
                        if(giveplayerid == playerid)
                        {
                            SendClientMessage(playerid, COLOR_GREY, "You can not cuff yourself");
                            return 1;
                        }
                        if(ProxDetectorS(8.0, playerid, giveplayerid))
                        {
                            format(string, sizeof(string), "You have been cuffed by %s", GetPlayerNameEx(playerid));
                            SendClientMessage(giveplayerid, COLOR_WHITE, string);
                            format(string, sizeof(string), "You have cuffed %s", GetPlayerNameEx(giveplayerid));
                            SendClientMessage(playerid, COLOR_WHITE, string);
                            PlayerCuffed[giveplayerid] = 1;
                            SetPlayerAttachedObject(giveplayerid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
                            SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_CUFFED);
                            PlayerPlayerActionMessage(playerid,giveplayerid,15.0,"cuffs");
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GREY, "That player is not in range");
                            return 1;
                        }
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_LIGHTRED, "Playerid is not an active playerid");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "Invalid faction");
            }
        }
        return 1;
Reply


Messages In This Thread
0.3e Cuff system help REP+ - by tiernantheman - 09.05.2012, 17:47
Re: 0.3e Cuff system help REP+ - by Kudoz - 09.05.2012, 17:59
Re: 0.3e Cuff system help REP+ - by HDFord - 09.05.2012, 18:03
Re: 0.3e Cuff system help REP+ - by N0FeaR - 09.05.2012, 18:06
Re: 0.3e Cuff system help REP+ - by tiernantheman - 09.05.2012, 18:35
Re: 0.3e Cuff system help REP+ - by N0FeaR - 09.05.2012, 18:55
Re: 0.3e Cuff system help REP+ - by tiernantheman - 09.05.2012, 19:03
Re: 0.3e Cuff system help REP+ - by N0FeaR - 10.05.2012, 11:58
Re: 0.3e Cuff system help REP+ - by tiernantheman - 10.05.2012, 13:56
Re: 0.3e Cuff system help REP+ - by N0FeaR - 13.05.2012, 01:12

Forum Jump:


Users browsing this thread: 2 Guest(s)