ScardyBob May 13, 2010 Share ScardyBob Member May 13, 2010 (edited) Love the server, but I was wondering if there was anyway to bind the plugin commands via console? Essentially, instead of going through the popup menu every time to get full health, I want to bind the command to a key like 'bind u full_health' I can already do that for displaying points or popping up the menu (e.g. 'bind p points' and 'bind o "say /up"), but I can't find a way to bypass this and directly bind certain commands (like full health or spawn tank) directly to a key. Is there a way to do this? Any help would be greatly appreciated. Thanks, ScardyBob Edit: Also, are the options available and what actions give points posted somewhere? I'm having a hard time figuring out what I need to do to get more points. Edited May 13, 2010 by ScardyBob Link to comment Share on other sites More sharing options...
JackieChan May 13, 2010 Share JackieChan GC Alumni May 13, 2010 I made small edits to the points system found at http://sourcemod.com/. By small edits, I mean copy/paste work until it worked. I have little to no experience in coding with sourcemod. I could try to edit it so you could type "!ammo" to buy an ammo refill and whatnot, but not sure if I'd be able to pull this off. Hopefully I can, lol. As for the points, anything you do can net you points. Killing CI with pistols/snipers can get you more points than using other primary weapons. Spitters are the best way to get points. Next would be Chargers. Link to comment Share on other sites More sharing options...
ScardyBob May 17, 2010 Author Share ScardyBob Member May 17, 2010 (edited) Alright, I figured out a workaround. Basically you just do a bunch of menuselect commands to get to the option you want. For example, alias "fullhealth" "pointsmenu; menuselect 1; menuselect 5; menuselect 1;" creates an alias that goes through the menus and chooses full health and bind "kp_enter" "fullhealth" binds it to the enter on the numpad. I've attached the autoexec.cfg file I created that binds what I consider to be the most important commands to the numpad. Just put it in your \Steam\steamapps\common\left 4 dead 2\left4dead2\cfg\ folder. 7 (KP_HOME) = Shows points 8 (KP_UPARROW) = Brings up buy menu 9 (KP_PGUP) = Rebuy the last choice 4 (KP_LEFTARROW) = Buys a boomer 5 (KP_5) = Buys a spitter 6 (KP_RIGHTARROW) = Buys a tank 1 (KP_END) = Buys a pipebomb 2 (KP_DOWNARROW) = Buys a Molotov 3 (KP_PGDN) = Buys a defib + (KP_PLUS) = Heals infected Enter (KP_ENTER) = Buys full health autoexec.cfg Edited May 17, 2010 by ScardyBob Link to comment Share on other sites More sharing options...
Sky July 19, 2010 Share Sky Member July 19, 2010 I made small edits to the points system found at http://sourcemod.com/. By small edits, I mean copy/paste work until it worked. I have little to no experience in coding with sourcemod. I could try to edit it so you could type "!ammo" to buy an ammo refill and whatnot, but not sure if I'd be able to pull this off. Hopefully I can, lol. As for the points, anything you do can net you points. Killing CI with pistols/snipers can get you more points than using other primary weapons. Spitters are the best way to get points. Next would be Chargers. Jackiechan: before OnPluginStart() place this line of code: new Handle:AmmoCost; in public OnPluginStart() place this line of code: AmmoCost = CreateConVar("buy_refill_ammo_cost","0","How many points a refill cost."); RegConsoleCmd("ammo", AmmoBuy); now, anywhere after OnPluginStart() place this segment of code: public Action:AmmoBuy(client, args) { AmmoBuyFunc(client); return Plugin_Handled; } public Action:AmmoBuyFunc(client) { if (points[client] >= GetConVarInt(AmmoCost)) { ExecCheatCommand(client, "give", "ammo"); points[client] -= GetConVarInt(AmmoCost); } else { PrintToChat(client, "\x04[ \x03BUY \x04] \x03Not Enough Points."); } } This will allow you set up an !ammo or /ammo or "bind <key> <command>" Link to comment Share on other sites More sharing options...
JackieChan July 19, 2010 Share JackieChan GC Alumni July 19, 2010 Thanks, Sky, I'll try that. How close are you to releasing your epic item buy plugin? Link to comment Share on other sites More sharing options...
Sky July 19, 2010 Share Sky Member July 19, 2010 Thanks, Sky, I'll try that. How close are you to releasing your epic item buy plugin? At the moment, I'm not sure to be honest. I've been going back and forth on whether or not to. There are a few reasons for it, but i erased all that because I felt it's something best left for a private chat. I suppose when I stop adding new features every day, I'll probably do it, but at the moment, there are just too many reasons (bad mostly, but some good) to give it away right this moment. Preferrably, if you want to help test it, contact me on aim @ zimposs1ble so we can talk. It's a matter I don't really want to discuss publicly, due to the history involved in it. Link to comment Share on other sites More sharing options...
ScardyBob August 12, 2010 Author Share ScardyBob Member August 12, 2010 2.0 version updated for the new item buy plugin. I've attached the autoexec.cfg file I created that binds what I consider to be the most important commands to the numpad. Just put it in your \Steam\steamapps\common\left 4 dead 2\left4dead2\cfg\ folder. 8 (KP_UPARROW) = Brings up buy menu 9 (KP_PGUP) = Buys a water bucket 4 (KP_LEFTARROW) = Buys a special drop 5 (KP_5) = Buys a witch drop 6 (KP_RIGHTARROW) = Buys a tank drop 1 (KP_END) = Buys incap protection 2 (KP_DOWNARROW) = Buys a Molotov 3 (KP_PGDN) = Buys a defib + (KP_PLUS) = Buys tank health upgrade Enter (KP_ENTER) = Buys full health 0 (KP_INS) = Buys a melee weapon . (KP_DEL) = Buys a MP5 SMG autoexec.cfg Link to comment Share on other sites More sharing options...
samurai nightling August 13, 2010 Share samurai nightling Member August 13, 2010 Thanks Bob, now looks like a great time to say "Hey have you thought of becoming a member of GC? We play many different games and are a great fun community! And after a while you would maybe have the chance to become involved with helping with the L4D2 server!" haha Just a thought. But actually i will use some of those binds now that i just saw this, would help alot. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now