[Include] FCNPC Extended Functions
#1

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
Reply
#2

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?
Reply
#3

Quote:
Originally Posted by Weponz
View Post
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
View Post
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.
Reply
#4

Three this functions is good for my fcnpc zombie

Edit:functions have 1 warning
PHP Code:
warning 202number of arguments does not match definition 
PHP Code:
stock FCNPC_GoToPlayerEx(npcidplayeridFloat:distFloat:ranglemovetype MOVE_TYPE_WALKUseZMap 0)
{
    new 
Float:xFloat:yFloat:zFloat:fa;
    
GetPlayerPos(playeridxyz);
    
GetPlayerFacingAngle(playeridfa);
    
rangle += fa;
    
= (dist floatsin(-rangle,degrees));
    
= (dist floatcos(-rangle,degrees));
    
FCNPC_GoTo(npcidxyz,movetype,UseZMap);

Fix:
PHP Code:
stock FCNPC_GoToPlayerEx(npcidplayeridFloat:distFloat:ranglemovetype MOVE_TYPE_WALKUseZMap 0)
{
    new 
Float:xFloat:yFloat:zFloat:fa;
    
GetPlayerPos(playeridxyz);
    
GetPlayerFacingAngle(playeridfa);
    
rangle += fa;
    
= (dist floatsin(-rangle,degrees));
    
= (dist floatcos(-rangle,degrees));
    
FCNPC_GoTo(npcidxyz,movetype,10UseZMap);//10 is Speed when npc use car you can change.

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)