Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: MacTavish on February 27th, 2015, 03:57 PM

Title: [How To Use] StandingOnObject
Post by: MacTavish on February 27th, 2015, 03:57 PM
I've searched alot about this but not found any example to know the syntax
Title: Re: [How To Use] StandingOnObject
Post by: Sebastian on February 27th, 2015, 04:10 PM
Quote
CObject * CPlayer::StandingOnObject()
{
   int obj = functions->GetPlayerStandingOnObject( this->nPlayerId );
   if( obj < 1 )
      return NULL;
   else
   {
      this->m_standingOn.nObjectId = obj;
      return &this->m_standingOn;
   }
}
Seems like it just returns if a player is or not on an object.
But if you tried it, and it doesn't work, then you may be needed to use a function on the object first, so it can answer to your function.
The function may be this one:

Code: [Select]
object.SetReportingBumps( bool toReport )

Here is the vcmp squirrel source(https://bitbucket.org/stormeus/0.4-squirrel/src). You can find there the info you need, until the wiki will be completed.
Title: Re: [How To Use] StandingOnObject
Post by: MacTavish on February 27th, 2015, 04:20 PM
I just wanna try as gudio said and posted video Here(http://forum.vc-mp.org/?topic=150.new#new)

It feels harder than i thought
Title: Re: [How To Use] StandingOnObject
Post by: Luis_Labarca on August 22nd, 2019, 02:52 AM
Quote from Sebastian on February 27th, 2015, 04:10 PM
Quote
CObject * CPlayer::StandingOnObject()
{
   int obj = functions->GetPlayerStandingOnObject( this->nPlayerId );
   if( obj < 1 )
      return NULL;
   else
   {
      this->m_standingOn.nObjectId = obj;
      return &this->m_standingOn;
   }
}
Seems like it just returns if a player is or not on an object.
But if you tried it, and it doesn't work, then you may be needed to use a function on the object first, so it can answer to your function.
The function may be this one:

Code: [Select]
object.SetReportingBumps( bool toReport )

Here is the vcmp squirrel source(https://bitbucket.org/stormeus/0.4-squirrel/src). You can find there the info you need, until the wiki will be completed.
hello friend could you pass a better explained example @Sebastian ;D