GetPointInFrontOfCamera2D(playerid,&Float:tx,&Float:ty,Float:radius);
MovePointCol(Float:StartX,Float:StartY,Float:StartZ,Float:EndX,Float:EndY,Float:EndZ,&Float:x,&Float:y,&Float:z);
GetPointInFront3DCol(Float:x,Float:y,Float:z,Float:rx,Float:rz,Float:radius,&Float:tx,&Float:ty,&Float:tz);
Float:GetPointInFrontOfPlayerCol(playerid,&Float:tx,&Float:ty,Float:radius);
Float:GetPointInFrontOfCamera2DCol(playerid,&Float:tx,&Float:ty,Float:radius);
GetPointInFrontOfCamera3DCol(playerid,&Float:tx,&Float:ty,&Float:tz,Float:radius,&Float:rx=0.0,&Float:rz=0.0);
Float:GetPointInFrontOfVehicle2DCol(vehicleid,&Float:tx,&Float:ty,Float:radius);
GetPointInFrontOfVehicle3DCol(vehicleid,&Float:tx,&Float:ty,&Float:tz,Float:radius,&Float:rx=0.0,&Float:rz=0.0);
Comp - Compress, limits the range of values of rotation to <0.0:360). Frequently used internally.
|
Get3DTrygPrecision(); //returns a string with the name of precision
Tryg3DMapAndreasFindZ(Float:x,Float:y,&Float:z); //-> CA_FindZ_For2DCoord / MapAndreasFindZ / MapAndreas_FindZ_For2DCoord
Float:CalculatePercent(Float:value,Float:maxvalue);
//future
GetColAndreasVersion();
GetValidColAndreasVersion();
bool:IsValidColAndreas(version);
GetColAndreasVersionName(name[], value = GET_COLANDREAS_VERSION, maxdest = sizeof name);
CheckColAndreasVersion();
GetPlayerCollisionFlags(playerid);
bool:IsCollisionFlag(value,flag);
Float:UndergroundFindZ(Float:x,Float:y,&Float:z=0.0);
Float:InteriorFindZ(Float:px,Float:py,Float:pz=1000.0,Float:size=2.0,&Float:z=0.0);
bool:IsPointInWater(Float:x,Float:y,Float:z=0.0);
bool:IsPointInUnderwater(Float:x,Float:y,Float:z);
bool:IsPointInAir(Float:x,Float:y,Float:z,bool:interior=false,Float:max_distance=2.2);
bool:IsPointInGround(Float:x,Float:y,Float:z,bool:interior=false,Float:max_distance=2.2);
bool:IsPointInUnderground(Float:x,Float:y,Float:z);
POSITION_FLAG_WORLD
POSITION_FLAG_INTERIOR
POSITION_FLAG_AIR
POSITION_FLAG_GROUND
POSITION_FLAG_UNDERGROUND
POSITION_FLAG_WATER
POSITION_FLAG_UNDERWATER
CMD:getz(playerid){
new Float:x,Float:y,Float:z, buffer[128], Float:tmpz;
GetPlayerPos(playerid,x,y,z);
SendClientMessage(playerid,0xFFFFFFFF," ");
format(buffer,sizeof buffer,"Player Z: {00FF00}%.4f",z);
SendClientMessage(playerid,0xFFFFFFFF,buffer);
CA_FindZ_For2DCoord(x,y,tmpz);
format(buffer,sizeof buffer,"CA_FindZ_For2DCoord: {00FF00}%.4f",tmpz);
SendClientMessage(playerid,0xFFFFFFFF,buffer);
UndergroundFindZ(x,y,tmpz);
format(buffer,sizeof buffer,"Underground: {00FF00}%.4f",tmpz);
SendClientMessage(playerid,0xFFFFFFFF,buffer);
InteriorFindZ(x,y,z,2.0,tmpz);
format(buffer,sizeof buffer,"Interior: {00FF00}%.4f",tmpz);
SendClientMessage(playerid,0xFFFFFFFF,buffer);
new flag = GetPlayerCollisionFlags(playerid);
if(IsCollisionFlag(flag,POSITION_FLAG_UNDERWATER)){
format(buffer,sizeof buffer,"Player under water");
} else if(IsCollisionFlag(flag,POSITION_FLAG_WATER)){
format(buffer,sizeof buffer,"Player in water");
} else if(IsCollisionFlag(flag,POSITION_FLAG_AIR)){
format(buffer,sizeof buffer,"Player in air");
} else if(IsCollisionFlag(flag,POSITION_FLAG_UNDERGROUND)){
format(buffer,sizeof buffer,"Player underground");
} else if(IsCollisionFlag(flag,POSITION_FLAG_GROUND)){
format(buffer,sizeof buffer,"Player on ground");
}
if(IsCollisionFlag(flag,POSITION_FLAG_WORLD)){
format(buffer,sizeof buffer,"%s (World)",buffer);
} else if(IsCollisionFlag(flag,POSITION_FLAG_INTERIOR)){
format(buffer,sizeof buffer,"%s (Interior)",buffer);
}
SendClientMessage(playerid,0xFFFFFFFF,buffer);
if(IsPointInWater(x,y)){
SendClientMessage(playerid,0xFFFFFFFF,"This XY point on Water");
} else {
SendClientMessage(playerid,0xFFFFFFFF,"This XY point on Ground");
}
return 1;
}
bool:IsPointInWaterFrontOfPlayer(playerid,Float:radius);
bool:IsPointInGround(Float:x,Float:y,Float:z,bool:interior=false,Float:max_distance=2.2);
bool:IsPointInCircle(Float:px,Float:py,Float:x,Float:y,Float:size)
bool:IsPointInSphere(Float:px,Float:py,Float:pz,Float:x,Float:y,Float:z,Float:size);
bool:IsPointInRectangle(Float:x,Float:y,Float:minx,Float:miny,Float:maxx,Float:maxy);
bool:IsPointInCube(Float:x,Float:y,Float:z,Float:minx,Float:miny,Float:minz,Float:maxx,Float:maxy,Float:maxz);
bool:IsPointInPolygon(Float:x,Float:y,{Float,_}:...); //Polygon Test by RyDeR SRC:https://sampforum.blast.hk/showthread.php?pid=1154971#pid1154971
bool:IsPointInCylinder(Float:px,Float:py,Float:pz,Float:xA,Float:yA,Float:zA,Float:xB,Float:yB,Float:zB,Float:size);
MovePointColCutLine(Float:SX,Float:SY,Float:SZ,Float:EX,Float:EY,Float:EZ,&Float:x,&Float:y,&Float:z,Float:cut_size=0.0);
MovePointColCutLineEx(Float:SX,Float:SY,Float:SZ,Float:EX,Float:EY,Float:EZ,&Float:x,&Float:y,&Float:z,Float:cut_size=0.0); //for EngineV6
FLOAT_PI - pi constant value
Float:GetVehicleSpeed(vehicleid);
Float:GetPlayerSpeed(playerid);
Get3DTrygModules(&modules_count=0); //previous version: Get3DTrygPrecision();
CreateDynamicExplosion(Float:x,Float:y,Float:z,type,Float:radius,worldid=-1,interiorid=-1,playerid=-1,Float:distance=200.0);
Float:GetPlayerHydraReactorRX(playerid);
GetPlayerRotation(playerid,&Float:rx,&Float:ry,&Float:rz);
GetPlayerTimeline(playerid);
SetPlayerTimeline(playerid,timeline);
GetPlayerPos4D(playerid,&Float:x,&Float:y,&Float:z,&timeline);
SetPlayerPos4D(playerid,Float:x,Float:y,Float:z,timeline=0);
UpdatePlayerTimeline(playerid);
//from:
bool:IsPointInPolygon(Float:x,Float:y,{Float,_}:...);
//to:
bool:IsPointInPolygon(Float:x,Float:y,Float:points[],maxpoints = sizeof(points));
Get3DTrygPrecision();
GetVehicleRotation(vehicleid,&Float:rx,&Float:ry,&Float:rz);
CountPlayers(bool:isplayer=true,bool:isnpc=true);
bool:IsPlayerInPolygon(playerid,Float:points[],maxpoints = sizeof(points));
bool:IsNPCInCircle(npcid,Float:x,Float:y,Float:radius);
bool:IsNPCInCylinder(npcid,Float:xA,Float:yA,Float:zA,Float:xB,Float:yB,Float:zB,Float:radius);
bool:IsNPCInCylinderEx(npcid,Float:x,Float:y,Float:minz,Float:maxz,Float:radius);
bool:IsNPCInSphere(npcid,Float:x,Float:y,Float:z,Float:radius);
bool:IsNPCInRectangle(npcid,Float:minx,Float:miny,Float:maxx,Float:maxy);
bool:IsNPCInCube(npcid,Float:minx,Float:miny,Float:minz,Float:maxx,Float:maxy,Float:maxz);
bool:IsNPCInPolygon(npcid,Float:points[],maxpoints = sizeof(points));
Float:GetPointInFrontOfNPC(npcid,&Float:tx,&Float:ty,Float:radius);
GetNPCOrientationPos(npcid,element_orientation:orientation,Float:distance,&Float:tx,&Float:ty,&Float:tz);
Float:GetNPCDistanceFromPoint(npcid,Float:x,Float:y,Float:z);
bool:IsNPCInRangeOfPoint(npcid,Float:range,Float:x,Float:y,Float:z);
Float:GetDistanceBetweenNPCs(npcid_a,npcid_b);
Float:GetNPCSpeed(npcid);
Float:GetNPCTargetAngle(npcid,Float:x,Float:y,&Float:rz=0.0);
Float:SetNPCTargetAngle(npcid,Float:x,Float:y,&Float:rz=0.0);
Float:GetNPCTargetNPCAngle(npcid,targetid,&Float:rz=0.0);
Float:SetNPCTargetNPCAngle(npcid,targetid,&Float:rz=0.0);
Float:GetNPCActorDistance(npcid,actorid);
Float:GetNPCVehicleDistance(npcid,vehicleid);
Float:GetNPCObjectDistance(npcid,objectid);
bool:GetNPCToPointVector(npcid,Float:tx,Float:ty,Float:tz,&Float:vx,&Float:vy,&Float:vz);
GetNPCRotatedVector(npcid,Float:tx,Float:ty,Float:tz,&Float:vx,&Float:vy,&Float:vz,bool:return_vector=true,Float:rx=0.0,Float:ry=0.0,Float:rz=0.0);
Float:GetPointInFrontOfNPCCol(npcid,&Float:tx,&Float:ty,Float:radius);
GetNPCCollisionFlags(npcid);
bool:IsBetweenNPCsIsWall(npcid,targetid);
bool:IsBetweenNPCToPointIsWall(npcid,Float:x,Float:y,Float:z);
GetNPCOrientationPosCol(npcid,element_orientation:orientation,Float:distance,&Float:tx,&Float:ty,&Float:tz);
bool:IsPointInWaterFrontOfNPC(npcid,Float:radius);
Float:GetNPCDynamicObjectDistance(npcid,objectid);
bool:IsVehicleInRangeOfPoint(vehicleid,Float:range,Float:x,Float:y,Float:z);
bool:IsActorInRangeOfPoint(actorid,Float:range,Float:x,Float:y,Float:z);
bool:IsObjectInRangeOfPoint(objectid,Float:range,Float:x,Float:y,Float:z);
Float:GetObjectDistanceFromPoint(objectid,Float:x,Float:y,Float:z);
Float:GetDynamicObjectDistFromPoint(objectid,Float:x,Float:y,Float:z);
bool:IsDynamicObjectInRangeOfPoint(objectid,Float:range,Float:x,Float:y,Float:z);
FCNPC_SetVehicleRotation(npcid,Float:rx,Float:ry,Float:rz);
bool:FCNPC_SetVehicleTargetRotation(npcid,Float:tx,Float:ty,Float:tz,Float:ry=0.0);
FCNPC_GoToCol(npcid,Float:x,Float:y,Float:z,type = MOVE_TYPE_AUTO,Float:speed = MOVE_SPEED_AUTO,bool:UseMapAndreas = false,Float:cut_size = 0.0,bool:setangle = true);
FCNPC_GoToPlayerCol(npcid,playerid,type = MOVE_TYPE_AUTO,Float:speed = MOVE_SPEED_AUTO,bool:UseMapAndreas = false,Float:cut_size = 0.0,bool:setangle = true);
FCNPC_SetVehicleTargetRotation(npcid,Float:x,Float:y,Float:z);
FCNPC_GoTo(npcid,Float:x,Float:y,Float:z,MOVE_TYPE_DRIVE,1.0,false,0.0,false);
bool:IsPlayerOnPlayerScreen(playerid,targetid);
Yes
Update v2.9.3: - Added ColAndreas Function: PHP код:
https://www.youtube.com/watch?v=ih9P_Cwkz68 |
bool:IsPlayerOnPlayerScreen(playerid,targetid,Float:rx=INVALID_ROTATION,Float:rz=INVALID_ROTATION,Float:vertical=VERTICAL_CAMERA_RADIUS,Float:horizontal=HORIZONTAL_CAMERA_RADIUS);
bool:IsPlayerOnFakeScreen(Float:x,Float:y,Float:z,targetid,Float:rx,Float:rz,Float:vertical=VERTICAL_CAMERA_RADIUS,Float:horizontal=HORIZONTAL_CAMERA_RADIUS);
VERTICAL_CAMERA_RADIUS
HORIZONTAL_CAMERA_RADIUS