• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] How to detect bullet collision on object?
#1
Hi i'm curious how to detect collision when bullet hit an object in samp like have a print like "You hit a object"
  Reply
#2
As for the collision, you can use ColAndreas plugin, you can find here https://github.com/Pottus/ColAndreas
  Reply
#3
https://github.com/Pottus/ColAndreas is really helpful
  Reply
#4
(2023-12-28, 01:30 PM)ZynxLinclon Wrote: Hi i'm curious how to detect collision when bullet hit an object in samp like have a print like "You hit a object"

Here is an example

PHP Code:
forward OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ);

public 
OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if (hittype == BULLET_HIT_TYPE_OBJECT)
    {
        SendClientMessage(playeridCOLOR_YELLOW"You hit an object!");
        // You can add further actions here if needed
    }
    return 1;

  Reply


Forum Jump: