Some Doubts - Native Trainer
I have some problems here and I hope someone can help me with some of them... Thank you !
Question 01:
The code are right:
Code:
if (getOption() == 2)
{
Vector3 coords = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED(selectedPlayer), 0);
GAMEPLAY::SHOOT_SINGLE_BULLET_BETWEEN_COORDS(coords.x + 5, coords.y + 5, coords.z + 5, coords.x, coords.y, coords.z, 100, 1, GAMEPLAY::GET_HASH_KEY("WEAPON_GRENADE"), PLAYER::PLAYER_PED_ID(), 1, 1, 100);
}
But Im trying to get the sniper shot to hit the target but the shot is not firing: ( if I change the coordinates to shoot close, it works normally )
Code:
if (getOption() == 6)
{
Vector3 coords = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED(selectedPlayer), 0);
GAMEPLAY::SHOOT_SINGLE_BULLET_BETWEEN_COORDS(coords.x, coords.y, coords.z, coords.x, coords.y, coords.z, 100, 1, GAMEPLAY::GET_HASH_KEY("WEAPON_ADVANCEDRIFLE"), PLAYER::PLAYER_PED_ID(), 1, 1, 100);
}
Does anyone have an idea?
===============
Question 02:
Why is not it working? ( works only on me )
Code:
else if (getOption() == 5)
{
if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::GET_PLAYER_PED(selectedPlayer), true))
{
int vehicle = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED(selectedPlayer), false);
NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle);
if (NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(vehicle))
{
ENTITY::SET_ENTITY_COORDS(vehicle, -1991.348, 3200.953, 32.39795, 1, 0, 0, 1);
drawNotification("Teleported to: ~b~Hangar~w~.");
}
}
}
===============
Question 03:
What is wrong with the code?
Code:
Vector3 tpcar;
void toNearestCar()
{
int VehID = VEHICLE::GET_CLOSEST_VEHICLE(tpcar.x, tpcar.y, tpcar.z, 100, 0, 70);
PED::SET_PED_INTO_VEHICLE(PLAYER::PLAYER_PED_ID(), VehID, -1);
}
Any attempt to help is welcome.