SA-MP Forums Archive
Simple Restrain Animation - 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: Simple Restrain Animation (/showthread.php?tid=575592)



Simple Restrain Animation - ross8839 - 28.05.2015

pawn Код:
CMD:restrain(playerid, params[])
{
    new pName[128], name[128];
    new id;
    GetPlayerName(playerid, pName, sizeof(pName));
    GetPlayerName(id, name, sizeof(name));
    if(!sscanf(params,"u",id))
    {
        SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED);
        TogglePlayerControllable(id, 0);
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "USAGE: /restrain [playerid]");
    }
    return 1;
}
So this is the simple restrain command I have, however the special action doesn't trigger and just freezes the player. Any ideas on why?


Re: Simple Restrain Animation - Yashas - 30.05.2015

Код:
TogglePlayerControllable(id, 0);
SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED);