How to detect in someone is shooting? - 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: How to detect in someone is shooting? (
/showthread.php?tid=185415)
How to detect if someone is shooting? -
Marshall_Banks - 24.10.2010
How do i detect if someone is shooting a gun?
Re: How to detect in someone is shooting? -
Jochemd - 24.10.2010
As far as I know, this is not possible with any SA:MP function. You can check if the player is holding a gun with GetPlayerWeaponData, but not if he is shooting.
Re: How to detect in someone is shooting? -
Kyle - 24.10.2010
GetPlayerKeys
Re: How to detect in someone is shooting? -
Cameltoe - 24.10.2010
Quote:
Originally Posted by Jochemd
As far as I know, this is not possible with any SA:MP function.
|
Nope but creating an function like this is pretty simple.
Look here to see what i mean:
http://forum.sa-mp.com/showthread.ph...ing#post846212
Re: How to detect in someone is shooting? -
Marshall_Banks - 24.10.2010
is it possible to use it with OnPlayerKeyStateChange? Like if press the fire button it will do what i want it to do?
Re: How to detect in someone is shooting? -
Cameltoe - 24.10.2010
pawn Код:
if(HOLDING(KEY_FIRE))
{
if(!IsPlayerShooting(playerid)) return 0;
// Do shit if player is shooting.
}
Re: How to detect in someone is shooting? -
Marshall_Banks - 24.10.2010
Thanks, appreciate the help.
One more thing how do i define HOLDING?
Re: How to detect in someone is shooting? -
Cameltoe - 24.10.2010
Quote:
Originally Posted by Marshall_Banks
Thanks, appreciate the help.
One more thing how do i define HOLDING?
|
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange Describes it pretty well.