Trigonometric functions- get angle from player to point.
#7

Quote:
Originally Posted by robhol
I still need this and an answer would be very nice.. anyone?
OK, wth is trignonometry? Lol, me forget. Mabey something like this, or mabey it has fuck all to do with it :

pawn Код:
if(!strcmp(cmdtext, "/ppos", true)) {
    new id; // this is the variable for the second person
    new Float:idang, Float:playeridang;
    GetPlayerFacingAngle(playerid,playeridang);
    GetPlayerFacingAngle(id,idang);
    new diff;
    if(playeridang > idang) diff = playeridang-idang
    else diff = idang-playerid;
    return diff;
    format(str,sizeof(str),"Turn %d dgrees",diff);
    SendClientMessage(playerid,0xFFFF00AA,str);
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)