[HELP] Cuff still freezes
#1

hey,

I tried to make an Cuff animation instead of freeze.

That worked, but the player is still freezed....

pawn Код:
command(cuff, playerid, params[])
{
    new id, string[128];
    if(sscanf(params, "u", id))
    {
        SendClientMessage(playerid, WHITE, "SYNTAX: /cuff [playerid]");
    }
    else
    {
        if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
        {
                if(GetDistanceBetweenPlayers(playerid, id) < 7)
                {
                    Player[id][Cuffed] = 1;
                    format(string, sizeof(string), "* %s has cuffed %s.", GetName(playerid), GetName(id));
                    NearByMessage(playerid, NICESKY, string);
                    format(string, sizeof(string), "You have cuffed %s.", GetName(id));
                    SendClientMessage(playerid, WHITE, string);
                    format(string, sizeof(string), "You have been cuffed by %s.", GetName(playerid));
                    SendClientMessage(id, WHITE, string);
                    SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED);
                    TogglePlayerControllable(id, true);
                }
                else
                {
                    SendClientMessage(playerid, WHITE, "You're too far away!");
                }
            }
            else
            {
                if(GetDistanceBetweenPlayers(playerid, id) < 7)
                {
                        Player[id][Cuffed] = 1;
                        format(string, sizeof(string), "* %s has cuffed %s.", GetName(playerid), GetName(id));
                        NearByMessage(playerid, NICESKY, string);
                        format(string, sizeof(string), "You have cuffed %s.", GetName(id));
                        SendClientMessage(playerid, WHITE, string);
                        format(string, sizeof(string), "You have been cuffed by %s.", GetName(playerid));
                        SendClientMessage(id, WHITE, string);
                        SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED);
                        TogglePlayerControllable(id, true);
                }
            }
        }
    return 1;
}
Can someone tell why it doesn't work?
Reply
#2

Do you mean you want it just makes the animation, and not to freeze the target?
If so, just delete
pawn Код:
TogglePlayerControllable(id, true);
Reply
#3

Already tried...
Reply
#4

This...
pawn Код:
command(cuff, playerid, params[])
{
    new id, string[128];
    if(sscanf(params, "u", id))
    {
        SendClientMessage(playerid, WHITE, "SYNTAX: /cuff [playerid]");
    }
    else
    {
        if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
        {
                if(GetDistanceBetweenPlayers(playerid, id) < 7)
                {
                    Player[id][Cuffed] = 1;
                    format(string, sizeof(string), "* %s has cuffed %s.", GetName(playerid), GetName(id));
                    NearByMessage(playerid, NICESKY, string);
                    format(string, sizeof(string), "You have cuffed %s.", GetName(id));
                    SendClientMessage(playerid, WHITE, string);
                    format(string, sizeof(string), "You have been cuffed by %s.", GetName(playerid));
                    SendClientMessage(id, WHITE, string);
                    SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED);
                }
                else
                {
                    SendClientMessage(playerid, WHITE, "You're too far away!");
                }
            }
            else
            {
                if(GetDistanceBetweenPlayers(playerid, id) < 7)
                {
                        Player[id][Cuffed] = 1;
                        format(string, sizeof(string), "* %s has cuffed %s.", GetName(playerid), GetName(id));
                        NearByMessage(playerid, NICESKY, string);
                        format(string, sizeof(string), "You have cuffed %s.", GetName(id));
                        SendClientMessage(playerid, WHITE, string);
                        format(string, sizeof(string), "You have been cuffed by %s.", GetName(playerid));
                        SendClientMessage(id, WHITE, string);
                        SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED);
                }
            }
        }
    return 1;
}
If you compile it and all goes good, it's IMPOSSIBLE that it freezes xD.
Reply
#5

I'll try tomorrow, (its bed time in my country)
Reply
#6

I didn't try the animation before, but it would freezes the player once you submit the animation, so try making "TogglePlayerControllable" unfreezes you, not freezes, but have it after the animation function for sure.
Reply
#7

Quote:
Originally Posted by Randy More
Посмотреть сообщение
I didn't try the animation before, but it would freezes the player once you submit the animation, so try making "TogglePlayerControllable" unfreezes you, not freezes, but have it after the animation function for sure.
That's not true... It doesn't freeze.
Reply
#8

Quote:
Originally Posted by ricardo178
Посмотреть сообщение
That's not true... It doesn't freeze.
I already said that i think it would be so; thanks for confirming this to me.
Reply
#9

Quote:
Originally Posted by ricardo178
Посмотреть сообщение
This...
pawn Код:
command(cuff, playerid, params[])
{
    new id, string[128];
    if(sscanf(params, "u", id))
    {
        SendClientMessage(playerid, WHITE, "SYNTAX: /cuff [playerid]");
    }
    else
    {
        if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
        {
                if(GetDistanceBetweenPlayers(playerid, id) < 7)
                {
                    Player[id][Cuffed] = 1;
                    format(string, sizeof(string), "* %s has cuffed %s.", GetName(playerid), GetName(id));
                    NearByMessage(playerid, NICESKY, string);
                    format(string, sizeof(string), "You have cuffed %s.", GetName(id));
                    SendClientMessage(playerid, WHITE, string);
                    format(string, sizeof(string), "You have been cuffed by %s.", GetName(playerid));
                    SendClientMessage(id, WHITE, string);
                    SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED);
                }
                else
                {
                    SendClientMessage(playerid, WHITE, "You're too far away!");
                }
            }
            else
            {
                if(GetDistanceBetweenPlayers(playerid, id) < 7)
                {
                        Player[id][Cuffed] = 1;
                        format(string, sizeof(string), "* %s has cuffed %s.", GetName(playerid), GetName(id));
                        NearByMessage(playerid, NICESKY, string);
                        format(string, sizeof(string), "You have cuffed %s.", GetName(id));
                        SendClientMessage(playerid, WHITE, string);
                        format(string, sizeof(string), "You have been cuffed by %s.", GetName(playerid));
                        SendClientMessage(id, WHITE, string);
                        SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED);
                }
            }
        }
    return 1;
}
If you compile it and all goes good, it's IMPOSSIBLE that it freezes xD.
STILL NOT :O
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)