Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Fjose on Jan 26, 2015, 02:40 AM

Title: [doubt] onObjectShot and onObjectBump
Post by: Fjose on Jan 26, 2015, 02:40 AM
how i can use these functions? ???
I was trying with a simple line to see if happens something and nothing :-\

Quotetest_object  <- CreateObject( 343, 1, -896.9, -338.783, 13.382, 255 );

function onObjectShot( object, player, weapon )
{
   if ( object == test_object ) { CreateExplosion( 1, 4, Vector( -896.9, -338.783, 13.382 ), -1, true ); Message( "aa" ); }
}

function onObjectBump( o, p )
{
   if ( object == test_object ) { CreateExplosion( 1, 4, Vector( -896.9, -338.783, 13.382 ), -1, true ); Message( "aa" ); }
}
Title: Re: [doubt] onObjectShot and onObjectBump
Post by: . on Jan 26, 2015, 06:25 AM
Make sure you track those events with object.TrackingShots = true; and object.TrackingBumps = true; . I haven't tested this either.
Title: Re: [doubt] onObjectShot and onObjectBump
Post by: Fuzzie on Jan 26, 2015, 10:33 AM
Quote from: S.L.C on Jan 26, 2015, 06:25 AMMake sure you track those events with object.TrackingShots = true; and object.TrackingBumps = true; . I haven't tested this either.
This will work. I tested it already.
Title: Re: [doubt] onObjectShot and onObjectBump
Post by: Fjose on Jan 26, 2015, 01:42 PM
Thanks problem solved ;)