Approved Press Button Info

Plug-ins compatibility with Zombie Escape 1.x only!


karan
Mod Tester
Mod Tester
India
Posts: 122
Joined: 6 years ago
Location: India
Contact:

#31

Post by karan » 2 years ago

VicKy wrote: 2 years ago can you make this only in consule
its spamming in server
increase the delay if needed
Image

User avatar
wbyokomo
VIP
VIP
Malaysia
Posts: 15
Joined: 2 years ago
Location: Malaysia
Contact:

#32

Post by wbyokomo » 2 years ago

Hi, i just updated the plugin a bit.

Code: Select all

#include <amxmodx>
#include <hamsandwich>
#include <reapi>

#define TIME_COOLDOWN 5.0

public plugin_init()
{
	register_plugin("AMX183 Button Info", "1.0p", "SeRious_SaM,wbyokomo")

	RegisterHam(Ham_Use, "func_button", "OnButtonPressedPost", 1)
}

public OnButtonPressedPost(ent, id)
{
	static Float:fCurTime; fCurTime = get_gametime();
	if(get_entvar(ent, var_flTimeStepSound) <= fCurTime)
	{
		set_entvar(ent, var_flTimeStepSound, fCurTime + TIME_COOLDOWN)
		static szName[32]; get_user_name(id, szName, charsmax(szName));
		client_print_color(0, id, "^4[Waifu Escape]^3 %s^1 just pressed a^3 BUTTON^1 !", szName)
	}
}
Increase cooldown time TIME_COOLDOWN 5.0 if you want to see less message. It use amxmodx >= 183. I don't want to support old amxmodx version.
[MMG]~Zombie-Escape-X
Image
[MMG]~Zombie-Plague-X
Image
[MMG]~Multi-Mod-X
Image

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: No registered users and 0 guests