[Ajuda] Destruir Objetos б tirou ou socos
#4

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;
}
Reply


Messages In This Thread
Destruir Objetos б tirou ou socos - by DevilAgain - 27.07.2014, 02:28
Re: Destruir Objetos б tirou ou socos - by zSuYaNw - 27.07.2014, 02:30
Re: Destruir Objetos б tirou ou socos - by DevilAgain - 27.07.2014, 02:32
Re: Destruir Objetos б tirou ou socos - by zSuYaNw - 27.07.2014, 02:35

Forum Jump:


Users browsing this thread: 1 Guest(s)