SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 09/08/2015, 01:28 PM   #1
Weponz
Big Clucker
 
Weponz's Avatar
 
Join Date: Sep 2013
Location: Sydney, Australia
Posts: 149
Reputation: 47
Post ZNPC: Zombified Non-Player Characters [v1.0] by Weponz

ZNPC: Zombified Non-Player Characters by Weponz

Introduction:
Quote:
This script is the first release of my NPC based Zombie System with Advanced AI using RNPC. The script is realistic with Sound Detection AI System making zombies more attracted to noise like gunshots, sprinting players and less attracted to crouching players allowing players to move around zombies undetected. Enjoy!
Updated ZNPC Version (DEMO):



Note: This is not v1.0 but a more advanced version to show you their capability.

Features:
Quote:
1. Zombies will roam the map until they detect a victim, then they will attack.
2. Zombies will feast on killed victims and regain full health.
3. Zombies are more attracted to noise like gunshots and sprinting players. (AI)
4. Zombies are less attracted to crouching players, allowing players to move around zombies undetected. (AI)
Installation:
Quote:
1. Install RNPC(0.4.1) and MapAndreas(v1.0 beta) if required via the links below.
2. Open the Pastebin link below and paste it into pawno.
3. Edit desired definitions and make sure you add spawn locations for zombies, then compile. (IMPORTANT!)
4. Place the compiled filterscript into you "filterscript" folder.
5. Open you "server.cfg" and edit your "filterscripts" and "plugins" lines and add the filterscript/plugins names.
6. Open you "server.cfg" and change "maxnpc" to the MAX_ZOMBIES amount.
Note: You may need to modify the script to create NPC's every 100 ms(using a timer) instead of instantly under OnGameModeInit to prevent your host from thinking it is getting attacked. (Paid Hosting Only)

pawn Code:
//Example Timer
public LoadZombies()//Modify to suit your server
{
    RNPC_SetUpdateRate(80);

    MapAndreas_Init(MAP_ANDREAS_MODE_NOBUFFER);

    new name[24];
    format(name, sizeof(name), "zname_%i", zombie_count + 1);
    ConnectRNPC(name);

    zombie_count++;

    if(zombie_count == MAX_ZOMBIES)
    {
        KillTimer(ZombieTimer);//Kill LoadZombies under OnGameModeInit
    }
    return 1;
}

Download:
Quote:
1. RNPC(0.4.1): http://www.forum.sa-mp.com/showthread.php?t=355849 (Credits: Mauzen)
2. MapAndreas(v1.0 beta): http://www.forum.sa-mp.com/showthread.php?t=120013 (Credits: Kalcor)
3. ZNPC(v1.0): http://www.pastebin.com/W0Laphjx (Credits: Weponz)
__________________
(Click to Play)


Last edited by Weponz; 31/01/2018 at 06:03 PM.
Weponz is offline   Reply With Quote
Old 09/08/2015, 01:38 PM   #2
SpikY_
High-roller
 
SpikY_'s Avatar
 
Join Date: Jul 2014
Posts: 1,246
Reputation: 128
Default Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz

Aynone vid or SS? looks interesting
__________________
-
SpikY_ is offline   Reply With Quote
Old 09/08/2015, 01:39 PM   #3
Weponz
Big Clucker
 
Weponz's Avatar
 
Join Date: Sep 2013
Location: Sydney, Australia
Posts: 149
Reputation: 47
Default Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz

Sorry no videos or screenshots at the moment, anyone is free to create a video or take screenshots for me to add into the thread.
__________________
(Click to Play)

Weponz is offline   Reply With Quote
Old 09/08/2015, 02:35 PM   #4
benjaminjones
Huge Clucker
 
Join Date: Sep 2012
Posts: 449
Reputation: 80
Default Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz

I will be waiting for a video or screenshots. Looks good tho! Good job mate.
benjaminjones is offline   Reply With Quote
Old 09/08/2015, 02:39 PM   #5
Weponz
Big Clucker
 
Weponz's Avatar
 
Join Date: Sep 2013
Location: Sydney, Australia
Posts: 149
Reputation: 47
Default Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz

Thanks, enjoy!
__________________
(Click to Play)

Weponz is offline   Reply With Quote
Old 09/08/2015, 02:55 PM   #6
VitalBulleT
Little Clucker
 
Join Date: Aug 2013
Posts: 6
Reputation: 3
Default Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz

thats so cool
VitalBulleT is offline   Reply With Quote
Old 09/08/2015, 03:30 PM   #7
zDivine
Huge Clucker
 
Join Date: Oct 2012
Location: zDivine.pwn
Posts: 297
Reputation: 49
Default Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz

This seems nice, but I have a suggestion for you.

pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
        if(!IsPlayerNPC(playerid))
        {
            if(newkeys & KEY_FIRE)
                {
                        if(GetPlayerWeapon(playerid) >= 22 && GetPlayerWeapon(playerid) <= 38)
                        {
                                GetVictimDetectRange[playerid] = (ZOMBIE_DETECT * 4);
                                if(GetVictimTimerStatus[playerid] == 1) { KillTimer(GetVictimResetTimer[playerid]); }
                                GetVictimTimerStatus[playerid] = 1;
                                GetVictimResetTimer[playerid] = SetTimerEx("ResetDetectRange", 5000, false, "i", playerid);
                        }
                }
                else if(newkeys & KEY_SPRINT && GetVictimTimerStatus[playerid] == 0)
                {
                    GetVictimDetectRange[playerid] = (ZOMBIE_DETECT * 2);
                        GetVictimTimerStatus[playerid] = 1;
                        GetVictimResetTimer[playerid] = SetTimerEx("ResetDetectRange", 5000, false, "i", playerid);
                }
        }
        return 1;
}

With this code, it will set all of the zombies' detect range higher when they are sprinting, no matter where they are on the map. You just adjust it to where it detects if they are in range of a zombie, and set that certain zombies detect range higher.

Because, say you are in Los Santos, and I am in San Fierro, and we are both near zombies, and you start sprinting, the zombies near me will also have higher detection ranges because you are sprinting.
zDivine is offline   Reply With Quote
Old 09/08/2015, 05:24 PM   #8
JeaSon
Gangsta
 
JeaSon's Avatar
 
Join Date: Aug 2013
Location: Future
Posts: 558
Reputation: 79
Default Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz

looks intresting
__________________
Again back
JeaSon is offline   Reply With Quote
Old 09/08/2015, 05:46 PM   #9
Dreyfuz
Huge Clucker
 
Dreyfuz's Avatar
 
Join Date: Jan 2013
Location: Planeta Tierra - Argentina - Buenos Aires.
Posts: 444
Reputation: 19
Default Respuesta: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz

Good job, but I will wait the video or pictures to download it...
__________________
Traducciones del Ingles al Español
[Tutorial] Cómo crear un plugin
[Tool/Web/Other] Callback's
[Include] [0.3X] mSelection 1.1 R3
Dreyfuz is offline   Reply With Quote
Old 09/08/2015, 06:13 PM   #10
Weponz
Big Clucker
 
Weponz's Avatar
 
Join Date: Sep 2013
Location: Sydney, Australia
Posts: 149
Reputation: 47
Default Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz

@VitalBulleT

Thanks.

@zDivine

I don't get what you mean, it sets the players detect range NOT the zombies.

@JeaSon

Enjoy!

@Dreyfuz

I do not have time to make a video or take screens. This is up to a satisfied downloader to do and supply for addition to the thread.
__________________
(Click to Play)

Weponz 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
[Map] Weponz Battleship Warzone <Weponz> Maps 6 12/06/2011 08:47 PM
[Map] Weponz Drift <Weponz> Maps 7 09/11/2010 02:37 PM
Player name lenght > 16 characters Dujma Help Archive 5 12/03/2009 10:47 AM


All times are GMT. The time now is 03:34 PM.


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