mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-03 16:13:36 +08:00
refactor(StealVehicleGun): Wait for player to get kicked from vehicle
This commit is contained in:
parent
adcee2f487
commit
9964944eb4
@ -28,8 +28,13 @@ namespace big
|
||||
{
|
||||
if (ENTITY::IS_ENTITY_A_VEHICLE(ent))
|
||||
{
|
||||
Ped ped = VEHICLE::GET_PED_IN_VEHICLE_SEAT(ent, -1, 0);
|
||||
TASK::CLEAR_PED_TASKS_IMMEDIATELY(ped);
|
||||
for (size_t i = 0; i < 8 && !VEHICLE::IS_VEHICLE_SEAT_FREE(ent, -1, 0); i++)
|
||||
{
|
||||
Ped ped = VEHICLE::GET_PED_IN_VEHICLE_SEAT(ent, -1, 0);
|
||||
TASK::CLEAR_PED_TASKS_IMMEDIATELY(ped);
|
||||
|
||||
script::get_current()->yield();
|
||||
}
|
||||
|
||||
PED::SET_PED_INTO_VEHICLE(PLAYER::PLAYER_PED_ID(), ent, -1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user