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

register "lastinv" command doesn't work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 08-24-2009 , 07:22   register "lastinv" command doesn't work
Reply With Quote #1

PHP Code:
public plugin_init()   
    
register_clcmd("lastinv""HookLastInv")

public 
HookLastInv(id)
    
client_print(idprint_chat"I'am a debug message. And I dont work :("
Why this doesn't work? this is not the correct method to detect the "lastinv" command?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...

Last edited by Alucard^; 08-24-2009 at 07:27.
Alucard^ is offline
Send a message via Skype™ to Alucard^
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-24-2009 , 07:54   Re: register "lastinv" command doesn't work
Reply With Quote #2

If it doesn't work, it means you can't hook it, after all it's a client-side command.
__________________
Arkshine is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 08-24-2009 , 08:21   Re: register "lastinv" command doesn't work
Reply With Quote #3

Yes Arkshine, before when i posted this i saw a thread... where connor said "You can't hook that command".

BUT.....

PHP Code:
new gi_rcslotnum

new gs_rcarray[42][] =
{
    
"attack",
    
"attack2",
    
"reload",
    
"use",
    
"impulse100",
    
"impulse201",
    
"buyequip",
    
"chooseteam",
    
"cl_autobuy",
    
"cl_setautobuy",
    
"coverme",
    
"drop",
    
"enemydown",
    
"enemyspot",
    
"fallback",
    
"followme",
    
"getinpos",
    
"getout",
    
"go",
    
"holdpos",
    
"inposition",
    
"lastinv",
    
"needbackup",
    
"negative",
    
"nightvision",
    
"radio1",
    
"radio2",
    
"radio3",
    
"regroup",
    
"report",
    
"reportingin",
    
"roger",
    
"say",
    
"say_team",
    
"sectorclear",
    
"sticktog",
    
"stormfront",
    
"takepoint",
    
"takingfire",
    
"weapon_knife",
    
"weapon_c4",
    
"immunity"
}

...

    for ( 
gi_rcslotnum 6gi_rcslotnum 41gi_rcslotnum++ )
    {
        
register_clcmd gs_rcarray[gi_rcslotnum], "fn_hookclcmds" )
    }

...

public 
fn_hookclcmds id )
{
    
read_argv 0gs_clcmdarg014 )
    
    if ( ! 
fn_player_is_immuned id ) && fn_find_and_get_pcvar gs_clcmdarg0 ) || ! fn_player_is_immuned id ) && fn_find_clcmdflag idgs_clcmdarg0 ) )
    {
        
fn_printmessage id )
        return 
PLUGIN_HANDLED
    
}
    
    return 
PLUGIN_CONTINUE

From this plugin: http://forums.alliedmods.net/showthread.php?t=27089

What i understand of that code is the "same" as mine but with more commands. My understand is wrong? how this plugin detect the lastinv and block it?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-24-2009 , 08:27   Re: register "lastinv" command doesn't work
Reply With Quote #4

The command it's just listed but it won't block it , because isn't hookable.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 08-24-2009 , 08:39   Re: register "lastinv" command doesn't work
Reply With Quote #5

Ok, thx, so... i tried this:

PHP Code:
public client_command(id)
{
    new 
arg[32]
    
read_argv(idargcharsmax(arg) )
    
    if(
equali(arg"lastinv") )
        
client_print(0print_chat"Debug Message")

But doesn't work when i added the condition... this is wrong method or i writed something wrong?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-24-2009 , 08:47   Re: register "lastinv" command doesn't work
Reply With Quote #6

Quote:
because isn't hookable.
__________________
Arkshine is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 08-24-2009 , 08:48   Re: register "lastinv" command doesn't work
Reply With Quote #7

That command is not networked so, the server can't know when a player execute it.
__________________
joaquimandrade is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 08-24-2009 , 08:59   Re: register "lastinv" command doesn't work
Reply With Quote #8

So it's imposible to do something when a player execute that command?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-24-2009 , 09:23   Re: register "lastinv" command doesn't work
Reply With Quote #9

Exactly.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-24-2009 , 10:11   Re: register "lastinv" command doesn't work
Reply With Quote #10

It was hookable in SoccerJam plugin. It might no longer be hookable in newer AMXX versions or CS updates, but it was for sure.
__________________
hleV 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 09:42.


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