Re: [:3] TF2_CTFWeaponInfo
Thx it's working now :) and another question ...
is there any way to get the owner/carrier client index of a CTFWeaponInfo object? for example that i could say "all weapons used by bots should fire rockets with minigun" ? |
Re: [:3] TF2_CTFWeaponInfo
The this pointer of a CTFWeaponBase detour will give you an CTFWeaponBase object that inherits from CBaseEntity. The object represents the actual weapon in the world. Then you can look up m_hOwner (or m_hOwnerEntity, I forget the property name) to get the entity of the player that owns the weapon.
|
Re: [:3] TF2_CTFWeaponInfo
puh ... do you have a small pseudo code example ? :D
|
Re: [:3] TF2_CTFWeaponInfo
Should get you started: http://wazz.ampaste.net/d61226c77
|
Re: [:3] TF2_CTFWeaponInfo
interesting .... but i wonder. when i use this one:
PHP Code:
Do you have a class/struct or whatever of CBaseEntity, that you are able to call function on those objects? |
Re: [:3] TF2_CTFWeaponInfo
Use http://wazz.ampaste.net/d2b6e9bf0 EDIT: Forums still failing me.
|
Re: [:3] TF2_CTFWeaponInfo
thanks a lot ... worked, too ... but now i get this error when i try to compile:
PHP Code:
|
Re: [:3] TF2_CTFWeaponInfo
Quote:
http://wiki.alliedmods.net/Writing_e...ons#Link_Paths And don't forget to #define GAME_DLL 1 before including. |
Re: [:3] TF2_CTFWeaponInfo
Or just dont use GetOwnerEntity()
|
Re: [:3] TF2_CTFWeaponInfo
how do i use this in/for a plugin?
like, add everything before the CON_COMMAND and then make my own CON_COMMAND? (it simply looks completely different from the sourcepawn i've been using, so it looks quite confusing to me) is it possible to explain it somewhat, so i could understand and adapt it myself? from what i can gather, the stuff within the #ifdef _win32 to #endif is for signature finding, so i'd need to put that in my con cmd too. then there's a check for the number of args, after which it converts the arg to a char? (is that simply a string? or actually just 1 character?), which is then used to find which effect? (with a check to see if name is invalid) and then followed by the actual stuff that does something i think... (do i remember correctly if -> has something to do with pointers?) basically i'm looking for a way to up a player's weapondamage in tf2 (not everyone with that weapon btw), the problem in tf2 is that in the ctx, there is a max damage defined so even if i use a point hurt, i can't actually damage them with more then the max damage for that weapon at the same time. (i'd need multiple different point hurts, which if they kill someone spams loads of kill messages) so ye... could you explain a bit? or provide a small example of what i'm wanting to try? (or even tell me this isn't the way to do it, cos you know a better way?) |
| All times are GMT -4. The time now is 18:14. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.