AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Force bot to say ready (https://forums.alliedmods.net/showthread.php?t=174487)

JoKeR LauGh 12-21-2011 02:27

Force bot to say ready
 
Hey all.
I've tried 2 method but still bot didn't say ready when they're alive or should I print it for them?

1 Method***
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#define PLUGIN "Force bot to say ready"
#define VERSION "0.1"
#define AUTHOR "MuhdZaim"


public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
client_connect(id)
{
    if ( 
is_user_bot(id) )
    {
        if ( 
is_user_alive(id) )
        {
            
client_cmd(id"say ready")
        }
    }


2 Method***
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>

#define PLUGIN "Force bot to say ready"
#define VERSION "0.1"
#define AUTHOR "MuhdZaim"


public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn"player""Fw_Spawn"1)
}

public 
Fw_Spawn(id)
{
    if ( 
is_user_bot(id) )
    {
        if ( 
is_user_alive(id) )
        {
            
client_cmd(id"say ready")
        }
    }


Any solution please?

fysiks 12-21-2011 03:37

Re: Force bot to say ready
 
Why do you need the bot to say "ready"? If you need another plugin to act on the command, it won't work. If you just want other people see the bot say something in chat then you need to use the following:

PHP Code:

engclient_cmd(id"say""ready"


JoKeR LauGh 12-21-2011 04:05

Re: Force bot to say ready
 
thanks for the fast reply , yes I need another plugin to on the command . Thanks again!

fysiks 12-21-2011 15:28

Re: Force bot to say ready
 
Quote:

Originally Posted by JoKeR LauGh (Post 1616939)
thanks for the fast reply , yes I need another plugin to on the command . Thanks again!

I already said that's not possible. I think you probably need to make the plugin that handles that command ignore the bots.


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

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