Help ColAndreas
#1

I use this.
Code:
forward DestroyBlood(objectid);
public DestroyBlood(objectid)
{
	DestroyDynamicObject(objectid);
}
stock CreateGroundBlood(playerid)
{
	new Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz;
	GetPlayerPos(playerid, x, y, z);

	if(CA_RayCastLineAngle(x, y, z, x, y, z - 2.0, x, y, z, rx, ry, rz))
	return SetTimerEx("DestroyBlood", 1500, false, "d", CreateDynamicObject(19836, x, y, z, rx, ry, rz)), 1;

	return 0;
}
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
	
	if(hittype == BULLET_HIT_TYPE_PLAYER) 
{
		new Float:sx, Float:sy, Float:sz,
			Float:rx, Float:ry, Float:rz;

		GetPlayerCameraPos(playerid, sx, sy, sz);

		new Float:x = fX - sx,
			Float:y = fY - sy,
			Float:z = fZ - sz;

		new Float:d = VectorSize(x, y, z);
		x /= d;
		y /= d;
		z /= d;

		x *= 10.0;
		y *= 10.0;
		z *= 10.0;

		if(CA_RayCastLineAngle(fX, fY, fZ, fX + x, fY + y, fZ + z, x, y, z, rx, ry, rz))
		SetTimerEx("DestroyBlood", 1500, false, "d", CreateDynamicObject(19836, x, y, z, rx, ry, rz));
	}
	return 1;
}
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
CreateGroundBlood(playerid);
return 1;
}
There is blood on the ground but not in the wall as supposed to , what is wrong with this code? I have never worked with ColAndreas before any help is appreciated!
Reply


Messages In This Thread
Help ColAndreas - by Crystallize - 01.03.2016, 19:20
Re: Help ColAndreas - by [NWA]Hannes - 01.03.2016, 19:46
Re: Help ColAndreas - by Crystallize - 01.03.2016, 19:54
Re: Help ColAndreas - by [NWA]Hannes - 01.03.2016, 20:04
Re: Help ColAndreas - by Nero_3D - 01.03.2016, 21:25
Re: Help ColAndreas - by Crayder - 01.03.2016, 21:45
Re: Help ColAndreas - by Nero_3D - 01.03.2016, 21:58
Re: Help ColAndreas - by Crayder - 02.03.2016, 03:53

Forum Jump:


Users browsing this thread: 1 Guest(s)