PDA

View Full Version : Handcuffs System Problem


Scienziatopazzo
21/06/2012, 06:51 PM
Hi, I have a problem with the handcuffs system. When a player has the special animation, and when he press the Aim Key + the Enter Key (Combact Style), the special animation disappears. What I have to do to fix this?

judothijs
21/06/2012, 07:05 PM
freeze(cuffed_player_id); // at cuff
unfreeze(cuffed_player_id); // at uncuff

JAMMIEISFTW
21/06/2012, 07:09 PM
freeze(cuffed_player_id); // at cuff
unfreeze(cuffed_player_id); // at uncuff

I tested this for Scienziatopazzo, it worked.

BUT you could TogglePlayerControllable

Scienziatopazzo
21/06/2012, 07:20 PM
I don't want to freeze him, I want that if he press KEY AIM + F, the special animation comes again

judothijs
21/06/2012, 07:21 PM
I tested this for Scienziatopazzo, it worked.

BUT you could TogglePlayerControllable

Yep, it's the same.

TogglePlayerControllable(cuffed_player_id, 1); // for cuffed
TogglePlayerControllable(cuffed_player_id, 0); // for uncuffed

Scienziatopazzo
23/06/2012, 12:01 PM
Anyone can help me?

Randy More
23/06/2012, 12:06 PM
Add this code under OnPlayerUpdate callback:

public OnPlayerUpdate(playerid)
{
if(IsPlayerCuffed[playerid]) // Replace with the cuff variable.
{
SetPlayerSpecialAction(playerb,SPECIAL_ACTION_CUFF ED);
}
return 1;
}

Scienziatopazzo
23/06/2012, 01:19 PM
Add this code under OnPlayerUpdate callback:

public OnPlayerUpdate(playerid)
{
if(IsPlayerCuffed[playerid]) // Replace with the cuff variable.
{
SetPlayerSpecialAction(playerb,SPECIAL_ACTION_CUFF ED);
}
return 1;
}

Thanks ;)