HOW TO GET FACING ANGLE?
#1

I want to make spawn point for player is not from my country. so here is how that need to look

Code:
SetPlayerPos(playerid,477.8121,-1499.7649,20.5001);
				SetPlayerFacingAngle(playerid, 262.9963);
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
One thing i dont know and that is how to get facing angle? any help? tnx alot
Reply
#2

https://sampwiki.blast.hk/wiki/GetPlayerFacingAngle
Reply
#3

i see that but this numbers make me confused.

272.3543 that is face angle but i dont know how to get decimals ?
Reply
#4

That is Cord.

You should learn that match's.



Like: 0.0 , 30.0 , 90.0 , 180.0 , 270.0 ....

Code:
SetPlayerFacingAngle(playerid, 0.0);
Reply
#5

Quote:
Originally Posted by buonggiorno
i see that but this numbers make me confused.

272.3543 that is face angle but i dont know how to get decimals ?
pawn Code:
stock floatval(Float:var)
{
    new str[32];
    format(str, sizeof(str), "%f", var);
    return strval(str);
}
And then you can do smth like this:
pawn Code:
new Float:bla = 465.84562;
format(string,128,"Float %f in decimals is %d",bla,floatval(bla));
You get "Float 465.84562 in decimals is 465".

Reply
#6

ohhhh ok i cathc it tnx a lot i done this
Reply
#7

Quote:
Originally Posted by Dreft
pawn Code:
stock floatval(Float:var)
{
    new str[32];
    format(str, sizeof(str), "%f", var);
    return strval(str);
}
Use this - https://sampwiki.blast.hk/wiki/Floatround
Reply
#8

Quote:
Originally Posted by Don Correlli
Sure, floatround() is a good idea too

I prefer floatval()
Reply
#9

Quote:
Originally Posted by Dreft
I prefer floatval()
I don't.

I prefer floatround, you can round the float down or up to the nearest integer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)