Raised This Month: $7 Target: $400
 1% 

How to make bots using flashlights?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KWo
AMX Mod X Beta Tester
Join Date: Jul 2004
Location: Poland
Old 05-25-2008 , 14:08   How to make bots using flashlights?
Reply With Quote #1

Does anyone know how to force the bot to use the flashlight?
That client_cmd(id, "impulse 100") doesn't work at all at bots. I was trying in bot dll code to use:
FakeClientCommand (pEdict, "impulse 100");
but that doesn't affect the bots (even making the bots spriting needs to use extra code instead just some impulse value).

I was trying to use also EF_DIMLIGHT (pEdict->v.effects |= EF_DIMLIGHT), but that one makes the whole bot as a bright light in the dark room, instead making only a small light focused at the point the bot is looking at.
I even did this:
Code:
         MESSAGE_BEGIN (MSG_ONE, gmsgFlashlight, NULL, pEdict);
         WRITE_BYTE (1);
         WRITE_BYTE (100);
         MESSAGE_END ();
and I'm sure the message is sent (I could catch it by a metamod pm_tools plugin), but it also doesn't help.
Any idea?
__________________
The Fullpack of podbot mm V3B22 - 24 apr 2012!!! is available here.
The All-In-One 3.2a package - 02 jun 2013 (AMX X 1.8.2 [with ATAC 3.0.1b , CSDM2.1.3c beta, CM OE 0.6.5, podbot mm V3B22c and mm 1.20) is available here.
The newest Beta V3B23a (rel. 28 august 2018!!!) is available here.
KWo is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 05-26-2008 , 13:16   Re: How to make bots using flashlights?
Reply With Quote #2

Try messing around with the usercmd_s

Hook CmdStart function then try doing this:
cmd->impulse = 100;
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 05-27-2008 , 06:57   Re: How to make bots using flashlights?
Reply With Quote #3

engclient_cmd("impulse", "100"); shold work.
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
jim_yang
Veteran Member
Join Date: Aug 2006
Old 05-27-2008 , 07:53   Re: How to make bots using flashlights?
Reply With Quote #4

Quote:
Originally Posted by MPNumB View Post
engclient_cmd("impulse", "100"); shold work.
engclient_cmd == FakeClientCommand
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 05-27-2008 , 11:11   Re: How to make bots using flashlights?
Reply With Quote #5

We've tried and tested, hence why KWo is asking for suggestions.
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Reply


Thread Tools
Display Modes

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 05:40.


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