FCNPC Extended Functions -
Pottus - 22.04.2013
FCNPC Extended Functions
A very simple set of functions thus far to extend some of FCNPC's functionality, the plugin is still early in development so I will be updating this with newfunctions as time goes on. Currently there is only three functions and I was debating if I should even put this up at this point. I decided to put up what I have so far because it would be nice to get some more ideas from other scripters of what to add next.
Functions so far:
Code:
FCNPC_Punch(npcid, Float:x, Float:y, Float:z, PunchResetDelay = 125) - Allows the NPC to punch and resets correctly to punch again
FCNPC_GoToPlayer(npcid, playerid, movetype = MOVE_TYPE_WALK, UseZMap = 0) - Goes to a players exact position
FCNPC_GoToPlayerEx(npcid, playerid, Float:dist, Float:rangle, movetype = MOVE_TYPE_WALK, UseZMap = 0) - Goes
FCNPC_StartRNPCPlayBack(npcid) - start a FCNPC recording playback
http://pastebin.com/51GUBc5E
Re: FCNPC Extended Functions -
Weponz - 26.05.2014
Very nice.
I have no idea why there is not already a "punch" function, the key press function is shocking.
FCNPC_GoToPlayerEx is exactly what I am trying to accomplish, great work man!
PS: Does your DayZ server use FCNPC powered zombies?
EDIT: It's been over a year? any more additions?
Re: FCNPC Extended Functions -
Pottus - 27.05.2014
Quote:
Originally Posted by Weponz
PS: Does your DayZ server use FCNPC powered zombies?
|
We currently use RNPC because it is the most reliable plugin.
Quote:
Originally Posted by Weponz
EDIT: It's been over a year? any more additions?
|
Currently my focus is mostly on RNPC however I do try and maintain a functional FCNPC module for 420DayZ if in the future it becomes a better option. Now, what I would suggest is looking at this tutorial
https://sampforum.blast.hk/showthread.php?tid=497663 it is a very simple method for expanding FCNPC's capabilities immensely by using RNPC.
Now I did write this include a while ago and I was planning on expanding it but never developed much more with FCNPC but now that you mention it I really should have added that to this include so thanks for asking! It has been updated.
Re: FCNPC Extended Functions -
VinPure - 27.05.2014
Three this functions is good for my fcnpc zombie
Edit:functions have 1 warning
PHP Code:
warning 202: number of arguments does not match definition
PHP Code:
stock FCNPC_GoToPlayerEx(npcid, playerid, Float:dist, Float:rangle, movetype = MOVE_TYPE_WALK, UseZMap = 0)
{
new Float:x, Float:y, Float:z, Float:fa;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, fa);
rangle += fa;
x = (x + dist * floatsin(-rangle,degrees));
y = (y + dist * floatcos(-rangle,degrees));
FCNPC_GoTo(npcid, x, y, z,movetype,UseZMap);
}
Fix:
PHP Code:
stock FCNPC_GoToPlayerEx(npcid, playerid, Float:dist, Float:rangle, movetype = MOVE_TYPE_WALK, UseZMap = 0)
{
new Float:x, Float:y, Float:z, Float:fa;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, fa);
rangle += fa;
x = (x + dist * floatsin(-rangle,degrees));
y = (y + dist * floatcos(-rangle,degrees));
FCNPC_GoTo(npcid, x, y, z,movetype,10, UseZMap);//10 is Speed when npc use car you can change.
}