21.10.2009, 21:49
Код:
if(strcmp(cmd, "/position", true) == 0 || strcmp(cmd, "/pos", true) == 0)
{
new Float:px,Float:py,Float:pz,Float:pa,pi,pw;
GetPlayerPos(playerid,px,py,pz);
GetPlayerFacingAngle(playerid,pa);
pi = GetPlayerInterior(playerid);
pw = GetPlayerVirtualWorld(playerid);
if(PlayerInfo[playerid][pLanguage] == 0)
{
format(string, sizeof(string), "Position: %.4f,%.4f,%.4f %.4f | INT: %d | VirtualWorld %d", px,py,pz,pa,pi,pw);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string, sizeof(string), "TG-: %.4f | TG: %.4f", atan(360-pa),atan(pa));
SendClientMessage(playerid,COLOR_YELLOW,string);
}
if(PlayerInfo[playerid][pLanguage] == 1)
{
format(string, sizeof(string), "Pozнciуd: %.4f,%.4f,%.4f %.4f | INT: %d | Virtuбlis Vilбg %d", px,py,pz,pa,pi,pw);
SendClientMessage(playerid,COLOR_YELLOW,string);
new Float:tng = asin(pa)/acos(pa);
format(string, sizeof(string), "TG-: %.4f | TG: %.4f | TG: %.4f | Sin: %.4f | Cos: %.4f | Tan2: %.4f", atan(360-pa),atan(pa),tng,asin(pa),acos(pa),atan2(px,py));
SendClientMessage(playerid,COLOR_YELLOW,string);
}
return 1;
}
and the atan is working? myrot is 55 and the atan is 88.9583 and the tan ( in calculator ) is 1.42...
atan2 is working well

pls check these functions...

