[FilterScript] ZNPC: Zombified Non-Player Characters [v1.0] by Weponz
#21

Good FS,i will use it thanks!
Reply
#22

My browser cannot download, can you sent to my email.
If can, thank you, my email address is:1274112031@qq.com
Reply
#23

Quote:

Note: You may need to modify the script to create NPC's every 100 ms(using a timer) to prevent your server from thinking it is getting attacked.

How does one make such a timer I'm pretty new to this and it would help me out alot if I can receive some help with this.
Reply
#24

Quote:
Originally Posted by Hypex
Посмотреть сообщение
How does one make such a timer I'm pretty new to this and it would help me out alot if I can receive some help with this.
You can create a timer using SetTimer(or the SetTimerEx variant which handles parameters). I guess an example of this for the filterscript (imo, there should be an option to whitelist the localhost IP from the protection):

pawn Код:
new name[MAX_PLAYER_NAME];
for(new npcid = 0; npcid < MAX_ZOMBIES; npcid++)
{
                format(name, sizeof(name), "%s", ZOMBIE_NAME, npcid + 1);
        SetTimerEx("CreateZombie", i*1000, false, "i", npcid);
        count++;
}

forward CreateZombie(npcid, name[]);
public CreateZombie(npcid, name[]) return ConnectRNPC(npcid, name[]);
To initiate the timer you should use the SetTimer/Ex function. Note that the function must be public(it must also be forwarded using forward).

I guess you can probably find further information about timers throughout the forums, sorry if this didn't really help you.
Reply
#25

Thank you Abagail for helping me out.
Reply
#26

Good Job
Reply
#27

Updated OP with a screenshot of zombies in action during AI testing.
Reply
#28

-DELETE-
Reply
#29

Zombies are not spawning.. what seems to be the issue?
Reply
#30

How do I change the spawn coordinates of the NPCs? Apologies. I'm new in NPCs and learning.

EDIT:
Found it.
PHP код:
new Float:ZombieSpawns[2][3] =//REQUIRED: Change [2] to the amount of spawn locations.
{
    {
0.00.00.0},//REQUIRED: Add zombie spawn locations here.
    
{0.00.00.0}//REQUIRED: Add zombie spawn locations here.
}; 
Reply
#31

The problem now is that I can't find any zombie even after adding the spawns. Here they are:
PHP код:
new Float:ZombieSpawns[3][3] =//REQUIRED: Change [2] to the amount of spawn locations.
{
    {
1642.0972, -2332.3430, -2.6797},//REQUIRED: Add zombie spawn locations here.
    
{1685.3428, -2333.313713.5469},//REQUIRED: Add zombie spawn locations here.
    
{1616.1416, -2276.033413.5140}//REQUIRED: Add zombie spawn locations here.
}; 
Reply
#32

Quote:
Originally Posted by NealPeteros
Посмотреть сообщение
The problem now is that I can't find any zombie even after adding the spawns. Here they are:
PHP код:
new Float:ZombieSpawns[3][3] =//REQUIRED: Change [2] to the amount of spawn locations.
{
    {
1642.0972, -2332.3430, -2.6797},//REQUIRED: Add zombie spawn locations here.
    
{1685.3428, -2333.313713.5469},//REQUIRED: Add zombie spawn locations here.
    
{1616.1416, -2276.033413.5140}//REQUIRED: Add zombie spawn locations here.
}; 
I'm in the same situation as you, you find?
Reply
#33

Got an include error
pawn Код:
rnpc.inc(539) : error 025: function heading differs from prototype
Reply
#34

zombies spawn underground and only roams there, this should be fixed.
Reply
#35

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
zombies spawn underground and only roams there, this should be fixed.
It's not the filterscript's error. It may be your MapAndreas. Try updating it and in your server.cfg, add MapAndreas in the last slot of your plugins.
Reply
#36

Quote:
Originally Posted by NealPeteros
Посмотреть сообщение
It's not the filterscript's error. It may be your MapAndreas. Try updating it and in your server.cfg, add MapAndreas in the last slot of your plugins.
adding my mapandras in the last slot of my plugins fixed it thanks.
Reply
#37

Anyone can Help me, maybe? I try so long time to get a few zombies, but nothing works for me!

Quote:

[20:43:02] [debug] Server crashed while executing zombie2.amx
[20:43:02] [debug] AMX backtrace:
[20:43:02] [debug] #0 native RNPC_FinishBuild () from RNPC.so
[20:43:02] [debug] #1 000005fc in ?? (0, -992755459, 1149966876, 1099739116, 985963430, 1) from zombie2.amx
[20:43:02] [debug] #2 000046c4 in public OnZombieRoam () from zombie2.amx
[20:43:02] [debug] Native backtrace:
[20:43:02] [debug] #0 b73db9f0 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () from plugins/crashdetect.so
[20:43:02] [debug] #1 b73d4a62 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[20:43:02] [debug] #2 b73d5764 in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[20:43:02] [debug] #3 b73d76b4 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[20:43:02] [debug] #4 b73db31d in ?? () from plugins/crashdetect.so
[20:43:02] [debug] #5 b7742d08 in __kernel_rt_sigreturn () from linux-gate.so.1
[20:43:02] [debug] #6 b7467ec7 in fwrite () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[20:43:02] [debug] #7 b6a5b07e in _ZN15OnFootRecording11writeToFileEPc () from plugins/RNPC.so
[20:43:02] [debug] #8 b6a5da68 in _ZN4RNPC8EndBuildEi () from plugins/RNPC.so
[20:43:02] [debug] #9 b6a5856a in ?? () from plugins/RNPC.so
[20:43:02] [debug] #10 080950e4 in ?? () from ./samp03svr
[20:43:02] [debug] #11 b73d64d3 in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[20:43:02] [debug] #12 0000000e in ?? () from *Зo·HЕo·„¬|„¬|…®|„¬|рЇ|„°|Tp·

Quote:

public OnZombieRoam()
{
for(new npcid = 0; npcid < MAX_ZOMBIES; npcid++)
{
if(IsPlayerNPC(npcid))
{
if(GetRNPCHealth(npcid) > 0)
{
new victim = GetZombieVictim(npcid), Float, Float:y, Float:z;
GetPlayerPos(npcid, x, y, z);
if(victim == INVALID_PLAYER_ID)
{
new pos = random(4);
if(pos == 0) { x = x + 100.0; }
else if(pos == 1) { x = x - 100.0; }
else if(pos == 2) { y = y + 100.0; }
else if(pos == 3) { y = y - 100.0; }

GetZombieVictimID[npcid] = INVALID_PLAYER_ID;

RNPC_SetKeys(0);

MoveRNPC(npcid, x, y, z, RNPC_SPEED_WALK, 1);
}
}
}
}
return 1;
}

Reply
#38

Main post updated with ******* video example (demo)
Reply
#39

@Daniielk

Thank you.
Reply
#40

It uses RNPC.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)