Hooking bots hurt
Since Ham_TakeDamage only works for humans any one know a work around for bots?
i have working code for humans only... but i want to be able to make bots friendly fire variable.. so if i was to shoot a bot with an awp in the head it would only do 25% of its damage. Example: PHP Code:
|
Re: Hooking bots hurt
Ham_TakeDamage works fine with podbot.
|
Re: Hooking bots hurt
Quote:
I read in some threads someone was using HamSandwich for bots and it wouldn't work. I was under the impression that HamSandwich didn't support bots, instead of only a few functions not working. |
Re: Hooking bots hurt
Quote:
PHP Code:
|
Re: Hooking bots hurt
Just so you know, 0.1 is the smallest delay you can use in set_task( ).
Code:
|
Re: Hooking bots hurt
Instead of using a task, you can register/unregister UpdateClientData, will register the ham forward at next frame.
|
Re: Hooking bots hurt
I could, but I see there no advantage.
|
Re: Hooking bots hurt
Quote:
So running this will allow Ham_TakeDamage to affect bots? |
Re: Hooking bots hurt
Quote:
|
Re: Hooking bots hurt
Then, you would have to set 3 values for gBotsRegistered :
0 = not registered 1 = registering soon 2 = registered Advantage is that you don't use any task + it's immediatly registered. PHP Code:
|
Re: Hooking bots hurt
Quote:
|
Re: Hooking bots hurt
New forward i've found while searching offsets in my kitchen garden.
|
Re: Hooking bots hurt
Quote:
so then something like this would work using your methond of hooking bots PHP Code:
|
Re: Hooking bots hurt
It should be RegisterHamFromEntity()
|
Re: Hooking bots hurt
Ops :down:
|
Re: Hooking bots hurt
Quote:
|
Re: Hooking bots hurt
By the way it still didnt work :(
|
Re: Hooking bots hurt
Quote:
|
Re: Hooking bots hurt
And if still doesn't work, replace :
g_iFhUpdateClientData = register_forward(FM_UpdateClientData, "UpdateClientData") with g_iFhUpdateClientData = register_forward(FM_UpdateClientData, "UpdateClientData", 1) |
Re: Hooking bots hurt
Quote:
|
Re: Hooking bots hurt
Quote:
On your quote he is not registering ham, he is registering a forward with fakemeta. |
Re: Hooking bots hurt
Quote:
And We are talking about this: Quote:
PHP Code:
|
Re: Hooking bots hurt
Back in 2009 threads didn’t have solved/unsolved feature.
I can’t be 100% sure because i never used bots in my life but that’s how you register takedamage from an entity (taking damage from a npc for example). So it probably also works with bots. |
Re: Hooking bots hurt
Quote:
This means the 'id' he is passing is always from a human player. You need to register ham for bots with a bot id for it to work. - |
Re: Hooking bots hurt
Since he uses bot id he is not passing a real player id. The only thing that could happen would be the code not work if updateclientdata ignores bots.
Code:
void UpdateClientData(const struct edict_s *ent, int sendweapons, struct clientdata_s *cd)I don’t have the opportunity to test it today, maybe you can. |
Re: Hooking bots hurt
Quote:
PHP Code:
|
Re: Hooking bots hurt
Well if it doesn’t it ain’t a problem. Just register ham from entity on bot connection. Problem solved.
But are you sure it is not called for bots? |
Re: Hooking bots hurt
Quote:
|
| All times are GMT -4. The time now is 02:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.