SA-MP Forums Archive
Help with those fkin npc - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with those fkin npc (/showthread.php?tid=550596)



NPC death [HELP] - Supermaxultraswag - 13.12.2014

PLEASE HELP. I'm stuck with this for a week... How do I make npc die? I mean, like normal player - fall down when his hp reach 0. Plugin I use for npc dont have applyanimation function(so i dont know how to make npc fall down), and when i kill npc he just stand, do nothin and start send me messages

my problem video https://www.youtube.com/watch?v=G6Sh...ature=*********

code :

Код HTML:
#include <a_samp>
#include <FCNPC>

new zombie;


#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	
	    new name[24];
		format(name, 24, "Zombie", 1);
		zombie = FCNPC_Create(name);
        FCNPC_Spawn(zombie, 162, 318.3802, 1146.2661, 7.7623);
        print("Npc");
        
	return 1;
}

public FCNPC_OnSpawn(npcid)
{
return 1;
}

public FCNPC_OnDeath(npcid, killerid, weaponid)
{
return 1;
}

public FCNPC_OnTakeDamage(npcid, damagerid, weaponid)
{
return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid,318.3802, 1136.2661, 7.7623);
GivePlayerWeapon(playerid, 30, 900);
	return 1;
}
https://sampforum.blast.hk/showthread.php?tid=428066 plugin i use


Re: Help with those fkin npc - cyberlord - 13.12.2014

check this https://sampforum.blast.hk/showthread.php?tid=128254


Re: Help with those fkin npc - Supermaxultraswag - 14.12.2014

Quote:
Originally Posted by cyberlord
Посмотреть сообщение
I need solution with FCNPC plugin functions.


Re: Help with those fkin npc - Supermaxultraswag - 15.12.2014

Cmon, no one?


Re: Help with those fkin npc - Supermaxultraswag - 17.12.2014

bump


Re: Help with those fkin npc - Supermaxultraswag - 18.12.2014

bump


Re: Help with those fkin npc - Pottus - 18.12.2014

FCNPC has the killing function built into it....

FCNPC_SetHealth() set the health to 0


Re: Help with those fkin npc - Supermaxultraswag - 19.12.2014

Lol, I know that fcnpc has the killing function, I need death animation, because when I kill npc, he just stand and do nothing.


Re: Help with those fkin npc - Supermaxultraswag - 20.12.2014

VIDEO ADDED :

https://www.youtube.com/watch?v=G6Sh...ature=*********


Re: Help with those fkin npc - Supermaxultraswag - 21.12.2014

For real? No one?