Wierd bug - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Wierd bug (
/showthread.php?tid=188977)
Wierd bug -
EthanR - 09.11.2010
I've been fixing our animations lately and did this.
Код:
txtAnimHelper = TextDrawCreate(610.0, 400.0,
"~r~~k~~PED_SPRINT~ ~w~to stop the animation");
TextDrawUseBox(txtAnimHelper, 0);
TextDrawFont(txtAnimHelper, 2);
TextDrawSetShadow(txtAnimHelper,0);
TextDrawSetOutline(txtAnimHelper,1);
TextDrawBackgroundColor(txtAnimHelper,0x000000FF);
TextDrawColor(txtAnimHelper,0xFFFFFFFF);
TextDrawAlignment(txtAnimHelper,3);
^ This is "OnGameModeInit"
Код:
if(PRESSED(KEY_SPRINT))
{
if(IsPlayerApplyingAnimation[playerid])
{
ClearAnimations(playerid);
TextDrawHideForPlayer(playerid, txtAnimHelper);
IsPlayerApplyingAnimation[playerid] = 0;
}
}
and this here is "onPlayerKeyStateChange".
It shows a message for a player once he did an animation so I've obviously put
Код:
TextDrawShowForPlayer(playerid, txtAnimHelper); IsPlayerApplyingAnimation[playerid] = 1;}
under each Animation command.
Now to the problem. Whenever a player enters a car he gets shown "Press space to stop the animation".
No idea where this comes from. Any idea? oO
(just tested it with bikes, message also pops up)
Re: Wierd bug -
Hal - 09.11.2010
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange read the wiki page, it tells you how to check for a key being pressed properly.