Formula to create an object directly under a player, flat
#5

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
Directly under a player? I believe sa-mp's skin heights are all(or almost all) the same being 1.8 or 2.0, so you could get the player'pos and just create an object 0.9-1.0 below the z you get, and it will be directly under him, however if you want to create the object on the land/object under him, you need to either use MapAndreas or ColAndreas(recommended).
Yeah it's just the angle that I need to formulate, z-1 pretty much creates it directly under him, then the rotation angle.

MapAndreas didn't quiet do it:


Did I use it right?
pawn Код:
new Float: x, Float: y, Float: z, Float:a;
    GetPlayerFacingAngle(playerid, a);
    GetPlayerPos(playerid, x, y, z);
    MapAndreas_FindZ_For2DCoord(x, y, z);
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)