Raised This Month: $ Target: $400
 0% 

Why does this plugin makes the server crash?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 01-03-2022 , 17:51   Re: Why does this plugin makes the server crash?
Reply With Quote #12

Thank you for all your answers intended to help me.

Okay, CrazY., I will use the second plugin you gave me. I will test it, and I will reply if it's working properly.

By the way, are you aware that the same bot can't buy extra items more than once during one round? For example, if a bot buys the Plasma Gun, then the bot gets infected and then humanized by an admin or buys an antidote, then the same bot will not be able to buy Plasma Gun, again, or any other item mentioned in this code:

Code:
// Items name (note: add exact item name)

new const EXTRA_ITEMS[][] = {
	"Plasma Gun",
	"Golden Ak 47",
	"Item3"
}
In other words, the plugin is unable to affect bots if they are humans, buy extra items, then become infected (zombies) and then become humans, again, by using an antidote or get humanized by an admin. If a bot, who have bought an extra item, becomes a zombie, and then becomes human, again, the bot won't be made, by the plugin, to buy any extra item mentioned in the "// Items name" section of the plugin.

The bots I use have the "buy an antidote" function built-in, so I haven't added the Antidote in "// Items name" section of your plugin. Is the problem coming from the fact the antidote usage is built-in in the .dll file that controls the bots?

Also, will the new plugin give extra items to humans and zombies, or only to humans? Will the plugin give extra items during any game mode, or only during normal infection mode? I ask this question, because I don't see any checks intended to return the plugin's function if X game mode is detected.

For example, the second plugin doesn't contain code like this:

Code:
public zp_round_started(gamemode, id)
{
    for (new id = 1; id <= g_maxplayers; id++)
        g_has_item[id] = false;

    if (gamemode != MODE_PLAGUE || MODE_SURVIVOR)
        set_task(2.0, "give_item_task", TASK_STARTGIVE);
}
Does that mean that the second plugin will give extra items during any game mode, just because there are no checks to detect the game modes listed as modes during which extra items shouldn't be given to bots, and then return the plugin's function intended to give bots extra items?

Last edited by GlobalPlague; 01-03-2022 at 17:59.
GlobalPlague is offline
 



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

Forum Jump


All times are GMT -4. The time now is 11:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode