|
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
|

08-24-2009
, 08:21
Re: register "lastinv" command doesn't work
|
#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 = 6; gi_rcslotnum < 41; gi_rcslotnum++ ) { register_clcmd ( gs_rcarray[gi_rcslotnum], "fn_hookclcmds" ) }
...
public fn_hookclcmds ( id ) { read_argv ( 0, gs_clcmdarg0, 14 ) if ( ! fn_player_is_immuned ( id ) && fn_find_and_get_pcvar ( gs_clcmdarg0 ) || ! fn_player_is_immuned ( id ) && fn_find_clcmdflag ( id, gs_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...
|
|