• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] How to detect bullet collision on object?
#3
(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


Messages In This Thread
RE: How to detect bullet collision on object? - by N0FeaR - 2024-03-03, 04:29 PM

Forum Jump: