Detecting Few Process inside an SAMP Server - 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 Few Process inside an SAMP Server (
/showthread.php?tid=389440)
Detecting Few Process inside an SAMP Server -
Ballu Miaa - 02.11.2012
Hello Everyone,
I've been away from SA-MP Forum for more then a month now. I had no internet. Today I made this thread to know how to detect few process inside an SA-MP Server.
- How to detect when a Player is Shooting at X,Y,Z Points?
- How to detect when a Player jumps off from a Z+50 Point and hits on the ground?
- How to detect two vehicle's colliding with each other?
- How to detect when a vehicle is colliding with a Player?
If anyone can help me in knowing all this. I would really appreciate it.
Thank you,
Ballu Miaa
Re: Detecting Few Process inside an SAMP Server -
iJumbo - 02.11.2012
How to detect when a Player is Shooting at X,Y,Z Points?
search for
pawn Код:
IsPlayerAiming(playerid, Float:x, Float:y, Float:z, Float:radius)
Re: Detecting Few Process inside an SAMP Server -
iggy1 - 02.11.2012
For the player falling from +50, just check under
OnPlayerDeath if the reason is 54 (splat). Or you could do some fiddling with animations, check if the player has falling animation and check height.
Re: Detecting Few Process inside an SAMP Server -
MP2 - 02.11.2012
Quote:
Originally Posted by Ballu Miaa
How to detect when a Player jumps off from a Z+50 Point and hits on the ground?
|
Detect the 'falling' animation in OnPlayerUpdate, and store their Z coordinate. When they land detect the 'splat' animation and get their new Z height, then find the difference (oldz-curz).
Quote:
Originally Posted by Ballu Miaa
How to detect two vehicle's colliding with each other?
|
If two vehicles lose health at the same time and are very close to each other, you can say with some certainty that they collided.
Quote:
Originally Posted by Ballu Miaa
How to detect when a vehicle is colliding with a Player?
|
Either detect the 'falling over' animation of the player, or use OnPlayerTakeDamage (NOTE: OnPlayerGiveDamage doesn't work with vehicle collisions for some reason).
Re: Detecting Few Process inside an SAMP Server -
Ballu Miaa - 03.11.2012
Quote:
Originally Posted by [ISS]jumbo
How to detect when a Player is Shooting at X,Y,Z Points?
search for
pawn Код:
IsPlayerAiming(playerid, Float:x, Float:y, Float:z, Float:radius)
|
I dont find any native as such that.
Quote:
Originally Posted by MP2
Detect the 'falling' animation in OnPlayerUpdate, and store their Z coordinate. When they land detect the 'splat' animation and get their new Z height, then find the difference (oldz-curz).
If two vehicles lose health at the same time and are very close to each other, you can say with some certainty that they collided.
Either detect the 'falling over' animation of the player, or use OnPlayerTakeDamage (NOTE: OnPlayerGiveDamage doesn't work with vehicle collisions for some reason).
|
Now that's pretty awesome. THANKS for all the information there ma bro. You have always been a savior.
Rep+6 to MP2
Thank to everyone for replying.
Re: Detecting Few Process inside an SAMP Server -
[HK]Ryder[AN] - 04.11.2012
Quote:
Originally Posted by Ballu Miaa
Hello Everyone,
I've been away from SA-MP Forum for more then a month now. I had no internet. Today I made this thread to know how to detect few process inside an SA-MP Server.
- How to detect when a Player is Shooting at X,Y,Z Points?
If anyone can help me in knowing all this. I would really appreciate it.
Thank you,
Ballu Miaa
|
Here you go ma brah
https://sampforum.blast.hk/showthread.php?tid=140765