fix(persist_car): fix spawning (#1122)
This commit is contained in:
parent
ddaee3f069
commit
d12c7fe69c
@ -68,28 +68,18 @@ namespace big
|
|||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|
||||||
components::button("SAVE_VEHICLE"_T, []
|
components::button("SAVE_VEHICLE"_T, [] {
|
||||||
{
|
if (!self::veh)
|
||||||
if (PED::GET_VEHICLE_PED_IS_IN(self::ped, false) == 0)
|
return g_notification_service->push_warning("PERSIST_CAR"_T.data(), "You must be in a vehicle. Please enter a vehicle before using load.");
|
||||||
{
|
|
||||||
g_notification_service->push_warning("PERSIST_CAR"_T.data(), "You must be in a vehicle. Please enter a vehicle before using load.");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
save_vehicle(vehicle_file_name_input);
|
save_vehicle(vehicle_file_name_input);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
components::button("LOAD_VEHICLE"_T, []
|
components::button("LOAD_VEHICLE"_T, [] {
|
||||||
{
|
if (self::veh)
|
||||||
if (PED::GET_VEHICLE_PED_IS_IN(self::ped, false) != 0)
|
return g_notification_service->push_warning("PERSIST_CAR"_T.data(), "You must not be in a vehicle. Please exit your vehicle before using load.");
|
||||||
{
|
|
||||||
g_notification_service->push_warning("PERSIST_CAR"_T.data(), "You must not be in a vehicle. Please exit your vehicle before using load.");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
load_vehicle(selected_vehicle_file);
|
load_vehicle(selected_vehicle_file);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
|
Reference in New Issue
Block a user