21.02.2014, 06:57
So i've notice this unique feature,
I've tried it over my JakAdmin, It works very well.
However, If the hittype isn't 0, and you shot a vehicle the explosion (i scripted) won't trigger.
However, The vehicle goes explode (i scripted it).
But when the hittype is 0, the explosion triggers.
Here is the code.
I've tried it over my JakAdmin, It works very well.
However, If the hittype isn't 0, and you shot a vehicle the explosion (i scripted) won't trigger.
However, The vehicle goes explode (i scripted it).
But when the hittype is 0, the explosion triggers.
Here is the code.
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(weaponid == 33)
{
if(shotGlobalEx[playerid] == 1)
{
if(hittype == BULLET_HIT_TYPE_NONE)
{
CreateExplosion(fX, fY, fZ, 7, 1.00);
}
else if(hittype == BULLET_HIT_TYPE_VEHICLE)
{
CreateExplosion(fX, fY, fZ+1.0, 7, 1.00);
CreateExplosion(fX, fY, fZ+0.50, 7, 1.00);
SetVehicleHealth(hitid, 27.0);
}
}
}
return 1;
}