NotEmoji
Well-Known Member
- Messages
- 6
- Reaction score
- 2
- Points
- 203
Hello i have been working on a gta menu on the bigbase i have ran into a small problem with a native that i cant get or understand why its doing this
when making a function with the native
GET_PED_LAST_WEAPON_IMPACT_COORD
when calling it in for like teleport gun the cords always end up as 0, 0 ,0 i have looked around and cant seem to find a fix
but it happens with all impact cord options
this is the code im using for teleport gun
bool teleportGunBool = false;
void teleportGun(){
Ped Player = PLAYER:LAYER_PED_ID();
if (PED::IS_PED_SHOOTING(Player))
{
Vector3 Coords;
if (WEAPON::GET_PED_LAST_WEAPON_IMPACT_COORD(Player, &Coords))
ENTITY::SET_ENTITY_COORDS(Player, Coords.x, Coords.y, Coords.z, 0, 0, 0, 0);
}
}
this is what the vector3 looks like
struct Vector3
{
float x{};
float y{};
float z{};
}
and
struct Vector3
{
float x;
DWORD _paddingx;
float y;
DWORD _paddingy;
float z;
DWORD _paddingz;
} this one didnt work but i wasnt expecting it to
when making a function with the native
GET_PED_LAST_WEAPON_IMPACT_COORD
when calling it in for like teleport gun the cords always end up as 0, 0 ,0 i have looked around and cant seem to find a fix
but it happens with all impact cord options
this is the code im using for teleport gun
bool teleportGunBool = false;
void teleportGun(){
Ped Player = PLAYER:LAYER_PED_ID();
if (PED::IS_PED_SHOOTING(Player))
{
Vector3 Coords;
if (WEAPON::GET_PED_LAST_WEAPON_IMPACT_COORD(Player, &Coords))
ENTITY::SET_ENTITY_COORDS(Player, Coords.x, Coords.y, Coords.z, 0, 0, 0, 0);
}
}
this is what the vector3 looks like
struct Vector3
{
float x{};
float y{};
float z{};
}
and
struct Vector3
{
float x;
DWORD _paddingx;
float y;
DWORD _paddingy;
float z;
DWORD _paddingz;
} this one didnt work but i wasnt expecting it to