OnPlayerWeaponShot bug
#7

I guess the wall can be detected with ColAndreas. Set a point to somewhere in front of the player and see if there's an object between it:

Function from AbyssMorgan's 3DTryg:
PHP код:
Tryg3DProt:: bool:IsBetweenPlayerToPointIsWall(playerid,Float:x,Float:y,Float:z) {
    new 
Float:xA,Float:yA,Float:zA,Float:xC,Float:yC,Float:zC;
    
GetPlayerPos(playerid,xA,yA,zA);
    
CA_RayCastLine(xA,yA,zA,x,y,z,xC,yC,zC);
    if(
xC == 0.0 || yC == 0.0 || zC == 0.0) return false;
    return 
true;
} 
@Crayder, any better ideas? (I linked this post on his VMs)
Reply


Messages In This Thread
OnPlayerWeaponShot bug - by Runn3R - 12.10.2016, 21:30
Re: OnPlayerWeaponShot bug - by SickAttack - 12.10.2016, 21:45
Re: OnPlayerWeaponShot bug - by Runn3R - 13.10.2016, 08:52
Re: OnPlayerWeaponShot bug - by Threshold - 15.10.2016, 12:55
Re: OnPlayerWeaponShot bug - by AndySedeyn - 06.11.2016, 22:33
Re: OnPlayerWeaponShot bug - by SickAttack - 06.11.2016, 23:43
Re: OnPlayerWeaponShot bug - by AndySedeyn - 07.11.2016, 19:09
Re: OnPlayerWeaponShot bug - by SickAttack - 07.11.2016, 19:32
Re: OnPlayerWeaponShot bug - by AndySedeyn - 07.11.2016, 19:37
Re: OnPlayerWeaponShot bug - by SickAttack - 07.11.2016, 19:40
Re: OnPlayerWeaponShot bug - by aprender123 - 08.11.2016, 18:50
Re: OnPlayerWeaponShot bug - by DTV - 10.11.2016, 01:11

Forum Jump:


Users browsing this thread: 1 Guest(s)