[III | VC] Fix previous commit
This commit is contained in:
parent
0d9314b8ce
commit
ab571e22a9
@ -307,9 +307,9 @@ void WarpPlayerIntoVehicle(CVehicle *pVeh, int seatId)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
void Vehicle::SpawnVehicle(std::string& smodel)
|
void Vehicle::SpawnVehicle(const std::string& smodel)
|
||||||
#else
|
#else
|
||||||
void Vehicle::SpawnVehicle(std::string& rootkey, std::string& vehName, std::string& smodel)
|
void Vehicle::SpawnVehicle(const std::string& rootkey, const std::string& vehName, const std::string& smodel)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
CPlayerPed* player = FindPlayerPed();
|
CPlayerPed* player = FindPlayerPed();
|
||||||
@ -1000,10 +1000,12 @@ void Vehicle::ShowPage()
|
|||||||
|
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
|
|
||||||
|
int width = ImGui::GetWindowContentRegionWidth() - ImGui::GetStyle().ItemSpacing.x;
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
int width = (ImGui::GetWindowContentRegionWidth() - ImGui::GetStyle().ItemSpacing.x)/2;
|
width /= 2;
|
||||||
ImGui::SetNextItemWidth(width);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
ImGui::SetNextItemWidth(width);
|
||||||
static char smodel[8];
|
static char smodel[8];
|
||||||
if (ImGui::InputTextWithHint("##SpawnID", TEXT("Vehicle.IDSpawnText"), smodel, 8, ImGuiInputTextFlags_EnterReturnsTrue))
|
if (ImGui::InputTextWithHint("##SpawnID", TEXT("Vehicle.IDSpawnText"), smodel, 8, ImGuiInputTextFlags_EnterReturnsTrue))
|
||||||
{
|
{
|
||||||
@ -1013,7 +1015,11 @@ void Vehicle::ShowPage()
|
|||||||
if (CModelInfo::IsCarModel(model))
|
if (CModelInfo::IsCarModel(model))
|
||||||
{
|
{
|
||||||
std::string str = std::string(smodel);
|
std::string str = std::string(smodel);
|
||||||
|
#ifdef GTASA
|
||||||
SpawnVehicle(str);
|
SpawnVehicle(str);
|
||||||
|
#else
|
||||||
|
SpawnVehicle("", "", str);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -94,9 +94,9 @@ public:
|
|||||||
Vehicle(const Vehicle&) = delete;
|
Vehicle(const Vehicle&) = delete;
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
static void SpawnVehicle(std::string& name);
|
static void SpawnVehicle(const std::string& name);
|
||||||
#else
|
#else
|
||||||
static void SpawnVehicle(std::string& rootkey, std::string& vehName, std::string& model);
|
static void SpawnVehicle(const std::string& rootkey, const std::string& vehName, const std::string& model);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void Init();
|
static void Init();
|
||||||
|
Loading…
Reference in New Issue
Block a user