2021-01-15 23:27:31 +01:00
|
|
|
#include "gui/tab_bar.hpp"
|
2020-12-26 17:52:20 +01:00
|
|
|
#include "pointers.hpp"
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
static char model[64];
|
|
|
|
|
|
|
|
void tabbar::render_spawn()
|
|
|
|
{
|
|
|
|
if (ImGui::BeginTabItem("Spawn"))
|
|
|
|
{
|
2021-01-13 15:35:46 +01:00
|
|
|
if (
|
|
|
|
ImGui::InputText("Model Name", model, sizeof(model), ImGuiInputTextFlags_EnterReturnsTrue) ||
|
|
|
|
ImGui::Button("Spawn")
|
|
|
|
)
|
2020-12-26 17:52:20 +01:00
|
|
|
{
|
|
|
|
QUEUE_JOB_BEGIN_CLAUSE(= )
|
|
|
|
{
|
2021-01-14 21:59:44 +01:00
|
|
|
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
|
|
|
Vector3 location = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, .0, 8.0, .5);
|
2020-12-26 17:52:20 +01:00
|
|
|
|
2021-01-14 21:59:44 +01:00
|
|
|
features::functions::spawn_vehicle((const char*)model, location, ENTITY::GET_ENTITY_HEADING(player) + 90.f);
|
2020-12-26 17:52:20 +01:00
|
|
|
}QUEUE_JOB_END_CLAUSE
|
|
|
|
}
|
|
|
|
|
|
|
|
ImGui::EndTabItem();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|