Zombie [FCNPC][A.I] -
KayJ - 07.01.2019
Zombie [FCNPC][A.I]
About:
Zombie Bot script inspired from
ZNPC &
iZombies and some more scripts.
Features:- Custom damage to zombies from players (configurable).
- Custom damage from zombies to players (configurable).
- Zombies have melee weapons (shovel/knife/katana - custom damage).
- Zombies will roam around the map.
- Zombies will more attracted to players who shoot nearby them (except silencer & melee weapons)
- Zombies will less attracted to players who crouch/duck near them.
- Zombies will more attracted to players who sprint.
- Zombies have custom damage bar on their head (https://imgur.com/egi6RrL).
- Latest FCNPC and ColAndreas/MapAndreas(1.0) is used.
- Zombies get headshot from all weapons(only zombies).
Note:
The script might have some bugs, I'll fix them as I find them.. Including zombies flying..
Media:
Custom zombie damage -
https://imgur.com/egi6RrL
Zombie kill human (death window) -
https://imgur.com/a/HtuyjVH
Video - Probably.
Download:
zombie.pwn:
Pastebin |
RAW |
Github
FCNPC:
Github
ColAndreas:
Github
MapAndreas:
Forum Topic
YSI Timers:
Github
Re: Zombie [FCNPC][A.I] -
Hazon - 07.01.2019
I've never seen in the any community zombie actually 'run' just walk and they can't even reach the players who run. What about this (ez) ?
Re: Zombie [FCNPC][A.I] -
KayJ - 07.01.2019
Quote:
Originally Posted by Hazon
I've never seen in the any community zombie actually 'run' just walk and they can't even reach the players who run. What about this (ez) ?
|
I don't fully understand what you're trying to point out here... But here's my assumption and answer:
1. You can make them run by changing styles of MOVE_TYPE
2. State of Decay: SAMP Source have zombies which sprint, they also featured that in ZNPC topic.
3. You can set their speed of running..
Re: Zombie [FCNPC][A.I] -
Pottus - 07.01.2019
This script it not even close to being ready for release!
Just for starters.
Use a switch!
Code:
if(weaponid == 24) FCNPC_SetHealth(npcid, FCNPC_GetHealth(npcid)-50);//DesertEagle
if(weaponid == 22) FCNPC_SetHealth(npcid, FCNPC_GetHealth(npcid)-50);//Colt45
if(weaponid == 32) FCNPC_SetHealth(npcid, FCNPC_GetHealth(npcid)-10);//Tec9
if(weaponid == 28) FCNPC_SetHealth(npcid, FCNPC_GetHealth(npcid)-10);//Uzi
if(weaponid == 23) FCNPC_SetHealth(npcid, FCNPC_GetHealth(npcid)-50);//SilencedColt
if(weaponid == 31) FCNPC_SetHealth(npcid, FCNPC_GetHealth(npcid)-35);//M4
if(weaponid == 30) FCNPC_SetHealth(npcid, FCNPC_GetHealth(npcid)-40);//AK
if(weaponid == 29) FCNPC_SetHealth(npcid, FCNPC_GetHealth(npcid)-18);//MP5
if(weaponid == 34) FCNPC_SetHealth(npcid, FCNPC_GetHealth(npcid)-300);//SniperRifle
if(weaponid == 33) FCNPC_SetHealth(npcid, FCNPC_GetHealth(npcid)-35);//CuntGun
if(weaponid == 25) FCNPC_SetHealth(npcid, FCNPC_GetHealth(npcid)-100);//PumpShotgun
if(weaponid == 27) FCNPC_SetHealth(npcid, FCNPC_GetHealth(npcid)-70);//Spaz12
You shouldn't need to check if players/npcs are connected (unless there is some issue where a sanity check is required) if it is for whatever reason then issuerid != INVALID_PLAYER_ID is a useless check. There is a lot of this in your script.
Code:
if(!IsPlayerConnected(npcid)) return 0;
if(!IsPlayerConnected(issuerid)) return 0;
if(issuerid != INVALID_PLAYER_ID && weaponid >= 22 && weaponid <= 38 && bodypart == 9)
Next example instead of having extra code which does nothing you are lacking code here. Why would you start doing checks without even making sure the zombie is actually streamed in for the player?
Code:
foreach(new i : Player)
{
GetPlayerPos(i, xa, ya, za);
if(IsPlayerInRangeOfPoint(zombieid, 1, xa, ya, za))
Now here is where things get retarded and highlights failure to polish your work.
Code:
SetTimer("ResetDetectRange", 5000, false);
Yet again lacking code....
Code:
public ResetDetectRange(playerid)
{
HumanFound[playerid] = 0;
return 1;
}
Re: Zombie [FCNPC][A.I] -
KayJ - 07.01.2019
I'm new in npc working and stuff... I do note all your observations and improve it.
Re: Zombie [FCNPC][A.I] -
Matyaas - 28.01.2019
Pottus you recomended me this filterscript?
Re: Zombie [FCNPC][A.I] -
iLearner - 28.01.2019
Quote:
Originally Posted by KayJ
I'm new in npc working and stuff... I do note all your observations and improve it.
|
things he pointed out are not related to npcs specifically though, for instance the timer, it's completely off the road.
Re: Zombie [FCNPC][A.I] -
Lokii - 28.01.2019
You also should
return 0 OnPlayerTakeDamage
Re: Zombie [FCNPC][A.I] -
Pottus - 28.01.2019
Quote:
Originally Posted by iLearner
things he pointed out are not related to npcs specifically though, for instance the timer, it's completely off the road.
|
Still no improvements for almost a month.
1-star from me.