stopanim - 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: stopanim (
/showthread.php?tid=341972)
stopanim -
TouhGear - 12.05.2012
Hallo, please help me.
Код:
CMD:cuff(playerid, params[])
{
new
otherId
;
if(sscanf(params, "u", otherId)) return SendClientMessage(playerid, COLOR_WHITE, "USE: /cuff[playerid]");
TogglePlayerControllable(otherId, 1);
ClearAnimations(otherId);
SetPlayerAttachedObject(otherId, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
SetPlayerSpecialAction(otherId,SPECIAL_ACTION_CUFFED);
return true;
}
But player use /stopanim then clearanimation. How i fix this, when player is cuffed then he cant use /stopanim
Код:
CMD:stopanim(playerid, params[])
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "In car can not use /lanim!");
ClearAnimations(playerid);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
return true;
}
Re: stopanim -
Jonny5 - 12.05.2012
use this to see if there special action = SPECIAL_ACTION_CUFFED
https://sampwiki.blast.hk/wiki/GetPlayerSpecialAction
pawn Код:
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED) return SendClientMessage(playerid, COLOR_RED, "Your Cuffed and can not use /lanim!");
Re: stopanim -
Misko87 - 03.02.2013
If you have something like this in your script PlayerCuffed[MAX_PLAYERS] ,you can put in /stopanim cmd this:
if(PlayerCuffed(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " You cannot use this cmd while cuffed '');
return 1;
}