[How To Use] StandingOnObject

Started by MacTavish, Feb 27, 2015, 03:57 PM

Previous topic - Next topic

MacTavish

I've searched alot about this but not found any example to know the syntax

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

Sebastian

QuoteCObject * 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:

object.SetReportingBumps( bool toReport )
Here is the vcmp squirrel source. You can find there the info you need, until the wiki will be completed.

MacTavish

I just wanna try as gudio said and posted video Here

It feels harder than i thought

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

Luis_Labarca

Quote from: Sebastian on Feb 27, 2015, 04:10 PM
QuoteCObject * 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:

object.SetReportingBumps( bool toReport )
Here is the vcmp squirrel source. 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
My server RP
IP: 51.222.28.159:8194