SetPlayerPos
#1

Hi guys, how can i check player facing angle (or any other function) and then SetPlayerPos(playerid, x, y(+5 or -5 depending on player facing angle),z);
Thanks for the answer.
Reply
#2

new Float:Angle;
GetPlayerFacingAngle(playerid, Angle);
Reply
#3

PHP код:
GetXYInFrontOfPlayer(playerid, &Float:x, &Float:yFloat:distance)
{
    new 
Float:a;
    
GetPlayerPos(playeridxya);
    
GetPlayerFacingAngle(playerida);
    if (
GetPlayerVehicleID(playerid))
    {
        
GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    }
    
+= (distance floatsin(-adegrees));
    
+= (distance floatcos(-adegrees));

Found here: https://sampwiki.blast.hk/wiki/Function#...ultiple_values
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)