[FilterScript] Zombie [FCNPC][A.I]
#1

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

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

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

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;
}
Reply
#5

I'm new in npc working and stuff... I do note all your observations and improve it.
Reply
#6

Pottus you recomended me this filterscript?
Reply
#7

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

You also should return 0 OnPlayerTakeDamage
Reply
#9

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


Forum Jump:


Users browsing this thread: 1 Guest(s)