04.10.2014, 18:23
try this
you have to un attach the object b4 destroying it
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
foreach(new ii: Player)
if(GetPlayerTeam(ii) == team_hunter)
{
if(hittype == BULLET_HIT_TYPE_PLAYER_OBJECT)
{
foreach(new i:Player)
{
if(GetPlayerTeam(ii) != team_prop) continue;
if(hitid == Prop[i])
{
for(new i2=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i2++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, i2)) RemovePlayerAttachedObject(playerid, i2);
}
SetPlayerHealth(i, 0);
SendClientMessage(i, -1, "Test");
break;
}
}
}
}
return 1;
}