2021-05-05, 07:52 PM
Update v5.1.0:
- Renamed bad YSIFOREACH detection to standalone foreach detection
- Added YSI Foreach detection (applying for every script using 3DTryg)
- Added universal function:
- Added CatchItems functions (available only after #define ENABLE_3D_TRYG_CATCH_ITEMS before include 3DTryg):
- Example CatchItems using:
- Updated loading logs example:
- Renamed bad YSIFOREACH detection to standalone foreach detection
- Added YSI Foreach detection (applying for every script using 3DTryg)
- Added universal function:
Code:
Item::GetInterior(TRYG3D_ELEMENT_TAG:elementid,Item3D_Type:element_type);
- Added CatchItems functions (available only after #define ENABLE_3D_TRYG_CATCH_ITEMS before include 3DTryg):
Code:
CatchItems::Circle(Float:x,Float:y,Float:radius,Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::Cylinder2D(Float:x,Float:y,Float:minz,Float:maxz,Float:radius,Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::Cylinder3D(Float:xA,Float:yA,Float:zA,Float:xB,Float:yB,Float:zB,Float:radius,Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::Sphere(Float:x,Float:y,Float:z,Float:radius,Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::Rectangle(Float:minx,Float:miny,Float:maxx,Float:maxy,Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::StreamCube(Float:minx,Float:miny,Float:minz,Float:maxx,Float:maxy,Float:maxz,Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::Polygon(const Float:points[],Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list),maxpoints = sizeof(points));
CatchItems::CircularSector(Float:x,Float:y,Float:rz,Float:radius,Float:view_angle,Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::SphericalSector(Float:x,Float:y,Float:z,Float:rx,Float:rz,Float:radius,Float:vrx,Float:vrz,Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::Cone2D(Float:x,Float:y,Float:minz,Float:maxz,Float:radius_a,Float:radius_b,Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::Cone3D(Float:xA,Float:yA,Float:zA,Float:xB,Float:yB,Float:zB,Float:pointA_radius,Float:pointB_radius,Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::Cube3D(Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz,Float:size_x,Float:size_y,Float:size_z,Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::Ellipse(Float:cx,Float:cy,Float:size_x,Float:size_y,Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::EllipticalCylinder2D(Float:cx,Float:cy,Float:minz,Float:maxz,Float:size_x,Float:size_y,Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::SphericalSectorEx(Float:x,Float:y,Float:z,Float:rx,Float:rz,Float:radius,Float:vrx,Float:vrz,bool:testLOS,bool:veh_col,Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::PointInStream(Float:x,Float:y,Float:z,const Stream:AreaData[Stream3D]);
CatchItems::InStream(TRYG3D_ELEMENT_TAG:elementid,Item3D_Type:element_type,const Stream:AreaData[Stream3D],worldid = -1,interiorid = -1);
CatchItems::GetInStream(const Stream:AreaData[Stream3D],Item3D_Type:element_type,element_list[],worldid = -1,interiorid = -1,max_element=sizeof(element_list));
CatchItems::GetStreamType(Stream:data);
CatchItems::IsValidStream(Stream:data);
- Example CatchItems using:
Code:
new Float:zones_points_0[] = {
10.0,36.0,20.0,67.0,81.0,29.0,73.0,-45.0,10.0,36.0
};
new element_list[250], item_count;
item_count = CatchItems::Polygon(zones_points_0,item_player,element_list,-1,-1,sizeof(element_list),sizeof(zones_points_0));
for(new i = 0; i < item_count; i){
SendClientMessage(element_list[i],0xFFFFFFFF,"Deatch has found you");
SetPlayerHealth(element_list[i],0.0);
}
item_count = CatchItems::Polygon(zones_points_0,item_dynamic_object,element_list,-1,-1,sizeof(element_list),sizeof(zones_points_0));
for(new i = 0; i < item_count; i){
DestroyDynamicObject(STREAMER_TAG_OBJECT:element_list[i]);
}
- Updated loading logs example:
Code:
[ADM] Info: Load 3DTryg v5.1.0 for SA:MP 0.3 DL by Abyss Morgan
[ADM] Info: Load 3DTryg Modules: ColAndreas v1.4.0, Streamer v2.9.4, Actor, VehicleCollision, Draw3D, CatchItems