View Single Post
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 01-13-2024 , 18:41   Re: Bot Names Plugin
Reply With Quote #17

Quote:
Originally Posted by bigdaddy424 View Post
i dont understand a word from your last comment but this works
PHP Code:
public client_putinserver(id)
{
    if(!
is_user_bot(id))
    {
            return
    }

    if(
g_iTotalNames-- >= 0)
    {
        new 
szName[MAX_NAME_LENGTH], random(g_iTotalNames)
        
ArrayGetString(g_aBotNamesiszNamecharsmax(szName))
        
ArrayDeleteItem(g_aBotNamesi)

        static const 
szNameField[] = "name"
        
set_user_info(idszNameFieldszName)

        if (!
g_iTotalNames)
            
ReadFile()
    }

What are you talking about?

the plugin works, yes.

The described functionality i need is not implemented.

EDIT:
I think i understand what you mean, names are not repeated as for a single instance of "adding them" ofc.
but i want is to be able not to repeat names that have been added in the same session or even through changelevels, which might be challenging.

I was thinking storing used names in another variable that can go across maps, and have the list run out before attempting to use an already used name.

Result would be to give chance to more if not all names, to appear guaranteed.

Last edited by Ark_Procession; 01-13-2024 at 18:44. Reason: clarification
Ark_Procession is offline