/handsup bugged? - 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: /handsup bugged? (
/showthread.php?tid=502906)
/handsup bugged? -
ChromeMenu - 26.03.2014
Hello, I think my /handsup command is bugged or not set up correctly... What I would like this command to do is make the players hands go up and stand still whilst doing it, but instead, they walk backwards and wave there hands around for some reason and I don't know why. If someone can help me that would be great!
Код:
command(handsup, playerid, params[])
{
#pragma unused params
if(Player[playerid][IsAtEvent] >= 1)
{
SendClientMessage(playerid, WHITE, "You're unable to do that at this time.");
}
else
{
if(Player[playerid][Tied] >= 1 || Player[playerid][Cuffed] >= 1 || Player[playerid][IsAtEvent] >= 1)
{
SendClientMessage(playerid, WHITE, "You cannot do this at this time as you are cuffed or tied.");
}
else
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_HANDSUP);
Player[playerid][HandsUp] = 1;
}
}
return 1;
}
Re: /handsup bugged? -
ScriptFohLife - 26.03.2014
Try this.
pawn Код:
CMD:handsup(playerid, params[])
{
if(!IsAblePedAnimation(playerid)) return 1;
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
return 1;
}
Re: /handsup bugged? -
ChromeMenu - 26.03.2014
error 017: undefined symbol "IsAblePedAnimation"
Re: /handsup bugged? -
ScriptFohLife - 26.03.2014
Try this then,
pawn Код:
CMD:handsup(playerid, params[])
{
#pragma unused params
if(Player[playerid][IsAtEvent] >= 1)
{
SendClientMessage(playerid, WHITE, "You're unable to do that at this time.");
}
else
{
if(Player[playerid][Tied] >= 1 || Player[playerid][Cuffed] >= 1 || Player[playerid][IsAtEvent] >= 1)
{
SendClientMessage(playerid, WHITE, "You cannot do this at this time as you are cuffed or tied.");
}
else
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_HANDSUP);
Player[playerid][HandsUp] = 1;
}
}
return 1;
}