facing angle
#1

anyone know how to get the angle directly below the player? i know how but i just dunno the angle>.< 0-180 w/e
Reply
#2

PHP Code:
new Float:A;
GetPlayerFacingAngle(playerid,A); 
its stores the player's facing angle on variable named A
Reply
#3

i know this... if i do setplayerfacingangle(playerid,angle); now will it go behind?
Reply
#4

No ? O.o
if u do like this:
PHP Code:
new Float:A;
GetPlayerFacingAngle(playerid,A);
SetPlayerFacingAngle(playerid,A); 
so it takes the player's facing angle
and than set's his facing angle for how it was before.(u can do the SetPlayerFacingAngle in a command or something)
Reply
#5

ok..... will it tele the player right behind of him? cus

pawn Code:
CMD:cuff(playerid, params[])
{
    new id, Float:x, Float:y, Float:z,Float:angle, idname[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME],tmp[128];
    if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFF00AAFF, "*USAGE: /cuff [playerid / part of name]");
    else if(gTeam[playerid] != TEAM_COPS) return SendClientMessage(playerid, 0xFF00AAFF, "*ERROR: You are not a Police Officer!");
    else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF00AAFF, "*ERROR: Player is not connected,Invalid playerid Or Is Yourself!");
    else if(IsPlayerInRangeOfPoint(id, 10, x, y, z)) return SendClientMessage(playerid, COLOR_GREY, "Player is not close enough!");
    else
    {
        GetPlayerName(playerid, name, sizeof(name));
        GetPlayerName(id, idname, sizeof(idname));
        GetPlayerPos(strval(tmp),x,y,z);
        GetPlayerFacingAngle(playerid, angle);
       
        TogglePlayerControllable(id,false);
        SendClientMessage(playerid, COLOR_GREY, "You Have Cuffed Citizen %s(%d)!");
        SendClientMessage(id, COLOR_GREY, "You've Been Cuffed By Officer %s(%d)!");
        SetPlayerPos(playerid,x+0.5,y,z);
        SetPlayerFacingAngle(playerid, angle);
        OnePlayAnim(playerid, "PYTHON", "python_crouchreload", 2.0, 0, 0, 0, 0, 0);
        IsAnim[playerid] = 1;
    }
    return 1;
}
Reply
#6

it will the the player's facing angle
and then set's his facing angle to the taken facing angle
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)