Raised This Month: $51 Target: $400
 12% 

JoinSound plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
orion1
Junior Member
Join Date: Sep 2018
Old 11-22-2019 , 00:59   JoinSound plugin
Reply With Quote #1

Hello. I need Join Sound plugin when admin logs on the server like by STEAM_ID and set to another person STEAM_ID for example. Thanks a lot
orion1 is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 11-22-2019 , 03:19   Re: JoinSound plugin
Reply With Quote #2

here you go

Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN  "Connect Sound"
#define VERSION "1.0"
#define AUTHOR  "Author"

#define ADMINID "STEAM_0:1:123456788"

new soundfile[]="sound/welcome.mp3"

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

public plugin_precache()
{    
    precache_generic(soundfile);
}

public client_putinserver(id)
{
	if(!is_user_admin(id)) return;

	new steamid[34];
	get_user_authid( id, steamid, charsmax(steamid));

	if(equali(steamid, ADMINID)){
    	client_cmd(0, "mp3 play %s", soundfile);
    }
}
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Mikaeel123
Senior Member
Join Date: Oct 2018
Old 11-28-2019 , 10:18   Re: JoinSound plugin
Reply With Quote #3

Quote:
new soundfile[]="sound/welcome.mp3"
and maybe set one sound for play
Mikaeel123 is offline
orion1
Junior Member
Join Date: Sep 2018
Old 12-01-2019 , 02:22   Re: JoinSound plugin
Reply With Quote #4

Quote:
Originally Posted by Sanjay Singh View Post
here you go

Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN  "Connect Sound"
#define VERSION "1.0"
#define AUTHOR  "Author"

#define ADMINID "STEAM_0:1:123456788"

new soundfile[]="sound/welcome.mp3"

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

public plugin_precache()
{    
    precache_generic(soundfile);
}

public client_putinserver(id)
{
	if(!is_user_admin(id)) return;

	new steamid[34];
	get_user_authid( id, steamid, charsmax(steamid));

	if(equali(steamid, ADMINID)){
    	client_cmd(0, "mp3 play %s", soundfile);
    }
}
Thanks a lot, appreciate it

Quote:
Originally Posted by Mikaeel123 View Post
and maybe set one sound for play
Thanks a lot for help ;)

Last edited by orion1; 12-01-2019 at 02:24.
orion1 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 18:26.


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