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

[TF2 Help] OnClientCommand only gets called if the command is invalid?


Post New Thread Reply   
 
Thread Tools Display Modes
NeoDement
Member
Join Date: Mar 2009
Old 03-23-2009 , 20:00   Re: [TF2 Help] OnClientCommand only gets called if the command is invalid?
Reply With Quote #21

Quote:
Originally Posted by p3tsin View Post
PHP Code:
for(new 1<= MaxClientsi++) {
    if(
IsClientInGame(i) && IsPlayerAlive(i) && GetEntProp(iProp_Send"m_nPlayerCond") & 16) {
        
//player is cloaked
    
}

Sorry, couldnt resist optimizing your code

PHP Code:
KillSentries(client) {
    new 
offset FindSendPropInfo("CObjectSentrygun","m_hBuilder");
    new 
ent = -1;

    while((
ent FindEntityByClassname(ent,"obj_sentrygun")) != -1) {
        if(
GetEntDataEnt2(entoffset) == client) {
            
AcceptEntityInput(ent"Kill");
        }
    }

Hehe, I nicked it from the dispenser on death plugin, the author of which had credited Bl4nk for the snippet. Thanks
Quote:
Originally Posted by p3tsin View Post
The first (and only) thing that comes to my mind would be OR'ing in IN_DUCK to the client's buttons in ProcessUsercmds hook (post hook?).
OR'ing? umm I'll do some research I suppose
edit: oh dukehacks, I was wondering if I'd have to use that
Quote:
Originally Posted by p3tsin View Post
You'd have to modify the packets sent to clients. In the HL1 engine this could be done by hooking AddToFullPack, havent tried it in source yet. At least I can tell you its not doable without an extension.
Blah, I'll just try and force thirdperson on them then
__________________
I'm not being funny but guys, I'm a bit fit, y'know?

Last edited by NeoDement; 03-23-2009 at 20:04.
NeoDement 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 21:48.


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