Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
iulicxd - 01.02.2016
Good FS,i will use it
thanks!
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
Ezzo - 06.02.2016
My browser cannot download, can you sent to my email.
If can, thank you, my email address is:1274112031@qq.com
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
Hypex - 10.02.2016
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.
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
Abagail - 10.02.2016
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.
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
Hypex - 11.02.2016
Thank you Abagail for helping me out.
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
Amunra - 11.02.2016
Good Job
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
Weponz - 08.03.2016
Updated OP with a screenshot of zombies in action during AI testing.
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
NealPeteros - 25.09.2016
-DELETE-
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
Uberanwar - 13.10.2016
Zombies are not spawning.. what seems to be the issue?
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
NealPeteros - 19.10.2016
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.0, 0.0, 0.0},//REQUIRED: Add zombie spawn locations here.
{0.0, 0.0, 0.0}//REQUIRED: Add zombie spawn locations here.
};
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
NealPeteros - 19.10.2016
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.3137, 13.5469},//REQUIRED: Add zombie spawn locations here.
{1616.1416, -2276.0334, 13.5140}//REQUIRED: Add zombie spawn locations here.
};
Respuesta: Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
Polkish - 25.10.2016
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.3137, 13.5469},//REQUIRED: Add zombie spawn locations here.
{1616.1416, -2276.0334, 13.5140}//REQUIRED: Add zombie spawn locations here.
};
|
I'm in the same situation as you, you find?
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
NealPeteros - 27.10.2016
Got an include error
pawn Код:
rnpc.inc(539) : error 025: function heading differs from prototype
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
Naruto_Emilio - 30.10.2016
zombies spawn underground and only roams there, this should be fixed.
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
NealPeteros - 01.11.2016
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.
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
Naruto_Emilio - 03.11.2016
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.
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
PrettyDiamond - 03.12.2016
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;
}
|
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
Weponz - 23.12.2017
Main post updated with ******* video example (demo)
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
Weponz - 23.12.2017
@Daniielk
Thank you.
Re: ZNPC: Zombified Non-Player Characters [v1.0] by Weponz -
Weponz - 24.12.2017
It uses RNPC.