Example #1
0
int SendPlayerMessageToAll(int * VM)
{
	GET_SCRIPT_VM_SAFE;

	pVM->ResetStackIndex();

	CString sMessage;
	pVM->Pop(sMessage);

	int iColor;
	pVM->Pop(iColor);

	bool bAllowFormatting;
	pVM->Pop(bAllowFormatting);

	RakNet::BitStream bitStream;
	bitStream.Write(RakNet::RakString(sMessage.C_String()));
	bitStream.Write((DWORD)iColor);
	bitStream.Write(bAllowFormatting);
	CServer::GetInstance()->GetNetworkModule()->Call(GET_RPC_CODEX(RPC_PLAYER_MESSAGE_TO_ALL), &bitStream, HIGH_PRIORITY, RELIABLE_ORDERED, -1, true);

	pVM->Push(true);

	return 1;
}
void*
CSimplisticPluginLoadLogic::LoadPlugin( const CString& rootDir        ,
                                        const CString& moduleName     ,
                                        const CString& groupName      ,
                                        const TVersion* pluginVersion )
{GUCEF_TRACE;

    CString fullPluginPath = CombinePath( rootDir, moduleName );
    fullPluginPath = RelativePath( fullPluginPath );
    return LoadModuleDynamicly( fullPluginPath.C_String() );
}
bool
CDStoreCodecPlugin::StoreDataTree( const CDataNode* tree   ,
                                   const CString& filename )
{GUCEF_TRACE;

    Create_Path_Directories( filename.C_String() );
    
    CFileAccess access( filename, "wb" );
    if ( access.IsValid() )
    {
        return StoreDataTree( tree     ,
                              &access  );
    }
    return false;
}