Raised This Month: $51 Target: $400
 12% 

[REQ]Bot uses flashlight


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cheewongken
Senior Member
Join Date: Feb 2009
Old 11-24-2009 , 13:01   [REQ]Bot uses flashlight
Reply With Quote #1

i know that bots aren't sensitive to light, but can someone make a plugin so that they use the flashlight anyway?

if its too much to ask..

- bots wait till recharge then only use flashlight again after no battery
- team specific capability..

thanks.

PS- i use podbots and the original cs 1.6 bots.
cheewongken is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 11-24-2009 , 13:08   Re: [REQ]Bot uses flashlight
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <cstrike>
 
new bfl_ctbfl_tmaxplayers;
 
public 
plugin_init()
{
    
register_plugin("Bots Flashlight""1.0""hleV");
 
    
bfl_ct register_cvar("bfl_ct""1"); // Can CT bots use flashlight?
    
bfl_t register_cvar("bfl_t""1"); // Can T bots use flashlight?
 
    
register_logevent("roundstart"2"1=Round_Start");
    
maxplayers get_maxplayers();
}
 
public 
roundstart()
{
    new 
ct get_pcvar_num(bfl_ct);
    new 
get_pcvar_num(bfl_t);
 
    for (new 
client 1client <= maxplayersclient++)
    {
        if (!
is_user_alive(client) || !is_user_bot(client))
            continue;
 
        switch (
cs_get_user_team(client))
        {
            case 
CS_TEAM_CT: if (ctclient_cmd(client"impulse 101");
            case 
CS_TEAM_T: if (tclient_cmd(client"impulse 101");
        }
    }

__________________
hleV is offline
cheewongken
Senior Member
Join Date: Feb 2009
Old 11-25-2009 , 00:35   Re: [REQ]Bot uses flashlight
Reply With Quote #3

thx for trying, hleV, but the bots (CS or PB) still don't use flashlight.. even after i tried the command impulse 101 in the console of both the server and client...

+karma

EDIT: i've been looking up, and i foun that impulse 100 is for enabling flashlight, while 101 is for giving all weps..
EDIT2: impulse 100 doesn't work either.

Last edited by cheewongken; 11-25-2009 at 03:40.
cheewongken is offline
cheewongken
Senior Member
Join Date: Feb 2009
Old 11-25-2009 , 10:49   Re: [REQ]Bot uses flashlight
Reply With Quote #4

after looking at the code more closely, i think maybe the bots turn off the flashlight the moment the round starts... so is there any way to lock it on?

btw, impulse 100 definitely turns on the flashlight, not 101
cheewongken is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 11-25-2009 , 11:18   Re: [REQ]Bot uses flashlight
Reply With Quote #5

Maybe this

Code:
#include < amxmodx > #include < engine > #define TheChance(%1,%2) ( random_num( 0, %1 ) <= %2 ) public plugin_init( ) {     register_plugin( "Bots Flashlight", "1.0", "xPaw" );         register_logevent( "EventRoundStart", 2, "1=Round_Start" ); } public EventRoundStart( ) {     new iPlayers[ 32 ], iNum;     get_players( iPlayers, iNum, "ad" );         if( !iNum )         return;         for( new i; i < iNum; i++ )         if( TheChance( 100, 50 ) )             engclient_cmd( iPlayers[ i ], "impulse 100" ); }
__________________
xPaw is offline
cheewongken
Senior Member
Join Date: Feb 2009
Old 11-25-2009 , 13:37   Re: [REQ]Bot uses flashlight
Reply With Quote #6

no, its still not working..

thx for trying. +karma
cheewongken is offline
platzpatrone
Veteran Member
Join Date: Apr 2007
Location: Germany
Old 11-25-2009 , 14:42   Re: [REQ]Bot uses flashlight
Reply With Quote #7

this

http://forums.alliedmods.net/showthr...rce+flashlight

works but like a disco funny to see but maybe a well known coder
can change it that it keep it on instead of flashing
platzpatrone is offline
cheewongken
Senior Member
Join Date: Feb 2009
Old 11-26-2009 , 02:30   Re: [REQ]Bot uses flashlight
Reply With Quote #8

thanks.. but if you didn't notice, hleV did that plugin, and also did a newer one above.. but i'm testing it out.

EDIT: hey thanks! it works, but its flashy.. lol this is the best i can get now, i guess.
EDIT2: if possible, pls get this to stay on.. the flashing gets annoying.

Last edited by cheewongken; 11-26-2009 at 03:31.
cheewongken is offline
fR4gn0tiX!
Senior Member
Join Date: Nov 2009
Location: Georgia, Tbilisi
Old 11-27-2009 , 15:00   Re: [REQ]Bot uses flashlight
Reply With Quote #9

podbots (latest version) are using flashlights if it's dark
fR4gn0tiX! is offline
Send a message via Skype™ to fR4gn0tiX!
cheewongken
Senior Member
Join Date: Feb 2009
Old 11-29-2009 , 14:59   Re: [REQ]Bot uses flashlight
Reply With Quote #10

i know, but i want to kinda force it on...
cheewongken is offline
Reply



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 13:21.


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