mirror of
https://github.com/ChronosX88/mta-mono.git
synced 2024-11-26 04:02:20 +00:00
Lua Element functions (CLuaFunctionDefinitions)
This commit is contained in:
parent
f12d496246
commit
4c4ce4b987
@ -26,9 +26,12 @@ void CMonoFunctions::AddInternals( void )
|
|||||||
mono_add_internal_call( "MultiTheftAuto.Debug::Log", CMonoFunctions::Debug::Log );
|
mono_add_internal_call( "MultiTheftAuto.Debug::Log", CMonoFunctions::Debug::Log );
|
||||||
mono_add_internal_call( "MultiTheftAuto.Debug::Info", CMonoFunctions::Debug::Info );
|
mono_add_internal_call( "MultiTheftAuto.Debug::Info", CMonoFunctions::Debug::Info );
|
||||||
mono_add_internal_call( "MultiTheftAuto.Debug::Error", CMonoFunctions::Debug::Error );
|
mono_add_internal_call( "MultiTheftAuto.Debug::Error", CMonoFunctions::Debug::Error );
|
||||||
|
|
||||||
mono_add_internal_call( "MultiTheftAuto.Native.Config::Get", CMonoFunctions::Config::Get );
|
mono_add_internal_call( "MultiTheftAuto.Native.Config::Get", CMonoFunctions::Config::Get );
|
||||||
mono_add_internal_call( "MultiTheftAuto.Native.Config::Set", CMonoFunctions::Config::Set );
|
mono_add_internal_call( "MultiTheftAuto.Native.Config::Set", CMonoFunctions::Config::Set );
|
||||||
|
|
||||||
mono_add_internal_call( "MultiTheftAuto.Native.Element::GetPosition", CMonoFunctions::Element::GetPosition );
|
mono_add_internal_call( "MultiTheftAuto.Native.Element::GetPosition", CMonoFunctions::Element::GetPosition );
|
||||||
|
|
||||||
mono_add_internal_call( "MultiTheftAuto.Native.Vehicle::Create", CMonoFunctions::Vehicle::Create );
|
mono_add_internal_call( "MultiTheftAuto.Native.Vehicle::Create", CMonoFunctions::Vehicle::Create );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +96,7 @@ MonoObject* CMonoFunctions::Element::GetPosition( unsigned int element )
|
|||||||
fY = 0.0f,
|
fY = 0.0f,
|
||||||
fZ = 0.0f;
|
fZ = 0.0f;
|
||||||
|
|
||||||
if( CLuaFunctionDefinitions::GetPosition( RESOURCE->GetLua(), (void*)element, fX, fY, fZ ) )
|
if( CLuaFunctionDefinitions::GetElementPosition( RESOURCE->GetLua(), (void*)element, fX, fY, fZ ) )
|
||||||
{
|
{
|
||||||
CMonoClass* pClass = RESOURCE->GetClassFromName( "MultiTheftAuto", "Vector3" );
|
CMonoClass* pClass = RESOURCE->GetClassFromName( "MultiTheftAuto", "Vector3" );
|
||||||
|
|
||||||
|
@ -62,6 +62,13 @@ CLuaArgument::CLuaArgument ( void* pUserData )
|
|||||||
m_pLightUserData = pUserData;
|
m_pLightUserData = pUserData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CLuaArgument::CLuaArgument( lua_CFunction Function )
|
||||||
|
{
|
||||||
|
m_szString = NULL;
|
||||||
|
m_iType = LUA_TFUNCTION;
|
||||||
|
m_Function = Function;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
CLuaArgument::CLuaArgument ( const CLuaArgument& Argument )
|
CLuaArgument::CLuaArgument ( const CLuaArgument& Argument )
|
||||||
{
|
{
|
||||||
@ -131,6 +138,13 @@ const CLuaArgument& CLuaArgument::operator = ( const CLuaArgument& Argument )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case LUA_TFUNCTION:
|
||||||
|
{
|
||||||
|
m_Function = Argument.m_Function;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,6 +191,11 @@ bool CLuaArgument::operator == ( const CLuaArgument& Argument )
|
|||||||
return Argument.m_szString == NULL;
|
return Argument.m_szString == NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case LUA_TFUNCTION:
|
||||||
|
{
|
||||||
|
return m_Function == Argument.m_Function;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -238,6 +257,13 @@ void CLuaArgument::Read ( lua_State* luaVM, unsigned int uiArgument )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case LUA_TFUNCTION:
|
||||||
|
{
|
||||||
|
m_Function = lua_tocfunction( luaVM, uiArgument );
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
m_iType = LUA_TNONE;
|
m_iType = LUA_TNONE;
|
||||||
@ -294,6 +320,13 @@ void CLuaArgument::Push ( lua_State* luaVM ) const
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case LUA_TFUNCTION:
|
||||||
|
{
|
||||||
|
lua_pushcfunction( luaVM, m_Function );
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ public:
|
|||||||
CLuaArgument ( double dNumber );
|
CLuaArgument ( double dNumber );
|
||||||
CLuaArgument ( const char* szString );
|
CLuaArgument ( const char* szString );
|
||||||
CLuaArgument ( void* pUserData );
|
CLuaArgument ( void* pUserData );
|
||||||
|
CLuaArgument ( lua_CFunction Function );
|
||||||
CLuaArgument ( const CLuaArgument& Argument );
|
CLuaArgument ( const CLuaArgument& Argument );
|
||||||
CLuaArgument ( lua_State* luaVM, unsigned int uiArgument );
|
CLuaArgument ( lua_State* luaVM, unsigned int uiArgument );
|
||||||
~CLuaArgument ( void );
|
~CLuaArgument ( void );
|
||||||
@ -56,6 +57,7 @@ private:
|
|||||||
lua_Number m_Number;
|
lua_Number m_Number;
|
||||||
char* m_szString;
|
char* m_szString;
|
||||||
void* m_pLightUserData;
|
void* m_pLightUserData;
|
||||||
|
lua_CFunction m_Function;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -151,6 +151,14 @@ CLuaArgument* CLuaArguments::PushUserData ( void* pUserData )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CLuaArgument* CLuaArguments::PushArgument ( const CLuaArgument & argument )
|
||||||
|
{
|
||||||
|
CLuaArgument* pArgument = new CLuaArgument (argument); // create a copy
|
||||||
|
m_Arguments.push_back ( pArgument );
|
||||||
|
return pArgument;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void CLuaArguments::DeleteArguments ( void )
|
void CLuaArguments::DeleteArguments ( void )
|
||||||
{
|
{
|
||||||
// Delete each item
|
// Delete each item
|
||||||
|
@ -48,6 +48,7 @@ public:
|
|||||||
CLuaArgument* PushNumber ( double dNumber );
|
CLuaArgument* PushNumber ( double dNumber );
|
||||||
CLuaArgument* PushString ( const char* szString );
|
CLuaArgument* PushString ( const char* szString );
|
||||||
CLuaArgument* PushUserData ( void* pUserData );
|
CLuaArgument* PushUserData ( void* pUserData );
|
||||||
|
CLuaArgument* PushArgument ( const CLuaArgument& argument );
|
||||||
|
|
||||||
void DeleteArguments ( void );
|
void DeleteArguments ( void );
|
||||||
|
|
||||||
|
@ -162,7 +162,231 @@ bool CLuaFunctionDefinitions::SetRuleValue( lua_State *pLuaVM, const string &sKe
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CLuaFunctionDefinitions::GetPosition( lua_State* pLuaVM, void* pUserData, float &fX, float &fY, float &fZ )
|
// Element create/destroy
|
||||||
|
|
||||||
|
void* CLuaFunctionDefinitions::CreateElement( lua_State* pLuaVM, string sType, string sID )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushString( sType.c_str() );
|
||||||
|
|
||||||
|
if( !sID.empty() )
|
||||||
|
{
|
||||||
|
pLuaArguments.PushString( sID.c_str() );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "createElement", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetLightUserData();
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::DestroyElement( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "destroyElement", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* CLuaFunctionDefinitions::CloneElement( lua_State* pLuaVM, void* pUserData, float fX, float fY, float fZ, bool bCloneChildren )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushNumber( fX );
|
||||||
|
pLuaArguments.PushNumber( fY );
|
||||||
|
pLuaArguments.PushNumber( fZ );
|
||||||
|
pLuaArguments.PushBoolean( bCloneChildren );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "cloneElement", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetLightUserData();
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Element get funcs
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::IsElement( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "isElement", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
string CLuaFunctionDefinitions::GetElementType( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementType", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return string( pLuaArgument.GetString() );
|
||||||
|
}
|
||||||
|
|
||||||
|
return string();
|
||||||
|
}
|
||||||
|
|
||||||
|
void* CLuaFunctionDefinitions::GetElementByID( lua_State* pLuaVM, string sID )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushString( sID.c_str() );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementByID", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetLightUserData();
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* CLuaFunctionDefinitions::GetElementByIndex( lua_State* pLuaVM, int iIndex )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushNumber( iIndex );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementByIndex", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetLightUserData();
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* CLuaFunctionDefinitions::GetElementChild( lua_State* pLuaVM, void* pUserData, int iIndex )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushNumber( iIndex );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementChild", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetLightUserData();
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CLuaFunctionDefinitions::GetElementChildrenCount( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementChildrenCount", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return static_cast< int >( pLuaArgument.GetNumber() );
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
string CLuaFunctionDefinitions::GetElementID( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementID", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return string( pLuaArgument.GetString() );
|
||||||
|
}
|
||||||
|
|
||||||
|
return string();
|
||||||
|
}
|
||||||
|
|
||||||
|
CLuaArgument* CLuaFunctionDefinitions::GetElementData( lua_State* pLuaVM, void* pUserData, string sKey, bool bInherit )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushString( sKey.c_str() );
|
||||||
|
pLuaArguments.PushBoolean( bInherit );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementData", 1 ) )
|
||||||
|
{
|
||||||
|
return new CLuaArgument( pLuaVM, -1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
CLuaArguments* CLuaFunctionDefinitions::GetAllElementData( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getAllElementData", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArguments *pLuaArguments = new CLuaArguments();
|
||||||
|
|
||||||
|
pLuaArguments->ReadArguments( pLuaVM );
|
||||||
|
|
||||||
|
return pLuaArguments;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* CLuaFunctionDefinitions::GetElementParent( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementParent", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetLightUserData();
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::GetElementPosition( lua_State* pLuaVM, void* pUserData, float &fX, float &fY, float &fZ )
|
||||||
{
|
{
|
||||||
CLuaArguments pLuaArguments;
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
@ -180,6 +404,750 @@ bool CLuaFunctionDefinitions::GetPosition( lua_State* pLuaVM, void* pUserData, f
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::GetElementRotation( lua_State* pLuaVM, void* pUserData, float &fX, float &fY, float &fZ )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementRotation", 3 ) )
|
||||||
|
{
|
||||||
|
fX = static_cast< float >( ( new CLuaArgument( pLuaVM, -3 ) )->GetNumber() );
|
||||||
|
fY = static_cast< float >( ( new CLuaArgument( pLuaVM, -2 ) )->GetNumber() );
|
||||||
|
fZ = static_cast< float >( ( new CLuaArgument( pLuaVM, -1 ) )->GetNumber() );
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::GetElementVelocity( lua_State* pLuaVM, void* pUserData, float &fX, float &fY, float &fZ )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementVelocity", 3 ) )
|
||||||
|
{
|
||||||
|
fX = static_cast< float >( ( new CLuaArgument( pLuaVM, -3 ) )->GetNumber() );
|
||||||
|
fY = static_cast< float >( ( new CLuaArgument( pLuaVM, -2 ) )->GetNumber() );
|
||||||
|
fZ = static_cast< float >( ( new CLuaArgument( pLuaVM, -1 ) )->GetNumber() );
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CLuaFunctionDefinitions::GetElementInterior( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementInterior", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return static_cast< int >( pLuaArgument.GetNumber() );
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::IsElementWithinColShape( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "isElementWithinColShape", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::IsElementWithinMarker( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "isElementWithinMarker", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CLuaFunctionDefinitions::GetElementDimension( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementDimension", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return static_cast< int >( pLuaArgument.GetNumber() );
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
string CLuaFunctionDefinitions::GetElementZoneName( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementZoneName", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return string( pLuaArgument.GetString() );
|
||||||
|
}
|
||||||
|
|
||||||
|
return string();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::IsElementAttached( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "isElementAttached", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* CLuaFunctionDefinitions::GetElementAttachedTo( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementAttachedTo", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetLightUserData();
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* CLuaFunctionDefinitions::GetElementColShape( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementColShape", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetLightUserData();
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CLuaFunctionDefinitions::GetElementAlpha( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementAlpha", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return static_cast< int >( pLuaArgument.GetNumber() );
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::IsElementDoubleSided( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "isElementDoubleSided", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
float CLuaFunctionDefinitions::GetElementHealth( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementHealth", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return static_cast< float >( pLuaArgument.GetNumber() );
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CLuaFunctionDefinitions::GetElementModel( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementModel", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return static_cast< int >( pLuaArgument.GetNumber() );
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::IsElementInWater( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "isElementInWater", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::GetElementAttachedOffsets( lua_State* pLuaVM, void* pUserData, float &fX, float &fY, float &fZ, float &fRX, float &fRY, float &fRZ )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementAttachedOffsets", 6 ) )
|
||||||
|
{
|
||||||
|
fX = static_cast< float >( ( new CLuaArgument( pLuaVM, -6 ) )->GetNumber() );
|
||||||
|
fY = static_cast< float >( ( new CLuaArgument( pLuaVM, -5 ) )->GetNumber() );
|
||||||
|
fZ = static_cast< float >( ( new CLuaArgument( pLuaVM, -4 ) )->GetNumber() );
|
||||||
|
fRX = static_cast< float >( ( new CLuaArgument( pLuaVM, -3 ) )->GetNumber() );
|
||||||
|
fRY = static_cast< float >( ( new CLuaArgument( pLuaVM, -2 ) )->GetNumber() );
|
||||||
|
fRZ = static_cast< float >( ( new CLuaArgument( pLuaVM, -1 ) )->GetNumber() );
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* CLuaFunctionDefinitions::GetElementSyncer( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementSyncer", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetLightUserData();
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::GetElementCollisionsEnabled( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getElementCollisionsEnabled", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::IsElementFrozen( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "isElementFrozen", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::GetLowLodElement( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "getLowLodElement", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::IsElementLowLod( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "isElementLowLod", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Element set funcs
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::ClearElementVisibleTo( lua_State* pLuaVM, void* pUserData )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "clearElementVisibleTo", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementID( lua_State* pLuaVM, void* pUserData, string sID )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushString( sID.c_str() );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementID", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementData( lua_State* pLuaVM, void* pUserData, string sKey, const CLuaArgument& Variable )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushString( sKey.c_str() );
|
||||||
|
pLuaArguments.PushArgument( Variable );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementData", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::RemoveElementData( lua_State* pLuaVM, void* pUserData, string sKey )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushString( sKey.c_str() );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "removeElementData", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementParent( lua_State* pLuaVM, void* pUserData, void* pTarget )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushUserData( pTarget );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementParent", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementPosition( lua_State* pLuaVM, void* pUserData, float fX, float fY, float fZ )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushNumber( fX );
|
||||||
|
pLuaArguments.PushNumber( fY );
|
||||||
|
pLuaArguments.PushNumber( fZ );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementPosition", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementRotation( lua_State* pLuaVM, void* pUserData, float fX, float fY, float fZ )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushNumber( fX );
|
||||||
|
pLuaArguments.PushNumber( fY );
|
||||||
|
pLuaArguments.PushNumber( fZ );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementRotation", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementVelocity( lua_State* pLuaVM, void* pUserData, float fX, float fY, float fZ )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushNumber( fX );
|
||||||
|
pLuaArguments.PushNumber( fY );
|
||||||
|
pLuaArguments.PushNumber( fZ );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementVelocity", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementVisibleTo( lua_State* pLuaVM, void* pUserData, void* pTarget, bool bVisible )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushUserData( pTarget );
|
||||||
|
pLuaArguments.PushBoolean( bVisible );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementVisibleTo", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementInterior( lua_State* pLuaVM, void* pUserData, int iInterior )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushNumber( iInterior );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementInterior", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementDimension( lua_State* pLuaVM, void* pUserData, int iDimension )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushNumber( iDimension );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementDimension", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::AttachElements( lua_State* pLuaVM, void* pUserData, void* pTarget, float fX, float fY, float fZ, float fRX, float fRY, float fRZ )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushNumber( fX );
|
||||||
|
pLuaArguments.PushNumber( fY );
|
||||||
|
pLuaArguments.PushNumber( fZ );
|
||||||
|
pLuaArguments.PushNumber( fRX );
|
||||||
|
pLuaArguments.PushNumber( fRY );
|
||||||
|
pLuaArguments.PushNumber( fRZ );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "attachElements", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::DetachElements( lua_State* pLuaVM, void* pUserData, void* pTarget )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
|
||||||
|
if( pTarget )
|
||||||
|
{
|
||||||
|
pLuaArguments.PushUserData( pTarget );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "detachElements", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementAlpha( lua_State* pLuaVM, void* pUserData, int iAlpha )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushNumber( iAlpha );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementAlpha", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementDoubleSided( lua_State* pLuaVM, void* pUserData, bool bDoubleSided )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushBoolean( bDoubleSided );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementDoubleSided", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementHealth( lua_State* pLuaVM, void* pUserData, float fHealth )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushNumber( fHealth );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementHealth", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementModel( lua_State* pLuaVM, void* pUserData, int iModel )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushNumber( iModel );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementModel", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementAttachedOffsets( lua_State* pLuaVM, void* pUserData, float fX, float fY, float fZ, float fRX, float fRY, float fRZ )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushNumber( fX );
|
||||||
|
pLuaArguments.PushNumber( fY );
|
||||||
|
pLuaArguments.PushNumber( fZ );
|
||||||
|
pLuaArguments.PushNumber( fRX );
|
||||||
|
pLuaArguments.PushNumber( fRY );
|
||||||
|
pLuaArguments.PushNumber( fRZ );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementAttachedOffsets", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementSyncer( lua_State* pLuaVM, void* pUserData, void* pPlayer )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushUserData( pPlayer );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementSyncer", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementCollisionsEnabled( lua_State* pLuaVM, void* pUserData, bool bEnabled )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushBoolean( bEnabled );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementCollisionsEnabled", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetElementFrozen( lua_State* pLuaVM, void* pUserData, bool bFrozen )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushBoolean( bFrozen );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setElementFrozen", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CLuaFunctionDefinitions::SetLowLodElement( lua_State* pLuaVM, void* pUserData, bool bEnabled )
|
||||||
|
{
|
||||||
|
CLuaArguments pLuaArguments;
|
||||||
|
|
||||||
|
pLuaArguments.PushUserData( pUserData );
|
||||||
|
pLuaArguments.PushBoolean( bEnabled );
|
||||||
|
|
||||||
|
if( pLuaArguments.Call( pLuaVM, "setLowLodElement", 1 ) )
|
||||||
|
{
|
||||||
|
CLuaArgument pLuaArgument( pLuaVM, -1 );
|
||||||
|
|
||||||
|
return pLuaArgument.GetBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void* CLuaFunctionDefinitions::CreateVehicle( lua_State* pLuaVM, int model, float fX, float fY, float fZ, float fRX, float fRY, float fRZ, string numberplate, bool direction, int variant1, int variant2 )
|
void* CLuaFunctionDefinitions::CreateVehicle( lua_State* pLuaVM, int model, float fX, float fY, float fZ, float fRX, float fRY, float fRZ, string numberplate, bool direction, int variant1, int variant2 )
|
||||||
{
|
{
|
||||||
CLuaArguments pLuaArguments;
|
CLuaArguments pLuaArguments;
|
||||||
|
@ -31,445 +31,443 @@ public:
|
|||||||
static bool SetMapName ( lua_State* pLuaVM, const string &sName );
|
static bool SetMapName ( lua_State* pLuaVM, const string &sName );
|
||||||
static bool SetRuleValue ( lua_State* pLuaVM, const string &sKey, const string &sValue );
|
static bool SetRuleValue ( lua_State* pLuaVM, const string &sKey, const string &sValue );
|
||||||
|
|
||||||
static bool GetPosition ( lua_State* pLuaVM, void* pUserData, float &fX, float &fY, float &fZ );
|
// static int CallRemote ( lua_State* luaVM );
|
||||||
|
// static int FetchRemote ( lua_State* luaVM );
|
||||||
|
|
||||||
static void* CreateVehicle ( lua_State* luaVM, int model, float fX, float fY, float fZ, float fRX, float fRY, float fRZ, string numberplate, bool direction = false, int variant1 = 255, int variant2 = 255 );
|
// // Event functions
|
||||||
/*
|
// static int AddEvent ( lua_State* luaVM );
|
||||||
static int CallRemote ( lua_State* luaVM );
|
// static int AddEventHandler ( lua_State* luaVM );
|
||||||
static int FetchRemote ( lua_State* luaVM );
|
// static int RemoveEventHandler ( lua_State* luaVM );
|
||||||
|
// static int GetEventHandlers ( lua_State* luaVM );
|
||||||
// Event functions
|
// static int TriggerEvent ( lua_State* luaVM );
|
||||||
static int AddEvent ( lua_State* luaVM );
|
// static int TriggerClientEvent ( lua_State* luaVM );
|
||||||
static int AddEventHandler ( lua_State* luaVM );
|
// static int CancelEvent ( lua_State* luaVM );
|
||||||
static int RemoveEventHandler ( lua_State* luaVM );
|
// static int GetCancelReason ( lua_State* luaVM );
|
||||||
static int GetEventHandlers ( lua_State* luaVM );
|
// static int WasEventCancelled ( lua_State* luaVM );
|
||||||
static int TriggerEvent ( lua_State* luaVM );
|
// static int TriggerLatentClientEvent ( lua_State* luaVM );
|
||||||
static int TriggerClientEvent ( lua_State* luaVM );
|
// static int GetLatentEventHandles ( lua_State* luaVM );
|
||||||
static int CancelEvent ( lua_State* luaVM );
|
// static int GetLatentEventStatus ( lua_State* luaVM );
|
||||||
static int GetCancelReason ( lua_State* luaVM );
|
// static int CancelLatentEvent ( lua_State* luaVM );
|
||||||
static int WasEventCancelled ( lua_State* luaVM );
|
|
||||||
static int TriggerLatentClientEvent ( lua_State* luaVM );
|
|
||||||
static int GetLatentEventHandles ( lua_State* luaVM );
|
|
||||||
static int GetLatentEventStatus ( lua_State* luaVM );
|
|
||||||
static int CancelLatentEvent ( lua_State* luaVM );
|
|
||||||
|
|
||||||
// Element create/destroy
|
// Element create/destroy
|
||||||
static CDummy* CreateElement ( lua_State* luaVM );
|
static void* CreateElement ( lua_State* pLuaVM, string sType, string sID );
|
||||||
static bool DestroyElement ( lua_State* luaVM );
|
static bool DestroyElement ( lua_State* pLuaVM, void* pUserData );
|
||||||
static CElement* CloneElement ( lua_State* luaVM );
|
static void* CloneElement ( lua_State* pLuaVM, void* pUserData, float fX = 0.0f, float fY = 0.0f, float fZ = 0.0f, bool bCloneChildren = false );
|
||||||
|
|
||||||
// Element get funcs
|
// Element get funcs
|
||||||
static CElement* GetElementByID ( lua_State* luaVM );
|
static bool IsElement ( lua_State* pLuaVM, void* pUserData );
|
||||||
static CElement* GetElementByIndex ( lua_State* luaVM );
|
static string GetElementType ( lua_State* pLuaVM, void* pUserData );
|
||||||
static CElement* GetElementChild ( lua_State* luaVM );
|
static void* GetElementByID ( lua_State* pLuaVM, string sID );
|
||||||
static bool GetElementChildrenCount ( lua_State* luaVM );
|
static void* GetElementByIndex ( lua_State* pLuaVM, int iIndex );
|
||||||
static CLuaArgument* GetElementData ( lua_State* luaVM );
|
static void* GetElementChild ( lua_State* pLuaVM, void* pUserData, int iIndex );
|
||||||
static CLuaArguments* GetAllElementData ( lua_State* luaVM );
|
static int GetElementChildrenCount ( lua_State* pLuaVM, void* pUserData );
|
||||||
static CElement* GetElementParent ( lua_State* luaVM );
|
static string GetElementID ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool GetElementPosition ( lua_State* luaVM );
|
static CLuaArgument* GetElementData ( lua_State* pLuaVM, void* pUserData, string sKey, bool bInherit = true );
|
||||||
static bool GetElementRotation ( lua_State* luaVM );
|
static CLuaArguments* GetAllElementData ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool GetElementVelocity ( lua_State* luaVM );
|
static void* GetElementParent ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool GetElementInterior ( lua_State* luaVM );
|
static bool GetElementPosition ( lua_State* pLuaVM, void* pUserData, float &fX, float &fY, float &fZ );
|
||||||
static bool IsElementWithinColShape ( lua_State* luaVM );
|
static bool GetElementRotation ( lua_State* pLuaVM, void* pUserData, float &fX, float &fY, float &fZ );
|
||||||
static bool IsElementWithinMarker ( lua_State* luaVM );
|
static bool GetElementVelocity ( lua_State* pLuaVM, void* pUserData, float &fX, float &fY, float &fZ );
|
||||||
static bool GetElementDimension ( lua_State* luaVM );
|
static int GetElementInterior ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool GetElementZoneName ( lua_State* luaVM );
|
static bool IsElementWithinColShape ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool IsElementAttached ( lua_State* luaVM );
|
static bool IsElementWithinMarker ( lua_State* pLuaVM, void* pUserData );
|
||||||
static CElement* GetElementAttachedTo ( lua_State* luaVM );
|
static int GetElementDimension ( lua_State* pLuaVM, void* pUserData );
|
||||||
static CColShape* GetElementColShape ( lua_State* luaVM );
|
static string GetElementZoneName ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool GetElementAlpha ( lua_State* luaVM );
|
static bool IsElementAttached ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool IsElementDoubleSided ( lua_State* luaVM );
|
static void* GetElementAttachedTo ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool GetElementHealth ( lua_State* luaVM );
|
static void* GetElementColShape ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool GetElementModel ( lua_State* luaVM );
|
static int GetElementAlpha ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool IsElementInWater ( lua_State* luaVM );
|
static bool IsElementDoubleSided ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool GetElementAttachedOffsets ( lua_State* luaVM );
|
static float GetElementHealth ( lua_State* pLuaVM, void* pUserData );
|
||||||
static CElement* GetElementSyncer ( lua_State* luaVM );
|
static int GetElementModel ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool GetElementCollisionsEnabled ( lua_State* luaVM );
|
static bool IsElementInWater ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool IsElementFrozen ( lua_State* luaVM );
|
static bool GetElementAttachedOffsets ( lua_State* pLuaVM, void* pUserData, float &fX, float &fY, float &fZ, float &fRX, float &fRY, float &fRZ );
|
||||||
static bool GetLowLodElement ( lua_State* luaVM );
|
static void* GetElementSyncer ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool IsElementLowLod ( lua_State* luaVM );
|
static bool GetElementCollisionsEnabled ( lua_State* pLuaVM, void* pUserData );
|
||||||
|
static bool IsElementFrozen ( lua_State* pLuaVM, void* pUserData );
|
||||||
|
static bool GetLowLodElement ( lua_State* pLuaVM, void* pUserData );
|
||||||
|
static bool IsElementLowLod ( lua_State* pLuaVM, void* pUserData );
|
||||||
|
|
||||||
// Element set funcs
|
// Element set funcs
|
||||||
static bool ClearElementVisibleTo ( lua_State* luaVM );
|
static bool ClearElementVisibleTo ( lua_State* pLuaVM, void* pUserData );
|
||||||
static bool SetElementID ( lua_State* luaVM );
|
static bool SetElementID ( lua_State* pLuaVM, void* pUserData, string sID );
|
||||||
static bool SetElementData ( lua_State* luaVM );
|
static bool SetElementData ( lua_State* pLuaVM, void* pUserData, string sKey, const CLuaArgument& Variable );
|
||||||
static bool RemoveElementData ( lua_State* luaVM );
|
static bool RemoveElementData ( lua_State* pLuaVM, void* pUserData, string sKey );
|
||||||
static bool SetElementParent ( lua_State* luaVM );
|
static bool SetElementParent ( lua_State* pLuaVM, void* pUserData, void* pTarget );
|
||||||
static bool SetElementPosition ( lua_State* luaVM );
|
static bool SetElementPosition ( lua_State* pLuaVM, void* pUserData, float fX, float fY, float fZ );
|
||||||
static bool SetElementRotation ( lua_State* luaVM );
|
static bool SetElementRotation ( lua_State* pLuaVM, void* pUserData, float fX, float fY, float fZ );
|
||||||
static bool SetElementVelocity ( lua_State* luaVM );
|
static bool SetElementVelocity ( lua_State* pLuaVM, void* pUserData, float fX, float fY, float fZ );
|
||||||
static bool SetElementVisibleTo ( lua_State* luaVM );
|
static bool SetElementVisibleTo ( lua_State* pLuaVM, void* pUserData, void* pTarget, bool bVisible );
|
||||||
static bool SetElementInterior ( lua_State* luaVM );
|
static bool SetElementInterior ( lua_State* pLuaVM, void* pUserData, int iInterior );
|
||||||
static bool SetElementDimension ( lua_State* luaVM );
|
static bool SetElementDimension ( lua_State* pLuaVM, void* pUserData, int iDimension );
|
||||||
static bool AttachElements ( lua_State* luaVM );
|
static bool AttachElements ( lua_State* pLuaVM, void* pUserData, void* pTarget, float fX = 0.0f, float fY = 0.0f, float fZ = 0.0f, float fRX = 0.0f, float fRY = 0.0f, float fRZ = 0.0f );
|
||||||
static bool DetachElements ( lua_State* luaVM );
|
static bool DetachElements ( lua_State* pLuaVM, void* pUserData, void* pTarget = NULL );
|
||||||
static bool SetElementAlpha ( lua_State* luaVM );
|
static bool SetElementAlpha ( lua_State* pLuaVM, void* pUserData, int iAlpha );
|
||||||
static bool SetElementDoubleSided ( lua_State* luaVM );
|
static bool SetElementDoubleSided ( lua_State* pLuaVM, void* pUserData, bool bDoubleSided );
|
||||||
static bool SetElementHealth ( lua_State* luaVM );
|
static bool SetElementHealth ( lua_State* pLuaVM, void* pUserData, float fHealth );
|
||||||
static bool SetElementModel ( lua_State* luaVM );
|
static bool SetElementModel ( lua_State* pLuaVM, void* pUserData, int iModel );
|
||||||
static bool SetElementAttachedOffsets ( lua_State* luaVM );
|
static bool SetElementAttachedOffsets ( lua_State* pLuaVM, void* pUserData, float fX, float fY, float fZ, float fRX, float fRY, float fRZ );
|
||||||
static bool SetElementSyncer ( lua_State* luaVM );
|
static bool SetElementSyncer ( lua_State* pLuaVM, void* pUserData, void* pPlayer );
|
||||||
static bool SetElementCollisionsEnabled ( lua_State* luaVM );
|
static bool SetElementCollisionsEnabled ( lua_State* pLuaVM, void* pUserData, bool bEnabled );
|
||||||
static bool SetElementFrozen ( lua_State* luaVM );
|
static bool SetElementFrozen ( lua_State* pLuaVM, void* pUserData, bool bFrozen );
|
||||||
static bool SetLowLodElement ( lua_State* luaVM );
|
static bool SetLowLodElement ( lua_State* pLuaVM, void* pUserData, bool bEnabled );
|
||||||
|
|
||||||
// Player get functions
|
//// Player get functions
|
||||||
static int GetPlayerCount ( lua_State* luaVM );
|
// static int GetPlayerCount ( lua_State* luaVM );
|
||||||
static int GetPedAmmoInClip ( lua_State* luaVM );
|
// static int GetPedAmmoInClip ( lua_State* luaVM );
|
||||||
static int GetPedTotalAmmo ( lua_State* luaVM );
|
// static int GetPedTotalAmmo ( lua_State* luaVM );
|
||||||
static int SetPlayerAmmo ( lua_State* luaVM );
|
// static int SetPlayerAmmo ( lua_State* luaVM );
|
||||||
static int GetPlayerFromName ( lua_State* luaVM );
|
// static int GetPlayerFromName ( lua_State* luaVM );
|
||||||
static int GetPlayerMoney ( lua_State* luaVM );
|
// static int GetPlayerMoney ( lua_State* luaVM );
|
||||||
static int GetPlayerPing ( lua_State* luaVM );
|
// static int GetPlayerPing ( lua_State* luaVM );
|
||||||
static int GetRandomPlayer ( lua_State* luaVM );
|
// static int GetRandomPlayer ( lua_State* luaVM );
|
||||||
static int IsPlayerMuted ( lua_State* luaVM );
|
// static int IsPlayerMuted ( lua_State* luaVM );
|
||||||
static int GetPlayerTeam ( lua_State* luaVM );
|
// static int GetPlayerTeam ( lua_State* luaVM );
|
||||||
static int CanPlayerUseFunction ( lua_State* luaVM );
|
// static int CanPlayerUseFunction ( lua_State* luaVM );
|
||||||
static int GetPlayerWantedLevel ( lua_State* luaVM );
|
// static int GetPlayerWantedLevel ( lua_State* luaVM );
|
||||||
static int GetAlivePlayers ( lua_State* luaVM );
|
// static int GetAlivePlayers ( lua_State* luaVM );
|
||||||
static int GetDeadPlayers ( lua_State* luaVM );
|
// static int GetDeadPlayers ( lua_State* luaVM );
|
||||||
static int GetPlayerIdleTime ( lua_State* luaVM );
|
// static int GetPlayerIdleTime ( lua_State* luaVM );
|
||||||
static int IsPlayerScoreboardForced ( lua_State* luaVM );
|
// static int IsPlayerScoreboardForced ( lua_State* luaVM );
|
||||||
static int IsPlayerMapForced ( lua_State* luaVM );
|
// static int IsPlayerMapForced ( lua_State* luaVM );
|
||||||
static int GetPlayerNametagText ( lua_State* luaVM );
|
// static int GetPlayerNametagText ( lua_State* luaVM );
|
||||||
static int GetPlayerNametagColor ( lua_State* luaVM );
|
// static int GetPlayerNametagColor ( lua_State* luaVM );
|
||||||
static int IsPlayerNametagShowing ( lua_State* luaVM );
|
// static int IsPlayerNametagShowing ( lua_State* luaVM );
|
||||||
static int GetPlayerSerial ( lua_State* luaVM );
|
// static int GetPlayerSerial ( lua_State* luaVM );
|
||||||
static int GetPlayerCommunityID ( lua_State* luaVM );
|
// static int GetPlayerCommunityID ( lua_State* luaVM );
|
||||||
static int IsPlayerDev ( lua_State* luaVM );
|
// static int IsPlayerDev ( lua_State* luaVM );
|
||||||
static int IsPlayerQA ( lua_State* luaVM );
|
// static int IsPlayerQA ( lua_State* luaVM );
|
||||||
static int GetPlayerUserName ( lua_State* luaVM );
|
// static int GetPlayerUserName ( lua_State* luaVM );
|
||||||
static int GetPlayerBlurLevel ( lua_State* luaVM );
|
// static int GetPlayerBlurLevel ( lua_State* luaVM );
|
||||||
static int GetPlayerName ( lua_State* luaVM );
|
// static int GetPlayerName ( lua_State* luaVM );
|
||||||
static int GetPlayerIP ( lua_State* luaVM );
|
// static int GetPlayerIP ( lua_State* luaVM );
|
||||||
static int GetPlayerAccount ( lua_State* luaVM );
|
// static int GetPlayerAccount ( lua_State* luaVM );
|
||||||
static int GetPlayerVersion ( lua_State* luaVM );
|
// static int GetPlayerVersion ( lua_State* luaVM );
|
||||||
static int GetPlayerACInfo ( lua_State* luaVM );
|
// static int GetPlayerACInfo ( lua_State* luaVM );
|
||||||
|
|
||||||
// Player set functions
|
// // Player set functions
|
||||||
static int SetPlayerMoney ( lua_State* luaVM );
|
// static int SetPlayerMoney ( lua_State* luaVM );
|
||||||
static int GivePlayerMoney ( lua_State* luaVM );
|
// static int GivePlayerMoney ( lua_State* luaVM );
|
||||||
static int TakePlayerMoney ( lua_State* luaVM );
|
// static int TakePlayerMoney ( lua_State* luaVM );
|
||||||
static int SpawnPlayer ( lua_State* luaVM );
|
// static int SpawnPlayer ( lua_State* luaVM );
|
||||||
static int ShowPlayerHudComponent ( lua_State* luaVM );
|
// static int ShowPlayerHudComponent ( lua_State* luaVM );
|
||||||
static int SetPlayerWantedLevel ( lua_State* luaVM );
|
// static int SetPlayerWantedLevel ( lua_State* luaVM );
|
||||||
static int ForcePlayerMap ( lua_State* luaVM );
|
// static int ForcePlayerMap ( lua_State* luaVM );
|
||||||
static int SetPlayerNametagText ( lua_State* luaVM );
|
// static int SetPlayerNametagText ( lua_State* luaVM );
|
||||||
static int SetPlayerNametagColor ( lua_State* luaVM );
|
// static int SetPlayerNametagColor ( lua_State* luaVM );
|
||||||
static int SetPlayerNametagShowing ( lua_State* luaVM );
|
// static int SetPlayerNametagShowing ( lua_State* luaVM );
|
||||||
static int SetPlayerMuted ( lua_State* luaVM );
|
// static int SetPlayerMuted ( lua_State* luaVM );
|
||||||
static int SetPlayerBlurLevel ( lua_State* luaVM );
|
// static int SetPlayerBlurLevel ( lua_State* luaVM );
|
||||||
static int RedirectPlayer ( lua_State* luaVM );
|
// static int RedirectPlayer ( lua_State* luaVM );
|
||||||
static int SetPlayerName ( lua_State* luaVM );
|
// static int SetPlayerName ( lua_State* luaVM );
|
||||||
static int DetonateSatchels ( lua_State* luaVM );
|
// static int DetonateSatchels ( lua_State* luaVM );
|
||||||
static int TakePlayerScreenShot ( lua_State* luaVM );
|
// static int TakePlayerScreenShot ( lua_State* luaVM );
|
||||||
|
|
||||||
// Ped get functions
|
//// Ped get functions
|
||||||
static int CreatePed ( lua_State* luaVM );
|
// static int CreatePed ( lua_State* luaVM );
|
||||||
static int GetPedArmor ( lua_State* luaVM );
|
// static int GetPedArmor ( lua_State* luaVM );
|
||||||
static int GetPedRotation ( lua_State* luaVM );
|
// static int GetPedRotation ( lua_State* luaVM );
|
||||||
static int IsPedChoking ( lua_State* luaVM );
|
// static int IsPedChoking ( lua_State* luaVM );
|
||||||
static int IsPedDead ( lua_State* luaVM );
|
// static int IsPedDead ( lua_State* luaVM );
|
||||||
static int IsPedDucked ( lua_State* luaVM );
|
// static int IsPedDucked ( lua_State* luaVM );
|
||||||
static int GetPedStat ( lua_State* luaVM );
|
// static int GetPedStat ( lua_State* luaVM );
|
||||||
static int GetPedTarget ( lua_State* luaVM );
|
// static int GetPedTarget ( lua_State* luaVM );
|
||||||
static int GetPedWeapon ( lua_State* luaVM );
|
// static int GetPedWeapon ( lua_State* luaVM );
|
||||||
static int GetPedClothes ( lua_State* luaVM );
|
// static int GetPedClothes ( lua_State* luaVM );
|
||||||
static int DoesPedHaveJetPack ( lua_State* luaVM );
|
// static int DoesPedHaveJetPack ( lua_State* luaVM );
|
||||||
static int IsPedOnGround ( lua_State* luaVM );
|
// static int IsPedOnGround ( lua_State* luaVM );
|
||||||
static int GetPedFightingStyle ( lua_State* luaVM );
|
// static int GetPedFightingStyle ( lua_State* luaVM );
|
||||||
static int GetPedMoveAnim ( lua_State* luaVM );
|
// static int GetPedMoveAnim ( lua_State* luaVM );
|
||||||
static int GetPedGravity ( lua_State* luaVM );
|
// static int GetPedGravity ( lua_State* luaVM );
|
||||||
static int GetPedContactElement ( lua_State* luaVM );
|
// static int GetPedContactElement ( lua_State* luaVM );
|
||||||
static int GetPedWeaponSlot ( lua_State* luaVM );
|
// static int GetPedWeaponSlot ( lua_State* luaVM );
|
||||||
static int IsPedDoingGangDriveby ( lua_State* luaVM );
|
// static int IsPedDoingGangDriveby ( lua_State* luaVM );
|
||||||
static int IsPedOnFire ( lua_State* luaVM );
|
// static int IsPedOnFire ( lua_State* luaVM );
|
||||||
static int IsPedHeadless ( lua_State* luaVM );
|
// static int IsPedHeadless ( lua_State* luaVM );
|
||||||
static int IsPedFrozen ( lua_State* luaVM );
|
// static int IsPedFrozen ( lua_State* luaVM );
|
||||||
static int GetPedOccupiedVehicle ( lua_State* luaVM );
|
// static int GetPedOccupiedVehicle ( lua_State* luaVM );
|
||||||
static int GetPedOccupiedVehicleSeat ( lua_State* luaVM );
|
// static int GetPedOccupiedVehicleSeat ( lua_State* luaVM );
|
||||||
static int IsPedInVehicle ( lua_State* luaVM );
|
// static int IsPedInVehicle ( lua_State* luaVM );
|
||||||
static int GetWeaponProperty ( lua_State* luaVM );
|
// static int GetWeaponProperty ( lua_State* luaVM );
|
||||||
static int GetOriginalWeaponProperty ( lua_State* luaVM );
|
// static int GetOriginalWeaponProperty ( lua_State* luaVM );
|
||||||
|
|
||||||
// Player set functions
|
// // Player set functions
|
||||||
static int SetPedArmor ( lua_State* luaVM );
|
// static int SetPedArmor ( lua_State* luaVM );
|
||||||
static int KillPed ( lua_State* luaVM );
|
// static int KillPed ( lua_State* luaVM );
|
||||||
static int SetPedRotation ( lua_State* luaVM );
|
// static int SetPedRotation ( lua_State* luaVM );
|
||||||
static int SetPedStat ( lua_State* luaVM );
|
// static int SetPedStat ( lua_State* luaVM );
|
||||||
static int AddPedClothes ( lua_State* luaVM );
|
// static int AddPedClothes ( lua_State* luaVM );
|
||||||
static int RemovePedClothes ( lua_State* luaVM );
|
// static int RemovePedClothes ( lua_State* luaVM );
|
||||||
static int GivePedJetPack ( lua_State* luaVM );
|
// static int GivePedJetPack ( lua_State* luaVM );
|
||||||
static int RemovePedJetPack ( lua_State* luaVM );
|
// static int RemovePedJetPack ( lua_State* luaVM );
|
||||||
static int SetPedFightingStyle ( lua_State* luaVM );
|
// static int SetPedFightingStyle ( lua_State* luaVM );
|
||||||
static int SetPedMoveAnim ( lua_State* luaVM );
|
// static int SetPedMoveAnim ( lua_State* luaVM );
|
||||||
static int SetPedGravity ( lua_State* luaVM );
|
// static int SetPedGravity ( lua_State* luaVM );
|
||||||
static int SetPedChoking ( lua_State* luaVM );
|
// static int SetPedChoking ( lua_State* luaVM );
|
||||||
static int WarpPedIntoVehicle ( lua_State* luaVM );
|
// static int WarpPedIntoVehicle ( lua_State* luaVM );
|
||||||
static int RemovePedFromVehicle ( lua_State* luaVM );
|
// static int RemovePedFromVehicle ( lua_State* luaVM );
|
||||||
static int SetPedDoingGangDriveby ( lua_State* luaVM );
|
// static int SetPedDoingGangDriveby ( lua_State* luaVM );
|
||||||
static int SetPedAnimation ( lua_State* luaVM );
|
// static int SetPedAnimation ( lua_State* luaVM );
|
||||||
static int SetPedAnimationProgress ( lua_State* luaVM );
|
// static int SetPedAnimationProgress ( lua_State* luaVM );
|
||||||
static int SetPedWeaponSlot ( lua_State* luaVM );
|
// static int SetPedWeaponSlot ( lua_State* luaVM );
|
||||||
static int SetPedOnFire ( lua_State* luaVM );
|
// static int SetPedOnFire ( lua_State* luaVM );
|
||||||
static int SetPedHeadless ( lua_State* luaVM );
|
// static int SetPedHeadless ( lua_State* luaVM );
|
||||||
static int SetPedFrozen ( lua_State* luaVM );
|
// static int SetPedFrozen ( lua_State* luaVM );
|
||||||
static int reloadPedWeapon ( lua_State* luaVM );
|
// static int reloadPedWeapon ( lua_State* luaVM );
|
||||||
static int SetWeaponProperty ( lua_State* luaVM );
|
// static int SetWeaponProperty ( lua_State* luaVM );
|
||||||
|
|
||||||
// Weapon give/take functions
|
// // Weapon give/take functions
|
||||||
static int GiveWeapon ( lua_State* luaVM );
|
// static int GiveWeapon ( lua_State* luaVM );
|
||||||
static int TakeWeapon ( lua_State* luaVM );
|
// static int TakeWeapon ( lua_State* luaVM );
|
||||||
static int TakeAllWeapons ( lua_State* luaVM );
|
// static int TakeAllWeapons ( lua_State* luaVM );
|
||||||
static int SetWeaponAmmo ( lua_State* luaVM );
|
// static int SetWeaponAmmo ( lua_State* luaVM );
|
||||||
static int GetSlotFromWeapon ( lua_State* luaVM );
|
// static int GetSlotFromWeapon ( lua_State* luaVM );
|
||||||
|
|
||||||
// Vehicle create/destroy functions
|
// // Vehicle create/destroy functions
|
||||||
static int CreateVehicle ( lua_State* luaVM );
|
static void* CreateVehicle ( lua_State* luaVM, int model, float fX, float fY, float fZ, float fRX, float fRY, float fRZ, string numberplate, bool direction = false, int variant1 = 255, int variant2 = 255 );
|
||||||
|
|
||||||
// Vehicle get functions
|
// // Vehicle get functions
|
||||||
static int GetVehicleType ( lua_State* luaVM );
|
// static int GetVehicleType ( lua_State* luaVM );
|
||||||
static int GetVehicleVariant ( lua_State* luaVM );
|
// static int GetVehicleVariant ( lua_State* luaVM );
|
||||||
static int GetVehicleColor ( lua_State* luaVM );
|
// static int GetVehicleColor ( lua_State* luaVM );
|
||||||
static int GetVehicleModelFromName ( lua_State* luaVM );
|
// static int GetVehicleModelFromName ( lua_State* luaVM );
|
||||||
static int GetVehicleLandingGearDown ( lua_State* luaVM );
|
// static int GetVehicleLandingGearDown ( lua_State* luaVM );
|
||||||
static int GetVehicleMaxPassengers ( lua_State* luaVM );
|
// static int GetVehicleMaxPassengers ( lua_State* luaVM );
|
||||||
static int GetVehicleName ( lua_State* luaVM );
|
// static int GetVehicleName ( lua_State* luaVM );
|
||||||
static int GetVehicleNameFromModel ( lua_State* luaVM );
|
// static int GetVehicleNameFromModel ( lua_State* luaVM );
|
||||||
static int GetVehicleOccupant ( lua_State* luaVM );
|
// static int GetVehicleOccupant ( lua_State* luaVM );
|
||||||
static int GetVehicleOccupants ( lua_State* luaVM );
|
// static int GetVehicleOccupants ( lua_State* luaVM );
|
||||||
static int GetVehicleController ( lua_State* luaVM );
|
// static int GetVehicleController ( lua_State* luaVM );
|
||||||
static int GetVehicleRotation ( lua_State* luaVM );
|
// static int GetVehicleRotation ( lua_State* luaVM );
|
||||||
static int GetVehicleSirensOn ( lua_State* luaVM );
|
// static int GetVehicleSirensOn ( lua_State* luaVM );
|
||||||
static int GetVehicleTurnVelocity ( lua_State* luaVM );
|
// static int GetVehicleTurnVelocity ( lua_State* luaVM );
|
||||||
static int GetVehicleTurretPosition ( lua_State* luaVM );
|
// static int GetVehicleTurretPosition ( lua_State* luaVM );
|
||||||
static int IsVehicleLocked ( lua_State* luaVM );
|
// static int IsVehicleLocked ( lua_State* luaVM );
|
||||||
static int GetVehiclesOfType ( lua_State* luaVM );
|
// static int GetVehiclesOfType ( lua_State* luaVM );
|
||||||
static int GetVehicleUpgradeOnSlot ( lua_State* luaVM );
|
// static int GetVehicleUpgradeOnSlot ( lua_State* luaVM );
|
||||||
static int GetVehicleUpgrades ( lua_State* luaVM );
|
// static int GetVehicleUpgrades ( lua_State* luaVM );
|
||||||
static int GetVehicleUpgradeSlotName ( lua_State* luaVM );
|
// static int GetVehicleUpgradeSlotName ( lua_State* luaVM );
|
||||||
static int GetVehicleCompatibleUpgrades ( lua_State* luaVM );
|
// static int GetVehicleCompatibleUpgrades ( lua_State* luaVM );
|
||||||
static int GetVehicleDoorState ( lua_State* luaVM );
|
// static int GetVehicleDoorState ( lua_State* luaVM );
|
||||||
static int GetVehicleWheelStates ( lua_State* luaVM );
|
// static int GetVehicleWheelStates ( lua_State* luaVM );
|
||||||
static int GetVehicleLightState ( lua_State* luaVM );
|
// static int GetVehicleLightState ( lua_State* luaVM );
|
||||||
static int GetVehiclePanelState ( lua_State* luaVM );
|
// static int GetVehiclePanelState ( lua_State* luaVM );
|
||||||
static int GetVehicleOverrideLights ( lua_State* luaVM );
|
// static int GetVehicleOverrideLights ( lua_State* luaVM );
|
||||||
static int GetVehicleTowedByVehicle ( lua_State* luaVM );
|
// static int GetVehicleTowedByVehicle ( lua_State* luaVM );
|
||||||
static int GetVehicleTowingVehicle ( lua_State* luaVM );
|
// static int GetVehicleTowingVehicle ( lua_State* luaVM );
|
||||||
static int GetVehiclePaintjob ( lua_State* luaVM );
|
// static int GetVehiclePaintjob ( lua_State* luaVM );
|
||||||
static int GetVehiclePlateText ( lua_State* luaVM );
|
// static int GetVehiclePlateText ( lua_State* luaVM );
|
||||||
static int IsVehicleDamageProof ( lua_State* luaVM );
|
// static int IsVehicleDamageProof ( lua_State* luaVM );
|
||||||
static int IsVehicleFuelTankExplodable ( lua_State* luaVM );
|
// static int IsVehicleFuelTankExplodable ( lua_State* luaVM );
|
||||||
static int IsVehicleFrozen ( lua_State* luaVM );
|
// static int IsVehicleFrozen ( lua_State* luaVM );
|
||||||
static int IsVehicleOnGround ( lua_State* luaVM );
|
// static int IsVehicleOnGround ( lua_State* luaVM );
|
||||||
static int GetVehicleEngineState ( lua_State* luaVM );
|
// static int GetVehicleEngineState ( lua_State* luaVM );
|
||||||
static int IsTrainDerailed ( lua_State* luaVM );
|
// static int IsTrainDerailed ( lua_State* luaVM );
|
||||||
static int IsTrainDerailable ( lua_State* luaVM );
|
// static int IsTrainDerailable ( lua_State* luaVM );
|
||||||
static int GetTrainDirection ( lua_State* luaVM );
|
// static int GetTrainDirection ( lua_State* luaVM );
|
||||||
static int GetTrainSpeed ( lua_State* luaVM );
|
// static int GetTrainSpeed ( lua_State* luaVM );
|
||||||
static int IsVehicleBlown ( lua_State* luaVM );
|
// static int IsVehicleBlown ( lua_State* luaVM );
|
||||||
static int GetVehicleHeadLightColor ( lua_State* luaVM );
|
// static int GetVehicleHeadLightColor ( lua_State* luaVM );
|
||||||
static int GetVehicleDoorOpenRatio ( lua_State* luaVM );
|
// static int GetVehicleDoorOpenRatio ( lua_State* luaVM );
|
||||||
|
|
||||||
// Vehicle set functions
|
// // Vehicle set functions
|
||||||
static int FixVehicle ( lua_State* luaVM );
|
// static int FixVehicle ( lua_State* luaVM );
|
||||||
static int BlowVehicle ( lua_State* luaVM );
|
// static int BlowVehicle ( lua_State* luaVM );
|
||||||
static int SetVehicleRotation ( lua_State* luaVM );
|
// static int SetVehicleRotation ( lua_State* luaVM );
|
||||||
static int SetVehicleTurnVelocity ( lua_State* luaVM );
|
// static int SetVehicleTurnVelocity ( lua_State* luaVM );
|
||||||
static int SetVehicleColor ( lua_State* luaVM );
|
// static int SetVehicleColor ( lua_State* luaVM );
|
||||||
static int SetVehicleLandingGearDown ( lua_State* luaVM );
|
// static int SetVehicleLandingGearDown ( lua_State* luaVM );
|
||||||
static int SetVehicleLocked ( lua_State* luaVM );
|
// static int SetVehicleLocked ( lua_State* luaVM );
|
||||||
static int SetVehicleModel ( lua_State* luaVM );
|
// static int SetVehicleModel ( lua_State* luaVM );
|
||||||
static int SetVehicleDoorsUndamageable ( lua_State* luaVM );
|
// static int SetVehicleDoorsUndamageable ( lua_State* luaVM );
|
||||||
static int SetVehicleSirensOn ( lua_State* luaVM );
|
// static int SetVehicleSirensOn ( lua_State* luaVM );
|
||||||
static int SetVehicleTaxiLightOn ( lua_State* luaVM );
|
// static int SetVehicleTaxiLightOn ( lua_State* luaVM );
|
||||||
static int IsVehicleTaxiLightOn ( lua_State* luaVM );
|
// static int IsVehicleTaxiLightOn ( lua_State* luaVM );
|
||||||
static int AddVehicleUpgrade ( lua_State* luaVM );
|
// static int AddVehicleUpgrade ( lua_State* luaVM );
|
||||||
static int RemoveVehicleUpgrade ( lua_State* luaVM );
|
// static int RemoveVehicleUpgrade ( lua_State* luaVM );
|
||||||
static int SetVehicleDoorState ( lua_State* luaVM );
|
// static int SetVehicleDoorState ( lua_State* luaVM );
|
||||||
static int SetVehicleWheelStates ( lua_State* luaVM );
|
// static int SetVehicleWheelStates ( lua_State* luaVM );
|
||||||
static int SetVehicleLightState ( lua_State* luaVM );
|
// static int SetVehicleLightState ( lua_State* luaVM );
|
||||||
static int SetVehiclePanelState ( lua_State* luaVM );
|
// static int SetVehiclePanelState ( lua_State* luaVM );
|
||||||
static int SetVehicleIdleRespawnDelay ( lua_State* luaVM );
|
// static int SetVehicleIdleRespawnDelay ( lua_State* luaVM );
|
||||||
static int SetVehicleRespawnDelay ( lua_State* luaVM );
|
// static int SetVehicleRespawnDelay ( lua_State* luaVM );
|
||||||
static int SetVehicleRespawnPosition ( lua_State* luaVM );
|
// static int SetVehicleRespawnPosition ( lua_State* luaVM );
|
||||||
static int ToggleVehicleRespawn ( lua_State* luaVM );
|
// static int ToggleVehicleRespawn ( lua_State* luaVM );
|
||||||
static int ResetVehicleExplosionTime ( lua_State* luaVM );
|
// static int ResetVehicleExplosionTime ( lua_State* luaVM );
|
||||||
static int ResetVehicleIdleTime ( lua_State* luaVM );
|
// static int ResetVehicleIdleTime ( lua_State* luaVM );
|
||||||
static int SpawnVehicle ( lua_State* luaVM );
|
// static int SpawnVehicle ( lua_State* luaVM );
|
||||||
static int RespawnVehicle ( lua_State* luaVM );
|
// static int RespawnVehicle ( lua_State* luaVM );
|
||||||
static int SetVehicleOverrideLights ( lua_State* luaVM );
|
// static int SetVehicleOverrideLights ( lua_State* luaVM );
|
||||||
static int AttachTrailerToVehicle ( lua_State* luaVM );
|
// static int AttachTrailerToVehicle ( lua_State* luaVM );
|
||||||
static int DetachTrailerFromVehicle ( lua_State* luaVM );
|
// static int DetachTrailerFromVehicle ( lua_State* luaVM );
|
||||||
static int SetVehicleEngineState ( lua_State* luaVM );
|
// static int SetVehicleEngineState ( lua_State* luaVM );
|
||||||
static int SetVehicleDirtLevel ( lua_State* luaVM );
|
// static int SetVehicleDirtLevel ( lua_State* luaVM );
|
||||||
static int SetVehicleDamageProof ( lua_State* luaVM );
|
// static int SetVehicleDamageProof ( lua_State* luaVM );
|
||||||
static int SetVehiclePaintjob ( lua_State* luaVM );
|
// static int SetVehiclePaintjob ( lua_State* luaVM );
|
||||||
static int SetVehicleFuelTankExplodable ( lua_State* luaVM );
|
// static int SetVehicleFuelTankExplodable ( lua_State* luaVM );
|
||||||
static int SetVehicleFrozen ( lua_State* luaVM );
|
// static int SetVehicleFrozen ( lua_State* luaVM );
|
||||||
static int SetTrainDerailed ( lua_State* luaVM );
|
// static int SetTrainDerailed ( lua_State* luaVM );
|
||||||
static int SetTrainDerailable ( lua_State* luaVM );
|
// static int SetTrainDerailable ( lua_State* luaVM );
|
||||||
static int SetTrainDirection ( lua_State* luaVM );
|
// static int SetTrainDirection ( lua_State* luaVM );
|
||||||
static int SetTrainSpeed ( lua_State* luaVM );
|
// static int SetTrainSpeed ( lua_State* luaVM );
|
||||||
static int SetVehicleHeadLightColor ( lua_State* luaVM );
|
// static int SetVehicleHeadLightColor ( lua_State* luaVM );
|
||||||
static int SetVehicleTurretPosition ( lua_State* luaVM );
|
// static int SetVehicleTurretPosition ( lua_State* luaVM );
|
||||||
static int SetVehicleDoorOpenRatio ( lua_State* luaVM );
|
// static int SetVehicleDoorOpenRatio ( lua_State* luaVM );
|
||||||
static int SetVehicleVariant ( lua_State* luaVM );
|
// static int SetVehicleVariant ( lua_State* luaVM );
|
||||||
static int GiveVehicleSirens ( lua_State* luaVM );
|
// static int GiveVehicleSirens ( lua_State* luaVM );
|
||||||
static int RemoveVehicleSirens ( lua_State* luaVM );
|
// static int RemoveVehicleSirens ( lua_State* luaVM );
|
||||||
static int SetVehicleSirens ( lua_State* luaVM );
|
// static int SetVehicleSirens ( lua_State* luaVM );
|
||||||
static int GetVehicleSirens ( lua_State* luaVM );
|
// static int GetVehicleSirens ( lua_State* luaVM );
|
||||||
static int GetVehicleSirenParams ( lua_State* luaVM );
|
// static int GetVehicleSirenParams ( lua_State* luaVM );
|
||||||
static int SetVehiclePlateText ( lua_State* luaVM );
|
// static int SetVehiclePlateText ( lua_State* luaVM );
|
||||||
|
|
||||||
// Marker create/destroy functions
|
// // Marker create/destroy functions
|
||||||
static int CreateMarker ( lua_State* luaVM );
|
// static int CreateMarker ( lua_State* luaVM );
|
||||||
|
|
||||||
// Marker get functions
|
// // Marker get functions
|
||||||
static int GetMarkerCount ( lua_State* luaVM );
|
// static int GetMarkerCount ( lua_State* luaVM );
|
||||||
static int GetMarkerType ( lua_State* luaVM );
|
// static int GetMarkerType ( lua_State* luaVM );
|
||||||
static int GetMarkerSize ( lua_State* luaVM );
|
// static int GetMarkerSize ( lua_State* luaVM );
|
||||||
static int GetMarkerColor ( lua_State* luaVM );
|
// static int GetMarkerColor ( lua_State* luaVM );
|
||||||
static int GetMarkerTarget ( lua_State* luaVM );
|
// static int GetMarkerTarget ( lua_State* luaVM );
|
||||||
static int GetMarkerIcon ( lua_State* luaVM );
|
// static int GetMarkerIcon ( lua_State* luaVM );
|
||||||
|
|
||||||
// Marker set functions
|
// // Marker set functions
|
||||||
static int SetMarkerType ( lua_State* luaVM );
|
// static int SetMarkerType ( lua_State* luaVM );
|
||||||
static int SetMarkerSize ( lua_State* luaVM );
|
// static int SetMarkerSize ( lua_State* luaVM );
|
||||||
static int SetMarkerColor ( lua_State* luaVM );
|
// static int SetMarkerColor ( lua_State* luaVM );
|
||||||
static int SetMarkerTarget ( lua_State* luaVM );
|
// static int SetMarkerTarget ( lua_State* luaVM );
|
||||||
static int SetMarkerIcon ( lua_State* luaVM );
|
// static int SetMarkerIcon ( lua_State* luaVM );
|
||||||
|
|
||||||
// Blip create/destroy functions
|
// // Blip create/destroy functions
|
||||||
static int CreateBlip ( lua_State* luaVM );
|
// static int CreateBlip ( lua_State* luaVM );
|
||||||
static int CreateBlipAttachedTo ( lua_State* luaVM );
|
// static int CreateBlipAttachedTo ( lua_State* luaVM );
|
||||||
|
|
||||||
// Blip get functions
|
// // Blip get functions
|
||||||
static int GetBlipIcon ( lua_State* luaVM );
|
// static int GetBlipIcon ( lua_State* luaVM );
|
||||||
static int GetBlipSize ( lua_State* luaVM );
|
// static int GetBlipSize ( lua_State* luaVM );
|
||||||
static int GetBlipColor ( lua_State* luaVM );
|
// static int GetBlipColor ( lua_State* luaVM );
|
||||||
static int GetBlipOrdering ( lua_State* luaVM );
|
// static int GetBlipOrdering ( lua_State* luaVM );
|
||||||
static int GetBlipVisibleDistance ( lua_State* luaVM );
|
// static int GetBlipVisibleDistance ( lua_State* luaVM );
|
||||||
|
|
||||||
// Blip set functions
|
// // Blip set functions
|
||||||
static int SetBlipIcon ( lua_State* luaVM );
|
// static int SetBlipIcon ( lua_State* luaVM );
|
||||||
static int SetBlipSize ( lua_State* luaVM );
|
// static int SetBlipSize ( lua_State* luaVM );
|
||||||
static int SetBlipColor ( lua_State* luaVM );
|
// static int SetBlipColor ( lua_State* luaVM );
|
||||||
static int SetBlipOrdering ( lua_State* luaVM );
|
// static int SetBlipOrdering ( lua_State* luaVM );
|
||||||
static int SetBlipVisibleDistance ( lua_State* luaVM );
|
// static int SetBlipVisibleDistance ( lua_State* luaVM );
|
||||||
|
|
||||||
// Object create/destroy functions
|
// // Object create/destroy functions
|
||||||
static int CreateObject ( lua_State* luaVM );
|
// static int CreateObject ( lua_State* luaVM );
|
||||||
|
|
||||||
// Object get functions
|
// // Object get functions
|
||||||
static int GetObjectName ( lua_State* luaVM );
|
// static int GetObjectName ( lua_State* luaVM );
|
||||||
static int GetObjectRotation ( lua_State* luaVM );
|
// static int GetObjectRotation ( lua_State* luaVM );
|
||||||
static int GetObjectScale ( lua_State* luaVM );
|
// static int GetObjectScale ( lua_State* luaVM );
|
||||||
|
|
||||||
// Object set functions
|
// // Object set functions
|
||||||
static int SetObjectName ( lua_State* luaVM );
|
// static int SetObjectName ( lua_State* luaVM );
|
||||||
static int SetObjectRotation ( lua_State* luaVM );
|
// static int SetObjectRotation ( lua_State* luaVM );
|
||||||
static int SetObjectScale ( lua_State* luaVM );
|
// static int SetObjectScale ( lua_State* luaVM );
|
||||||
static int MoveObject ( lua_State* luaVM );
|
// static int MoveObject ( lua_State* luaVM );
|
||||||
static int StopObject ( lua_State* luaVM );
|
// static int StopObject ( lua_State* luaVM );
|
||||||
|
|
||||||
// Radar area create/destroy funcs
|
// // Radar area create/destroy funcs
|
||||||
static int CreateRadarArea ( lua_State* luaVM );
|
// static int CreateRadarArea ( lua_State* luaVM );
|
||||||
|
|
||||||
// Radar area get funcs
|
// // Radar area get funcs
|
||||||
static int GetRadarAreaSize ( lua_State* luaVM );
|
// static int GetRadarAreaSize ( lua_State* luaVM );
|
||||||
static int GetRadarAreaColor ( lua_State* luaVM );
|
// static int GetRadarAreaColor ( lua_State* luaVM );
|
||||||
static int IsRadarAreaFlashing ( lua_State* luaVM );
|
// static int IsRadarAreaFlashing ( lua_State* luaVM );
|
||||||
static int IsInsideRadarArea ( lua_State* luaVM );
|
// static int IsInsideRadarArea ( lua_State* luaVM );
|
||||||
|
|
||||||
// Radar area set funcs
|
// // Radar area set funcs
|
||||||
static int SetRadarAreaSize ( lua_State* luaVM );
|
// static int SetRadarAreaSize ( lua_State* luaVM );
|
||||||
static int SetRadarAreaColor ( lua_State* luaVM );
|
// static int SetRadarAreaColor ( lua_State* luaVM );
|
||||||
static int SetRadarAreaFlashing ( lua_State* luaVM );
|
// static int SetRadarAreaFlashing ( lua_State* luaVM );
|
||||||
|
|
||||||
// Explosion funcs
|
// // Explosion funcs
|
||||||
static int CreateExplosion ( lua_State* luaVM );
|
// static int CreateExplosion ( lua_State* luaVM );
|
||||||
|
|
||||||
// Fire funcs
|
// // Fire funcs
|
||||||
static int CreateFire ( lua_State* luaVM );
|
// static int CreateFire ( lua_State* luaVM );
|
||||||
|
|
||||||
// Audio funcs
|
// // Audio funcs
|
||||||
static int PlaySoundFrontEnd ( lua_State* luaVM );
|
// static int PlaySoundFrontEnd ( lua_State* luaVM );
|
||||||
static int PlayMissionAudio ( lua_State* luaVM );
|
// static int PlayMissionAudio ( lua_State* luaVM );
|
||||||
static int PreloadMissionAudio ( lua_State* luaVM );
|
// static int PreloadMissionAudio ( lua_State* luaVM );
|
||||||
|
|
||||||
// Ped body funcs?
|
// // Ped body funcs?
|
||||||
static int GetBodyPartName ( lua_State* luaVM );
|
// static int GetBodyPartName ( lua_State* luaVM );
|
||||||
static int GetClothesByTypeIndex ( lua_State* luaVM );
|
// static int GetClothesByTypeIndex ( lua_State* luaVM );
|
||||||
static int GetTypeIndexFromClothes ( lua_State* luaVM );
|
// static int GetTypeIndexFromClothes ( lua_State* luaVM );
|
||||||
static int GetClothesTypeName ( lua_State* luaVM );
|
// static int GetClothesTypeName ( lua_State* luaVM );
|
||||||
|
|
||||||
// Key bind funcs
|
// // Key bind funcs
|
||||||
static int BindKey ( lua_State* luaVM );
|
// static int BindKey ( lua_State* luaVM );
|
||||||
static int UnbindKey ( lua_State* luaVM );
|
// static int UnbindKey ( lua_State* luaVM );
|
||||||
static int IsKeyBound ( lua_State* luaVM );
|
// static int IsKeyBound ( lua_State* luaVM );
|
||||||
static int GetFunctionsBoundToKey ( lua_State* luaVM );
|
// static int GetFunctionsBoundToKey ( lua_State* luaVM );
|
||||||
static int GetKeyBoundToFunction ( lua_State* luaVM );
|
// static int GetKeyBoundToFunction ( lua_State* luaVM );
|
||||||
static int GetControlState ( lua_State* luaVM );
|
// static int GetControlState ( lua_State* luaVM );
|
||||||
static int IsControlEnabled ( lua_State* luaVM );
|
// static int IsControlEnabled ( lua_State* luaVM );
|
||||||
|
//
|
||||||
|
// static int SetControlState ( lua_State* luaVM );
|
||||||
|
// static int ToggleControl ( lua_State* luaVM );
|
||||||
|
// static int ToggleAllControls ( lua_State* luaVM );
|
||||||
|
|
||||||
static int SetControlState ( lua_State* luaVM );
|
// // Shape create funcs
|
||||||
static int ToggleControl ( lua_State* luaVM );
|
// static int CreateColCircle ( lua_State* luaVM );
|
||||||
static int ToggleAllControls ( lua_State* luaVM );
|
// static int CreateColCuboid ( lua_State* luaVM );
|
||||||
|
// static int CreateColSphere ( lua_State* luaVM );
|
||||||
|
// static int CreateColRectangle ( lua_State* luaVM );
|
||||||
|
// static int CreateColPolygon ( lua_State* luaVM );
|
||||||
|
// static int CreateColTube ( lua_State* luaVM );
|
||||||
|
|
||||||
// Shape create funcs
|
// // Team get funcs
|
||||||
static int CreateColCircle ( lua_State* luaVM );
|
// static int CreateTeam ( lua_State* luaVM );
|
||||||
static int CreateColCuboid ( lua_State* luaVM );
|
// static int GetTeamFromName ( lua_State* luaVM );
|
||||||
static int CreateColSphere ( lua_State* luaVM );
|
// static int GetTeamName ( lua_State* luaVM );
|
||||||
static int CreateColRectangle ( lua_State* luaVM );
|
// static int GetTeamColor ( lua_State* luaVM );
|
||||||
static int CreateColPolygon ( lua_State* luaVM );
|
// static int GetTeamFriendlyFire ( lua_State* luaVM );
|
||||||
static int CreateColTube ( lua_State* luaVM );
|
// static int GetPlayersInTeam ( lua_State* luaVM );
|
||||||
|
// static int CountPlayersInTeam ( lua_State* luaVM );
|
||||||
|
|
||||||
// Team get funcs
|
// // Team set funcs
|
||||||
static int CreateTeam ( lua_State* luaVM );
|
// static int SetPlayerTeam ( lua_State* luaVM );
|
||||||
static int GetTeamFromName ( lua_State* luaVM );
|
// static int SetTeamName ( lua_State* luaVM );
|
||||||
static int GetTeamName ( lua_State* luaVM );
|
// static int SetTeamColor ( lua_State* luaVM );
|
||||||
static int GetTeamColor ( lua_State* luaVM );
|
// static int SetTeamFriendlyFire ( lua_State* luaVM );
|
||||||
static int GetTeamFriendlyFire ( lua_State* luaVM );
|
|
||||||
static int GetPlayersInTeam ( lua_State* luaVM );
|
|
||||||
static int CountPlayersInTeam ( lua_State* luaVM );
|
|
||||||
|
|
||||||
// Team set funcs
|
// // Water funcs
|
||||||
static int SetPlayerTeam ( lua_State* luaVM );
|
// static int CreateWater ( lua_State* luaVM );
|
||||||
static int SetTeamName ( lua_State* luaVM );
|
// static int SetWaterLevel ( lua_State* luaVM );
|
||||||
static int SetTeamColor ( lua_State* luaVM );
|
// static int ResetWaterLevel ( lua_State* luaVM );
|
||||||
static int SetTeamFriendlyFire ( lua_State* luaVM );
|
// static int GetWaterVertexPosition ( lua_State* luaVM );
|
||||||
|
// static int SetWaterVertexPosition ( lua_State* luaVM );
|
||||||
|
// static int GetWaterColor ( lua_State* luaVM );
|
||||||
|
// static int SetWaterColor ( lua_State* luaVM );
|
||||||
|
// static int ResetWaterColor ( lua_State* luaVM );
|
||||||
|
|
||||||
// Water funcs
|
// // Weapon funcs
|
||||||
static int CreateWater ( lua_State* luaVM );
|
// static int CreateWeapon ( lua_State* luaVM );
|
||||||
static int SetWaterLevel ( lua_State* luaVM );
|
// static int GetWeaponNameFromID ( lua_State* luaVM );
|
||||||
static int ResetWaterLevel ( lua_State* luaVM );
|
// static int GetWeaponIDFromName ( lua_State* luaVM );
|
||||||
static int GetWaterVertexPosition ( lua_State* luaVM );
|
// static int FireWeapon ( lua_State* luaVM );
|
||||||
static int SetWaterVertexPosition ( lua_State* luaVM );
|
// static int SetWeaponState ( lua_State* luaVM );
|
||||||
static int GetWaterColor ( lua_State* luaVM );
|
// static int GetWeaponState ( lua_State* luaVM );
|
||||||
static int SetWaterColor ( lua_State* luaVM );
|
// static int SetWeaponTarget ( lua_State* luaVM );
|
||||||
static int ResetWaterColor ( lua_State* luaVM );
|
// static int GetWeaponTarget ( lua_State* luaVM );
|
||||||
|
// static int SetWeaponOwner ( lua_State* luaVM );
|
||||||
// Weapon funcs
|
// static int GetWeaponOwner ( lua_State* luaVM );
|
||||||
static int CreateWeapon ( lua_State* luaVM );
|
// static int SetWeaponFlags ( lua_State* luaVM );
|
||||||
static int GetWeaponNameFromID ( lua_State* luaVM );
|
// static int GetWeaponFlags ( lua_State* luaVM );
|
||||||
static int GetWeaponIDFromName ( lua_State* luaVM );
|
// static int SetWeaponFiringRate ( lua_State* luaVM );
|
||||||
static int FireWeapon ( lua_State* luaVM );
|
// static int GetWeaponFiringRate ( lua_State* luaVM );
|
||||||
static int SetWeaponState ( lua_State* luaVM );
|
// static int ResetWeaponFiringRate ( lua_State* luaVM );
|
||||||
static int GetWeaponState ( lua_State* luaVM );
|
// static int GetWeaponAmmo ( lua_State* luaVM );
|
||||||
static int SetWeaponTarget ( lua_State* luaVM );
|
// static int GetWeaponClipAmmo ( lua_State* luaVM );
|
||||||
static int GetWeaponTarget ( lua_State* luaVM );
|
// static int SetWeaponClipAmmo ( lua_State* luaVM );
|
||||||
static int SetWeaponOwner ( lua_State* luaVM );
|
|
||||||
static int GetWeaponOwner ( lua_State* luaVM );
|
|
||||||
static int SetWeaponFlags ( lua_State* luaVM );
|
|
||||||
static int GetWeaponFlags ( lua_State* luaVM );
|
|
||||||
static int SetWeaponFiringRate ( lua_State* luaVM );
|
|
||||||
static int GetWeaponFiringRate ( lua_State* luaVM );
|
|
||||||
static int ResetWeaponFiringRate ( lua_State* luaVM );
|
|
||||||
static int GetWeaponAmmo ( lua_State* luaVM );
|
|
||||||
static int GetWeaponClipAmmo ( lua_State* luaVM );
|
|
||||||
static int SetWeaponClipAmmo ( lua_State* luaVM );
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue
Block a user