Raised This Month: $ Target: $400
 0% 

asking player on connect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 04-24-2024 , 12:00   asking player on connect
Reply With Quote #1

hi there, could someone please do a plugin for me fast?
when the player entered the server he would get a question like

"Do you want to change your mp3 volume?"

with answers:

"1. Yes"
"2. No"

If 1, cliend cmd would change his MP3Volume to 0.02
If no, nothing happens.

I know its not that hard to make, i could make it myself but im really busy these days i have to research first.

thanks indeed!
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
Tote
Senior Member
Join Date: Jul 2023
Old 04-24-2024 , 12:18   Re: asking player on connect
Reply With Quote #2

you cant change client side volume, considered slow hacking read rules.
Tote is offline
Tote
Senior Member
Join Date: Jul 2023
Old 04-24-2024 , 12:19   Re: asking player on connect
Reply With Quote #3

and there is no better way i think
Tote is offline
tedaimlocks
Member
Join Date: Jan 2024
Old 04-24-2024 , 12:54   Re: asking player on connect
Reply With Quote #4

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);
}
Quote:
Originally Posted by Tote View Post
you cant change client side volume, considered slow hacking read rules.
Its not really a slowhack when the user agrees to it

Last edited by tedaimlocks; 04-24-2024 at 12:55.
tedaimlocks is offline
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 04-24-2024 , 13:19   Re: asking player on connect
Reply With Quote #5

@tedaimlocks thank you very much, it works

@tote thats why i wanted to ask player first, because i know what slowhacking is
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
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
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-24-2024 , 21:55   Re: asking player on connect
Reply With Quote #7

Just leave people's settings alone. If they want to change their volume, they can do it in the options.
__________________
fysiks is offline
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 04-25-2024 , 15:04   Re: asking player on connect
Reply With Quote #8

Quote:
Originally Posted by fysiks View Post
Just leave people's settings alone. If they want to change their volume, they can do it in the options.
well not everyone knows every command, thats why i ask them first
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-25-2024 , 23:51   Re: asking player on connect
Reply With Quote #9

No commands are necessary, it's part of the GUI. Also, there are multiple volume settings (4 of them) and new players should learn about them anyways. If you need to provide guidance, then just do that: Press <ESC>, to to Options, Select "Audio".
__________________
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:52.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode