forward OnPlayerWeaponShot( .... );
#6

Quote:
Originally Posted by Kyance
Посмотреть сообщение
Thank you so much!
Also, can i use something like
pawn Код:
if(hitid == /*ObjectID Here*/)
?
Of course !

pawn Код:
public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
{
    if( hittype == BULLET_HIT_TYPE_OBJECT )
    {
        if( IsValidObject( hitid ) && hitid == OBJECT_ID )
        {
            SendClientMessage( playerid, -1, "You shot an object and it was destroyed !" );

            DestroyObject( hitid );
        }
    }
    return 1;
}
Anyway, you don't have to use IsValidObject if already checking for BULLET_HIT_TYPE_OBJECT, because it surely exists if it was reported as hitid.
Reply


Messages In This Thread
forward OnPlayerWeaponShot( .... ); - by Kyance - 16.01.2014, 16:13
Re: forward OnPlayerWeaponShot( .... ); - by Vince - 16.01.2014, 16:15
Re: forward OnPlayerWeaponShot( .... ); - by Kyance - 16.01.2014, 16:39
Re: forward OnPlayerWeaponShot( .... ); - by IstuntmanI - 16.01.2014, 16:43
Re: forward OnPlayerWeaponShot( .... ); - by Kyance - 16.01.2014, 16:45
Re: forward OnPlayerWeaponShot( .... ); - by IstuntmanI - 16.01.2014, 16:48
Re: forward OnPlayerWeaponShot( .... ); - by Kyance - 16.01.2014, 16:51
Re: forward OnPlayerWeaponShot( .... ); - by MA_proking - 16.01.2014, 17:15
Re: forward OnPlayerWeaponShot( .... ); - by iZN - 16.01.2014, 17:17
Re: forward OnPlayerWeaponShot( .... ); - by Stepashka - 16.01.2014, 17:17

Forum Jump:


Users browsing this thread: 3 Guest(s)