Re: Hadcuff System in 0.3E
#1

yes i was wondering if anyone can tell me the line or how to get the handcuff system and the animations working for my upcoming server witch i will release on sa-0.3e

thank you,
crossfire1989
Reply
#2

I'm not sure, but I will keep a lookout and try to figure it out!
Reply
#3

https://sampwiki.blast.hk/wiki/SetPlayerSpecialAction

Код:
SetPlayerSpecialAction( playerid, SPECIAL_ACTION_CUFFED );
Reply
#4

You must use SetPlayerSpecialAction and SetPlayerAttachedObject. The action doesn't work on CJ skin though.
Reply
#5

pawn Код:
SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);
                                SetPlayerAttachedObject(giveplayerid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
Reply
#6

Dripac? nice! but does that work if i put it under a cmd like this?
Will it place HandCuffs on the dude i Cuff?

pawn Код:
if(strcmp(cmdtext, "/cuff", true) == 0)
{
        SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);
        SetPlayerAttachedObject(giveplayerid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,               -81.700035, 0.891999, 1.000000, 1.168000);
        SendClientMessage(playerid, COLOR_GREEN, " You have been Cuffed By an Police Officer! ");
        return 1;
}
Reply
#7

Tried it, but got errors on '' Undefined Symbol: GivePlayerid ''

What should I do?
Reply
#8

Quote:
Originally Posted by Kudoz
Посмотреть сообщение
Tried it, but got errors on '' Undefined Symbol: GivePlayerid ''

What should I do?
I have it like this

pawn Код:
if(strcmp(cmd, "/cuff", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gTeam[playerid] == 2 || IsACop(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "Verwendung: /cuff [id/name]");
                    return 1;
                }
                giveplayerid = ReturnUser(tmp);
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
                        {
                            SendClientMessage(playerid, COLOR_CRVENA, "Du kannst einen Polizisten keine Handschellen anlegen!");
                            return 1;
                        }
                        if (ProxDetectorS(8.0, playerid, giveplayerid))
                        {
                                if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_CRVENA, "Du kannst dir selber die Handschellen nicht anlegen!"); return 1; }
                                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                                GetPlayerName(playerid, sendername, sizeof(sendername));
                                format(string, sizeof(string), "%s legt der Person %s Handschellen an.", sendername ,giveplayer);
                                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                                GameTextForPlayer(giveplayerid, "~r~VERHAFTET", 2500, 3);
                                SendClientMessage(giveplayerid, COLOR_PLAVA, "Alles was Sie sagen kann und wird gegen Sie verwendet werden");
                                SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);
                                SetPlayerAttachedObject(giveplayerid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
                                TogglePlayerControllable(giveplayerid, 0);
                                PlayerCuffed[giveplayerid] = 2;
                                PlayerCuffedTime[giveplayerid] = 9999;
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_CRVENA, "Diese Person ist nicht in deiner Nдhe!");
                            return 1;
                        }
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_CRVENA, "Es gibt keinen Spieler mit dieser ID!");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "Du bist kein Polizist !");
            }
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)