View difference between Paste ID: QXgt70Ru and qepRQMhk
SHOW: | | - or go back to the newest paste.
1-
/* Plugin generated by AMXX-Studio */
1+
2
#include <cstrike>
3
4-
#include <amxmisc>
4+
new g_cvar;
5-
#include <ColorChat>
5+
6
public plugin_init() {
7-
#define PLUGIN "Sprays Delay"
7+
	register_plugin("Spray Delay Fixer","0.0.1","Hyuna");
8-
#define VERSION "1.0"
8+
	register_clcmd("say /fixspray", "cmdfix");
9-
#define AUTHOR "Eyal"
9+
10
	g_cvar = get_cvar_pointer("decalfrequency");
11
}
12
13-
	register_plugin(PLUGIN, VERSION, AUTHOR)
13+
public cmdfix(id){
14-
	
14+
	if (cs_get_user_team(id) == CS_TEAM_CT || is_user_admin(id))
15-
	register_clcmd("say /spray", "MenuShow")
15+
	{
16-
	register_clcmd("say /sprays", "MenuShow")
16+
		set_pcvar_num(g_cvar,3);
17-
	register_clcmd("say /spraymenu", "MenuShow")
17+
		client_print(id,print_chat,"[AMXX] You set the Spray Delay to 3 seconds!");
18-
	register_clcmd("say /spraysmenu", "MenuShow")
18+
		return;
19
	}
20-
public MenuShow(id)
20+
21-
{
21+
	client_print(id,print_chat,"[AMXX] Only admin and guards can fix the Spray Delay!");
22-
    if(get_user_team(id) == 2 || is_user_admin(id)) {
22+
	return;
23-
    new menu = menu_create("Spray Delay Time", "MenuHandler")
23+
24-
    menu_additem(menu, "Unlimited Spray", "1", 0)
24+
25-
    menu_additem(menu, "5 Seconds Delay", "2", 0)
25+
stock is_user_admin(index)
26-
    menu_additem(menu, "10 Seconds Delay", "3", 0)
26+
	return (get_user_flags(index) & ADMIN_ADMIN);