SetPlayerPosFindZ for NPC
#1

Hi,

I am wondering if anyone knows any method at all which can enable me to use the 'SetPlayerPosFindZ' function on an NPC. I would like to use this function on the NPC from a filterscript, but even using it in the NPC's npcscript would be better than nothing.

I've tried playing around with the #include directives when compiling both the filterscript and the npcscript but cannot get it to work. I cannot seem to get the function working in either script.

Also when I use the 'SetPlayerPosFindZ' function on an NPC in the filterscript I find that it does nothing and does not move him. However, I also noticed that when I use the 'SetPlayerFacingAngle' function on an NPC from the filterscript it does work and the NPC changes rotation.

I know it says in the documentation that you cannot have access to the regular scripting resources in npcscripts, but I would really like to be able to use the 'SetPlayerPosFindZ' function on an NPC.

Anyone know any method at all by which I can do this?
Reply
#2

Your best bet is to use MapAndreas. That's assuming npcmodes also has access to plugins.

SetPlayerPosFindZ requires SA be running on the client. The height calculation is performed using the geometry loaded on the client.
Reply
#3

Yep, SetPlayerPosFindZ is based on a clients function, as the server itself has no idea how the SA map looks like.
So only something like mapandreas can help to tell the server where the ground is.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)