View Single Post
Tote
Senior Member
Join Date: Jul 2023
Old 04-24-2024 , 13:57   Re: asking player on connect
Reply With Quote #6

Quote:
Originally Posted by tedaimlocks View Post
HTML Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Ask on connect"
#define VERSION "1.0"
#define AUTHOR "tedaimlocks"

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
}

public Menu(id) {
	new menu = menu_create("Do you want to change your MP3 volume?", "MenuHandler")
	menu_additem(menu, "Yes", "1")
	menu_additem(menu, "No", "2")
	menu_display(id, menu)
}

public MenuHandler(id, menu, item) {
	switch(item) {
		case 0: {
			client_cmd(id, "MP3Volume 0.02");
		}
		case 1: {
			return PLUGIN_HANDLED;
		}
	}
        return PLUGIN_HANDLED;
}

public client_putinserver(id) {
    set_task(5.0, "Menu", id);
}

Its not really a slowhack when the user agrees to it
it's still bad way to do it
Tote is offline