SA-MP Forums Archive
[HELP]Cuff - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP]Cuff (/showthread.php?tid=342854)



[HELP]Cuff - 3RoR - 15.05.2012

why isn't working handcuffs on 0.3e y watched from here
isn't showing nothing :@ just freeze and cuff


CODE:
pawn Код:
if(strcmp(cmd, "/cuff", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2||PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /cuff [Playerid/PartOfName]");
                    return 1;
                }
                giveplayerid = ReturnUser(tmp);
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        /*if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
                        {
                            SendClientMessage(playerid, COLOR_GREY, "   Nemozes vezat Cop !");
                            return 1;
                        }*/

                        if(PlayerCuffed[giveplayerid] > 0)
                        {
                            SendClientMessage(playerid, COLOR_GREY, "   Igrac je vec vezan !");
                            return 1;
                        }
                        if (ProxDetectorS(3.0, playerid, giveplayerid))
                        {
                            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            format(string, sizeof(string), "* Uhitio vas je %s, na 3 minute.", sendername);
                            SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "* Uhitili ste %s, na 3 minute.", giveplayer);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "* %s je uhitio %s, .", sendername ,giveplayer);
                            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                            GameTextForPlayer(giveplayerid, "~r~Lisice", 2500, 3);
                            ApplyAnimation(giveplayerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1); // Gun Arrest
                            TogglePlayerControllable(giveplayerid, 0);
                            PlayerCuffed[giveplayerid] = 2;
                            PlayerCuffedTime[giveplayerid] = 300;
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GREY, "   Igrac nije blizu tebe !");
                            return 1;
                        }
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "   Igrac je offline !");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   Nisi Cop / FBI / National Guard !");
            }
        }
        return 1;
    }
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_JUMP && !(oldkeys & KEY_JUMP) && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED) ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff",4.1,0,1,1,0,0);
   return 1;
}



Re: [HELP]Cuff - ReneG - 15.05.2012

That command is most likely from one of the many godfather edits. It was made obviously when 0.3e wasn't around. You have to make it for 0.3e using SetPlayerSpecialAction.


Re: [HELP]Cuff - Craft. - 29.06.2012

HMM Ill try it thanks