27.07.2014, 02:35
Ah, tinha esquecido desta callback..
pawn Код:
new
object_shot
;
public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
{
if(hittype == BULLET_HIT_TYPE_OBJECT) // Detecta tiro ao objeto
{
if( IsValidObject( hitid ) ) // Ver se o objeto й vбlido.
{
object_shot ++;
if(object_shot == 10){
SendClientMessage( playerid, -1, "Vocк acertou o objeto e ele vazou!" );
DestroyObject( hitid ); // Destrou o Objeto acertado.
object_shot = 0;
}
}
}
return 1;
}