Quantcast

Jump to content

» «
Photo

[III/VC] Vehicle name string from GXT

1 reply to this topic
Inadequate
  • Inadequate

    Midnight Emulator

  • Members
  • Joined: 11 Apr 2012
  • None

#1

Posted 2 days ago

Is there a way to get the vehicle name string from GXT file in GTA III and Vice City in CLEO way? Such as 0ADB opcode in San Andreas but 0ADB doesn't exists in those games, sadly. So, maybe reading some memory address or something? Any help is appreciated.


Jack
  • Jack

    MODEL_SWAT

  • Feroci
  • Joined: 06 Dec 2011
  • Serbia

#2

Posted 2 days ago Edited by Jack, 2 days ago.

Is there a way to get the vehicle name string from GXT file in GTA III and Vice City in CLEO way? Such as 0ADB opcode in San Andreas but 0ADB doesn't exists in those games, sadly. So, maybe reading some memory address or something? Any help is appreciated.

I don't know but the plugin-sdk does:

#include "plugin.h"
#include "common.h"
#include "CHud.h"
#include "CModelInfo.h"
#include "CVehicle.h"
#include "CVehicleModelInfo.h"

using namespace plugin;

class gameName {
public:
    gameName() {
        Events::gameProcessEvent += [] {
            CVehicle *veh = FindPlayerVehicle();
            if (veh) {
                CVehicleModelInfo *vehModel = reinterpret_cast<CVehicleModelInfo *>(CModelInfo::ms_modelInfoPtrs[veh->m_nModelIndex]);
                CHud::SetHelpMessage(vehModel->m_szGameName, true, true, true);
            }
        };
    }
} _gameName;

CI5lkgN.jpg

  • Sloth- likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users