Jump to content

? servers

? players online

[ZE]Rebuy shortcuts + !hud plugin

Recommended Posts


  • Content Count:  588
  • Joined:  03/12/15
  • Status:  Offline

Since I did not see this on the To-do list of ze, I guess I have to bring it up here.

 

Rebuy shortcuts are commands like !kevlar, !he, !bizon you can type in chat to quickly rebuy these weapons from the zmarket without typing !zmarket in chat and going through the list of categories. These commands will humans time in some crucial moments during the boss fight or zombie holds. For a boss fight that consumes your kevlar quickly, it is so much easier to just type !kevlar than doing !zmarket-8-6-2-0 combo on your keyboard, especially for those that requires you to rebuy kevlar every 30 seconds. Also a lot of people do not know you can rebuy weapons using !zmarket. Telling them to do !kevlar in chat instead of !zmarket-8-6-2-9 will save a lot of time while leading the team and potentially save a lot of humans from dying...

 

I believe SG refuses to add !hud because it uses the same message type as damage display. Now, with the introduction of game_text, !hud can be recreated with game_text and added to the right side of the screen, where it does not block the vision of players. Pressing tab to check the scoreboard always blocks the vision and the scoreboard itself sometimes bugs out, making it hard for people to know who has an item.

  • Like 1
Link to comment

  • Content Count:  363
  • Joined:  12/26/15
  • Status:  Offline

You do know that zbuy is a private plugin. Go ask shufen for it since GFL wont fork it over without shufens permission. Also teals version is great but it doesnt tie to zombie reloaded and its just a seperate buy menu so more individual plugins will cause our nicely stacked lasagna to turn into tangled spaghetti.

 

 

Pasta is the only thing i can reference with the amount of sleep i got this past month

Edited by Inception
Link to comment

  • Content Count:  1300
  • Joined:  03/19/16
  • Status:  Offline

You do know that zbuy is a private plugin. Go ask shufen for it since GFL wont fork it over without shufens permission. Also teals version is great but it doesnt tie to zombie reloaded and its just a seperate buy menu so more individual plugins will cause our nicely stacked lasagna to turn into tangled spaghetti.

 

 

Pasta is the only thing i can reference with the amount of sleep i got this past month

 

Well resumed, ask to shufen and forget about teal's one xd (I don't say it's a bad one, sG works fine with it. However, with the /zmarket introduce story already, players have been lost for a loooong moment, can't imagine hat would happen if we were using his plugin)

Link to comment

  • Content Count:  3729
  • Joined:  10/14/07
  • Status:  Offline

I believe SG refuses to add !hud because it uses the same message type as damage display. Now, with the introduction of game_text, !hud can be recreated with game_text and added to the right side of the screen, where it does not block the vision of players. Pressing tab to check the scoreboard always blocks the vision and the scoreboard itself sometimes bugs out, making it hard for people to know who has an item.

@Punky was already working on the !hud plugin and this has now been implemented on the server.

Link to comment

  • Content Count:  1396
  • Joined:  09/14/12
  • Status:  Offline

If you guys actually use this you can't change the text/commands or I will be very sad :(

#pragma semicolon 1

#define PLUGIN_AUTHOR "R3TROATTACK"
#define PLUGIN_VERSION "1.0"


#include 
#include 


#pragma newdecls required


EngineVersion g_Game;


public Plugin myinfo = 
{
   name = "I'm too lazy to use already made features",
   author = PLUGIN_AUTHOR,
   description = "The plugins for lazy people by lazier people",
   version = PLUGIN_VERSION,
   url = "www.go-fuck-yourself.com"
};


#define BuyDelay 10.0
#define RefillAmmoAmount 1000
#define GiveKevlarHelmet 1 // 1 == yes 0 == no
#define KevlarRefillAmount 100
float g_fLastBuy[MAXPLAYERS + 1];


public void OnPluginStart()
{
   g_Game = GetEngineVersion();
   if(g_Game != Engine_CSGO && g_Game != Engine_CSS)
   {
       SetFailState("This plugin is for CSGO/CSS only.");    
   }
   RegConsoleCmd("sm_moreammopls", Command_ImTooLazyToUseZmarket);
   RegConsoleCmd("sm_morekevlarpls", Command_ImTooLazyToUseZmarketStill);
}


public void OnClientPostAdminCheck(int client)
{
   g_fLastBuy[client] = GetGameTime();
}


public void OnClientDisconnect(int client)
{
   g_fLastBuy[client] = GetGameTime();
}


public Action Command_ImTooLazyToUseZmarket(int client, int args)
{
   if(!IsClientInGame(client))
       return Plugin_Handled;
       
   if(GetGameTime() - g_fLastBuy[client]     {
       PrintToChat(client, " \x06[Lazy People Are Best] \x01You can rebuy armor/kevlar in \x10%0.2f \x01seconds", BuyDelay - (GetGameTime() - g_fLastBuy[client]));
       return Plugin_Handled;
   }
       
   int weapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
   if(weapon == -1)
   {
       PrintToChat(client, "\x06[Lazy People Are Best] \x01Use a weapon dumb fuck");
       return Plugin_Handled;
   }
   char sClass[128];
   GetEntityClassname(weapon, sClass, sizeof(sClass));
   if(StrContains(sClass, "weapon_knife", false) != -1 || StrContains(sClass, "grenade", false))
   {
       PrintToChat(client, "\x06[Lazy People Are Best] \x01Your weapon's ammo cant be changed'");
       return Plugin_Handled;
   }
   SetEntProp(weapon, Prop_Send, "m_iClip2", RefillAmmoAmount);
   PrintToChat(client, " \x06[Lazy People Are Best] \x01Your weapon's spare ammo has been set to %i", RefillAmmoAmount);
   return Plugin_Handled;
}


public Action Command_ImTooLazyToUseZmarketStill(int client, int args)
{
   if(!IsClientInGame(client))
       return Plugin_Handled;
       
   if(GetGameTime() - g_fLastBuy[client]     {
       PrintToChat(client, " \x06[Lazy People Are Best] \x01You can rebuy armor/kevlar in \x10%0.2f \x01seconds", BuyDelay - (GetGameTime() - g_fLastBuy[client]));
       return Plugin_Handled;
   }
   
   SetEntProp(client, Prop_Send, "m_ArmorValue", KevlarRefillAmount);
   SetEntProp(client, Prop_Send, "m_bHasHelmet", GiveKevlarHelmet);
   PrintToChat(client, " \x06[Lazy People Are Best] \x01Your kevlar has been set to %i.", KevlarRefillAmount);
   return Plugin_Handled;
}

It should work but m_iClip2 has always been weird for me or I'm supposed to be using another net_prop but fuck that too much logic stuff needed :(

 

Edit: Punky told me yall didn't mean rebuy WHEN YOU SAID REBUY so now i feel dumb cause i'm 2 lazy 2 read and comprehend posts xd

 

Edit dos:Here is what I was told you actually wanted

#pragma semicolon 1

#define PLUGIN_AUTHOR "R3TROATTACK"
#define PLUGIN_VERSION "1.0"


#include 
#include 
#include 


#pragma newdecls required


public Plugin myinfo = 
{
   name = "I'm too lazy to use already made features",
   author = PLUGIN_AUTHOR,
   description = "The plugins for lazy people by lazier people",
   version = PLUGIN_VERSION,
   url = "www.go-fuck-yourself.com"
};


char g_sLazyArms[][] =  { "weapon_usp_silencer", "weapon_glock", "weapon_hkp2000", "weapon_tec9", "weapon_revolver", "weapon_p250", "weapon_cz75a", "weapon_fiveseven", "weapon_elite", "weapon_deagle" };


StringMap g_hLazyMap = null;


public void OnPluginStart()
{
   g_hLazyMap = new StringMap();
}


public void OnMapStart()
{
   g_hLazyMap.Clear();
   LoadKeyValues();
}


public void OnClientSayCommand_Post(int client, const char[] command, const char[] sArgs)
{
   if(!IsClientInGame(client))
       return;
       
   char sBuffer[128];
   if(g_hLazyMap.GetString(sArgs, sBuffer, sizeof(sBuffer)))
       EquipWeapon(client, sBuffer);
}


void EquipWeapon(int client, const char[] sWeapon)
{
   int weapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
   if(IsWeaponSecondary(sWeapon))
   {
       CS_DropWeapon(client, CS_SLOT_SECONDARY, false);
       AcceptEntityInput(weapon, "kill");
       weapon = GivePlayerItem(client, sWeapon);
       EquipPlayerWeapon(client, weapon);
   }
   else
   {
       CS_DropWeapon(client, CS_SLOT_PRIMARY, false);
       AcceptEntityInput(weapon, "kill");
       weapon = GivePlayerItem(client, sWeapon);
       EquipPlayerWeapon(client, weapon);
   }
}


bool IsWeaponSecondary(const char[] sWeapon)
{
   for (int i = 0; i     {
       if(StrEqual(sWeapon, g_sLazyArms[i], true))
           return true;
   }
   return false;
}


void LoadKeyValues()
{
   char sPath[512];
   BuildPath(Path_SM, sPath, sizeof(sPath), "configs/lazypeoplearedumb.cfg");
   if(!FileExists(sPath))
       SetFailState("[LazyPeople] Could find file \"lazypeoplearedumb.cfg\" at path \"%s\"", sPath);
       
   KeyValues kv = new KeyValues("ZmarketIsHard");
   kv.ImportFromFile(sPath);
   
   if (!kv.GotoFirstSubKey()) 
   {
       delete kv;
       SetFailState("ERROR: No KeyValues were found inside \"%s\", unloading", sPath);
   }
   
   do{
       char sBuffer[128], sClassname[128];
       kv.GetSectionName(sBuffer, sizeof(sBuffer));
       kv.GetString("weapon", sClassname, sizeof(sClassname));
       if(StrContains(sClassname, "weapon_", true) != -1 && !StrEqual(sClassname, "weapon_taser"))
           g_hLazyMap.SetString(sBuffer, sClassname, true);
   } while (kv.GotoNextKey());
   delete kv;
}

 

KeyValue file for config folder

"ZmarketIsHard"
{
   "!thisiseasierthenzmarketwithnumbers"
   {
       "weapon" "weapon_negev"
   }
}

If anyone actually cares to test/fix the broken stuff in this cause I dont @Punky but theoretically it does work xd

  • Like 3
Edited by R3TROATTACK
Link to comment

  • Content Count:  5055
  • Joined:  07/19/15
  • Status:  Offline

So the thing about the rebuy is that I can still add the plugin that I mentioned above for now, but @Punky has also given me a new updated zr plugin to test that also incorporates a rebuy in it. So at some point soon I need a bunch of ZE peeps to help test it out to make sure that it works well with what we have so far and hopefully fixes some issues that we've been having for example some classes not saving properly.

 

@Punky @Fridthiof @Crawfish @Solid @Akumu @diryathing @Drakanen @BloodyKiller @DangerCallz @Inception @Korean Ninja @Thomson @Agent Wesker @frosty @Grandmaster_Poobah @Brandon @Repus @omarfire00 @Cubic² @LargeAll @Gator @Hydreigon @KenjiOnline @Clearly @Black Rain @Paralyzed

 

And anyone else that frequents ZE but I can't find on le forums for some reason

  • Like 7
Link to comment

Reply to Thread

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...