Detecting a crowbar being hit at certain co-ordinates? - 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: Detecting a crowbar being hit at certain co-ordinates? (
/showthread.php?tid=564388)
Detecting a crowbar being hit at certain co-ordinates? -
Dokins - 21.02.2015
Hi there,
Is there any way of detecting a crowbar or melee weapon being used at certain co-ordinates, but only if they are actually using the weapon?
OnPlayerWeaponShot doesn't support this, I'm not attacking a player but a certain co-ordinate?
Re: Detecting a crowbar being hit at certain co-ordinates? -
davve95 - 21.02.2015
GetPlayerWeapon if it's attached to another weapon.
To detected certain coordinates I'm not fully sure about though.
Maybe it could work with GetObjectPos, Idk..
Re: Detecting a crowbar being hit at certain co-ordinates? -
Dokins - 21.02.2015
I mean like if there's a person swinging the crowbar at certain
Co-ordinates Id like it to send them a message or something for instance
Re: Detecting a crowbar being hit at certain co-ordinates? -
davve95 - 21.02.2015
I meant while swinging, but was a bit unclear . But now I see it won't work.
Wait for someone else to reply.
Re: Detecting a crowbar being hit at certain co-ordinates? -
Extremo - 21.02.2015
Unless you want to actually use something like the collision thing I've seen on here somewhere that can detect collisions with all kinds of objects, your best bet is to store the location of the "thing" that is supposed to hit and the facing angle required when it's hit and then to check wether the user is using the crowbar at that location with a similiar facing angle.