BULLET_HIT_TYPE_NPC?
#1

Would be awesome if you could detect shots fired at NPCs or is it included in

#define BULLET_HIT_TYPE_PLAYER

?
Reply
#2

pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) {
    if (hittype == BULLET_HIT_TYPE_PLAYER && IsPlayerNPC(hitid)) {
        // BULLET_HIT_TYPE_NPC
    }
}
I really doubt that we need an extra hittype for that
A native type wouldnt make it faster than checking for PLAYER || NPC would slow it down.
Reply
#3

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) {
    if (hittype == BULLET_HIT_TYPE_PLAYER  && IsPlayerNPC(hitid)) {
        // BULLET_HIT_TYPE_NPC
    }
}
I really doubt that we need an extra hittype for that
Yeah well you never know, seeing NPCs werent affected by OnPlayerTake/GiveDamage
Reply
#4

You can detect if you are shooting on npc skin but not have control on it
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)