ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 1382

Fix remove object

by carlos_20 - 04-16-2020 - 07:32 PM
#1
Online does not erase the objects why?


if (quitarobjetos) {
Vector3 coords = GET_ENTITY_COORDS(PLAYER_PED_ID(), 1);
if (obj_count > sizeof(Props) / sizeof(Props[0])) { obj_count = 0; }
Object obj = OBJECT::GET_CLOSEST_OBJECT_OF_TYPE(coords.x, coords.y, coords.z, 3.0f, Props[obj_count], 0, 1, 1);
char* playernamefromentity2 = PLAYER::GET_PLAYER_NAME(NETWORK::_0x40DBF464(NETWORK::NET_TO_PED(NETWORK::NETWORK_GET_NETWORK_ID_FROM_ENTITY(obj))));//Grabs Attackers Name From Entity(Ped) - NET_TO_PED
if (ENTITY::DOES_ENTITY_EXIST(obj) && ENTITY::IS_ENTITY_ATTACHED(obj))
{
if (NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(obj) && NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(obj))
{

if (ENTITY::IS_ENTITY_ATTACHED_TO_ENTITY(obj, PLAYER_PED_ID())) {
ENTITY::DETACH_ENTITY(obj, 1, 1);
ENTITY::SET_ENTITY_COORDS_NO_OFFSET(obj, 0, 0, 0, 0, 0, 0);
ENTITY::SET_ENTITY_AS_MISSION_ENTITY(obj, 0, 1);
ENTITY::DELETE_ENTITY(&obj);
}
}
}

obj_count++;
}
Reply
#2
(04-16-2020 - 07:32 PM)carlos_20 Wrote: Online does not erase the objects why?


if (quitarobjetos) {
Vector3 coords = GET_ENTITY_COORDS(PLAYER_PED_ID(), 1);
if (obj_count > sizeof(Props) / sizeof(Props[0])) { obj_count = 0; }
Object obj = OBJECT::GET_CLOSEST_OBJECT_OF_TYPE(coords.x, coords.y, coords.z, 3.0f, Props[obj_count], 0, 1, 1);
char* playernamefromentity2 = PLAYER::GET_PLAYER_NAME(NETWORK::_0x40DBF464(NETWORK::NET_TO_PED(NETWORK::NETWORK_GET_NETWORK_ID_FROM_ENTITY(obj))));//Grabs Attackers Name From Entity(Ped) - NET_TO_PED
if (ENTITY::DOES_ENTITY_EXIST(obj) && ENTITY::IS_ENTITY_ATTACHED(obj))
{
if (NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(obj) && NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(obj))
{

if (ENTITY::IS_ENTITY_ATTACHED_TO_ENTITY(obj, PLAYER_PED_ID())) {
ENTITY::DETACH_ENTITY(obj, 1, 1);
ENTITY::SET_ENTITY_COORDS_NO_OFFSET(obj, 0, 0, 0, 0, 0, 0);
ENTITY::SET_ENTITY_AS_MISSION_ENTITY(obj, 0, 1);
ENTITY::DELETE_ENTITY(&obj);
}
}
}

obj_count++;
}
Where I see This Code??
Disc = 0xemiil
Reply

Users browsing: 1 Guest(s)