Handcuffs System Problem - 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: Handcuffs System Problem (
/showthread.php?tid=352954)
Handcuffs System Problem -
Scienziatopazzo - 21.06.2012
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?
Re: Handcuffs System Problem -
judothijs - 21.06.2012
pawn Код:
freeze(cuffed_player_id); // at cuff
pawn Код:
unfreeze(cuffed_player_id); // at uncuff
Re: Handcuffs System Problem -
JAMMIEISFTW - 21.06.2012
Quote:
Originally Posted by judothijs
pawn Код:
freeze(cuffed_player_id); // at cuff
pawn Код:
unfreeze(cuffed_player_id); // at uncuff
|
I tested this for Scienziatopazzo, it worked.
BUT you could TogglePlayerControllable
Re: Handcuffs System Problem -
Scienziatopazzo - 21.06.2012
I don't want to freeze him, I want that if he press KEY AIM + F, the special animation comes again
Re: Handcuffs System Problem -
judothijs - 21.06.2012
Quote:
Originally Posted by JAMMIEISFTW
I tested this for Scienziatopazzo, it worked.
BUT you could TogglePlayerControllable
|
Yep, it's the same.
pawn Код:
TogglePlayerControllable(cuffed_player_id, 1); // for cuffed
TogglePlayerControllable(cuffed_player_id, 0); // for uncuffed
Re: Handcuffs System Problem -
Scienziatopazzo - 23.06.2012
Anyone can help me?
Re: Handcuffs System Problem -
Randy More - 23.06.2012
Add this code under OnPlayerUpdate callback:
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerCuffed[playerid]) // Replace with the cuff variable.
{
SetPlayerSpecialAction(playerb,SPECIAL_ACTION_CUFFED);
}
return 1;
}
Re: Handcuffs System Problem -
Scienziatopazzo - 23.06.2012
Quote:
Originally Posted by Randy More
Add this code under OnPlayerUpdate callback:
pawn Код:
public OnPlayerUpdate(playerid) { if(IsPlayerCuffed[playerid]) // Replace with the cuff variable. { SetPlayerSpecialAction(playerb,SPECIAL_ACTION_CUFFED); } return 1; }
|
Thanks