SA-MP Forums Archive
OnPlayerWeaponShot bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: OnPlayerWeaponShot bug (/showthread.php?tid=588114)



OnPlayerWeaponShot bug - Midzi - 05.09.2015

MOVIE



https://sampwiki.blast.hk/wiki/OnPlayerWeaponShot

Return Values:
0 - Prevent the bullet from causing damage.


Код:
if(hittype == BULLET_HIT_TYPE_OBJECT && hitid == myobject)
{
     SendClientMessageToAll(-1, "Shooted");
    
     return 0;
}



Re: OnPlayerWeaponShot bug - DarkLored - 05.09.2015

The call back is suppose to return a zero value aswell so you could rewrite the function of it.

pawn Код:
public OnPlayerWeaponShot(blabla)
{
       if(hittype == BULLET_HIT_TYPE_OBJECT && hitid == myobject)
{
     SendClientMessageToAll(-1, "Shooted");
   
     return 0;
}
return 0;
}



Re: OnPlayerWeaponShot bug - Midzi - 05.09.2015

@UP

Not working!
This callback is bugged as f**k.


Re: OnPlayerWeaponShot bug - dugi - 05.09.2015

Use object 19324 which is an indestructible version of the ATM added in 0.3.7.


Re: OnPlayerWeaponShot bug - Midzi - 05.09.2015

I want this object and I as a developer looking forward to a properly working function. Changing the object just masking bug.


Re: OnPlayerWeaponShot bug - shiftlol - 15.06.2016

change your host! host bug