24.12.2016, 09:07
So, I don't get why this doesn't work.
I create a dynamic object, and it is supposed to be destroyed when you shoot it, but I can shoot it how much I want and nothing happens.
I create a dynamic object, and it is supposed to be destroyed when you shoot it, but I can shoot it how much I want and nothing happens.
PHP Code:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(hittype == BULLET_HIT_TYPE_OBJECT)
{
for(new i; i < 50; i++)
{
if(hitid == objTest[i])
{
DestroyDynamicObject(objTest[i]);
objTest[i] = -1;
break;
}
}
}
return 1;
}