Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BOOL hit; Vector3 endCoords; Vector3 surfaceNormal; Entity entityHandle = 0;
- while(true)
- {
- Vector3 camCoords = CAM::GET_GAMEPLAY_CAM_COORD();
- Vector3 rot = CAM::GET_GAMEPLAY_CAM_ROT(2);
- Vector3 farCoords;
- farCoords.x = camCoords.x + rotToDir(rot).x * 5000;
- farCoords.y = camCoords.y + rotToDir(rot).y * 5000;
- farCoords.z = camCoords.z + rotToDir(rot).z * 5000;
- int ray = WORLDPROBE::_CAST_RAY_POINT_TO_POINT(camCoords.x, camCoords.y, camCoords.z, farCoords.x, farCoords.y, farCoords.z, -1, 0, 7);
- WORLDPROBE::_GET_RAYCAST_RESULT(ray, &hit, &endCoords, &surfaceNormal, &entityHandle);
- if (hit && (ENTITY::DOES_ENTITY_EXIST(entityHandle)))
- {
- if (ENTITY::IS_ENTITY_A_VEHICLE(entityHandle))
- set_status_text("veh");
- else if (ENTITY::IS_ENTITY_A_PED(entityHandle))
- set_status_text("ped");
- else if (ENTITY::IS_ENTITY_AN_OBJECT(entityHandle))
- set_status_text("obj");
- }
- update_status_text();
- WAIT(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement