![]() |
How to make some change in buying
For E[POD]bot to get the bots to buy granede I must write
Code:
FakeClientCommand(pEdict, "menuselect","8", NULL); Code:
FakeClientCommand(pEdict, "buy;menuselect 8;menuselect 4", NULL, NULL); How can I fix this. This is not problem for Counter-Strike 1.6 becose now the bots buy weapon with shortcuts and in the shortcut is taped Code:
FakeClientCommand(pEdict, "buy;menuselect 4;menuselect 3", NULL, NULL); For that reason I wont to fix this. |
Re: How to make some change in buying
i don't understand the problem? You mean in CS 1.5 they do not buy weapons and in CS 1.6 they do?
Or, the bots don't buy weapons for some reason? |
Re: How to make some change in buying
this is normal because you must consider that client commands are sent individually.
If a real client can send client commands in a burst separated by semicolons (e.g, "buy;menuselect A;menuselect B"), it's because his client DLL separates each command and calls the client command function THREE TIMES. Once for "buy", another time for "menuselect A", another time for "menuselect B". The FakeClientCommand() function you are using does not permit to do that. One or two years ago I wrote a different version of FakeClientCommand() coupled with pfnCmd_Argc, Argv and Args, that implements this behaviour and enables bots to send client commands in the same way humans do (i.e, with semicolons to separate each). It is implemented in POD-bot 2.6mm, if you want to give it a look. |
Re: How to make some change in buying
Thanks I now will look in PODbot 2.6mm.
Edit : After 3 hours in working the functioon is changed to the FakeClientComman from PODbot 2.6mm. Thanks a lot of to PMB. Now I have a lot of work to change all FakeClientCommand in the bots, so maybe after some day I will tell you is the bots now buy weapon coorect for Counter-Strike 1.5. I put comments in the new code whit your name PMB :). Thanks again. |
Re: How to make some change in buying
if you want to do it easily , add a function like :
Code:
void Buy (edict_t *pEdict, char *cmd, char *cmd2) Buy (pEdict, "8", "4"); |
Re: How to make some change in buying
OK all FakeClientCommand in bot.cpp are changed.
Now the bots buy weapon correctly in CS 1.5 and CS 1.6 with no problem. Again thanks to PMB ;). |
All times are GMT +2. The time now is 07:06. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.