MapAndreas 1.2.1 for NPC issue
#1

Hello I wanted to spawn NPC with MapAndreas function (to find ground) but I have one problem with it. I've tried mapandreas to set position on myself it's working just fine but when I use it on NPC, its sets his position under ground for some reason.

Here's my code:
pawn Код:
//OnPlayerSpawn (NPC)
MapAndreas_SetZ_For2DCoord(1841.9462 - 10.0, -1050.7052, Z);       
SetPlayerPos(playerid, 1841.9462 - 10.0, -1050.7052, Z);

//OnGameModeInit - MapAndreas init
MapAndreas_Init(MAP_ANDREAS_MODE_FULL);
Reply
#2

You have to raise Z little bit.
Reply
#3

PHP код:
MapAndreas_FindZ_For2DCoord(Float:XFloat:Y, &Float:Z);
not
MapAndreas_SetZ_For2DCoord 
Reply
#4

First the function you wrote is wrong, as AbyssMorgan stated above.

And, increment the Z coordinate by 0.5 more or less, depends on your situation to match it with the surface because technically it is a little bit higher than the actual provided coordinate by the command itself.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)