SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 22/04/2013, 05:27 AM   #1
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,893
Reputation: 1321
Default FCNPC Extended Functions

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

Last edited by Pottus; 27/05/2014 at 02:22 AM.
Pottus is offline   Reply With Quote
Old 26/05/2014, 11:34 PM   #2
Weponz
Big Clucker
 
Weponz's Avatar
 
Join Date: Sep 2013
Location: Australia
Posts: 148
Reputation: 47
Default Re: FCNPC Extended Functions

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?
__________________

Creator of the famous NVCNR

Releases: http://wiki.sa-mp.com/wiki/User:Weponz


Weponz is offline   Reply With Quote
Old 27/05/2014, 02:15 AM   #3
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,893
Reputation: 1321
Default Re: FCNPC Extended Functions

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 http://forum.sa-mp.com/showthread.php?t=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.
Pottus is offline   Reply With Quote
Old 27/05/2014, 04:37 AM   #4
VinPure
Big Clucker
 
VinPure's Avatar
 
Join Date: Oct 2013
Location: VietNam
Posts: 167
Reputation: 86
Default Re: FCNPC Extended Functions

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.

VinPure is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mass Effect 3 (Extended Cut) toXioneer Everything and Nothing 2 07/08/2012 09:59 AM
[FilterScript] Extended wanted-level stars Slice Filterscripts 32 14/10/2011 03:32 AM
[Map] Extended Fort Carson [RP] Namaco Maps 21 14/06/2011 11:02 PM
The FreeStylers - And The Furiouns EXTENDED! (Video Made By Basketball pros) ReDeViL Everything and Nothing 0 26/07/2009 06:51 PM


All times are GMT. The time now is 05:21 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.