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

welcome sound wav


Post New Thread Reply   
 
Thread Tools Display Modes
tembeluu
Member
Join Date: Jan 2019
Location: London
Old 02-08-2019 , 20:50   Re: welcome sound wav
Reply With Quote #11

http://i68.tinypic.com/303b4t4.png
I should hear something ? or i'm wrong again
__________________
SarmaLe.LaLeagane.Ro - New Classic Server !
tembeluu is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 02-08-2019 , 20:55   Re: welcome sound wav
Reply With Quote #12

when precaching sound, you must use .wav extension, but if you specify that extension in client cmd with spk, nothing will happen.
correct way:
PHP Code:
precache_sound("location/sound.wav")
client_cmd(i"spk location/sound"); 

Last edited by DjSoftero; 02-08-2019 at 20:56.
DjSoftero is offline
tembeluu
Member
Join Date: Jan 2019
Location: London
Old 02-08-2019 , 21:04   Re: welcome sound wav
Reply With Quote #13

#include <amxmodx>

#define PLUGIN "Connect Announce"
#define VERSION "0.2"
#define AUTHOR "v3x"

new g_iMsgSayText, g_szSoundFile[] = "buttons/blip1.wav";

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
g_iMsgSayText = get_user_msgid("SayText");
}

public plugin_precache()
{
precache_sound(g_szSoundFile);
}

public client_putinserver(id)
{
if(is_user_bot(id)) return PLUGIN_CONTINUE;

new szUserName[33];
get_user_name(id, szUserName, 32);

new szAuthID[33];
get_user_authid(id , szAuthID , 32);

new iPlayers[32], iNum, i;
get_players(iPlayers, iNum);

for(i = 0; i <= iNum; i++)
{
new x = iPlayers[i];

if(!is_user_connected(x) || is_user_bot(x)) continue;

client_cmd(0, "spk %s", g_szSoundFile);

new szMessage[164];
format(szMessage, 163, "^x04%s (^x01%s^x04) connected", szUserName , szAuthID);

message_begin( MSG_ONE, g_iMsgSayText, {0,0,0}, x );
write_byte ( x );
write_string( szMessage );
message_end ();
}

return PLUGIN_CONTINUE;
}

https://forums.alliedmods.net/showthread.php?t=19228 if it's not completed this, can be deleted.
i need just an simple sound, i have to edit ALL THE SMA ? or i need to make myself one ?

the sounds is it THE SAME NAME , the plugin most be completed 100% not 2% , aaa u have to put the namee u have to make the plugin again lol for a simple sound it s hard for all of u to make that sma completed
__________________
SarmaLe.LaLeagane.Ro - New Classic Server !

Last edited by tembeluu; 02-08-2019 at 21:18.
tembeluu is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 02-09-2019 , 03:47   Re: welcome sound wav
Reply With Quote #14

next time use [php] tags.

PHP Code:
Reply With Quote  Multi-Quote This Message  Quick reply to this message #13
#include <amxmodx>

#define    PLUGIN    "Connect Announce"
#define    VERSION    "0.2"
#define    AUTHOR    "v3x"

new g_iMsgSayTextg_szSoundFile[] = "buttons/blip1";

public 
plugin_init()
{
register_plugin(PLUGINVERSIONAUTHOR);
g_iMsgSayText get_user_msgid("SayText");
}

public 
plugin_precache()
{
new 
data[32];
formatex(datacharsmax(data), "%s.wav"g_szSoundFile)
precache_sound(data);
}

public 
client_putinserver(id)
{
if(
is_user_bot(id)) return PLUGIN_CONTINUE;

new 
szUserName[33];
get_user_name(idszUserName32);

new 
szAuthID[33];
get_user_authid(id szAuthID 32);

new 
iPlayers[32], iNumi;
get_players(iPlayersiNum);

for(
0<= iNumi++)
{
new 
iPlayers[i];

if(!
is_user_connected(x) || is_user_bot(x)) continue;

client_cmd(0"spk %s"g_szSoundFile); 

new 
szMessage[164];
format(szMessage163"^x04%s (^x01%s^x04) connected"szUserName szAuthID);

message_beginMSG_ONEg_iMsgSayText, {0,0,0}, );
write_byte );
write_stringszMessage );
message_end ();
}

return 
PLUGIN_CONTINUE;

try it
DjSoftero is offline
tembeluu
Member
Join Date: Jan 2019
Location: London
Old 02-09-2019 , 06:58   Re: welcome sound wav
Reply With Quote #15

lol , leave it . not working this plugin . Someone can help me with what i want ? when a person connects to hear a sound wav for everyone .even someone playing, and someone is joined on server, to be on backround that sound
__________________
SarmaLe.LaLeagane.Ro - New Classic Server !

Last edited by tembeluu; 02-09-2019 at 07:02.
tembeluu is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 02-09-2019 , 10:55   Re: welcome sound wav
Reply With Quote #16

Quote:
Originally Posted by tembeluu View Post
lol , leave it . not working this plugin . Someone can help me with what i want ? when a person connects to hear a sound wav for everyone .even someone playing, and someone is joined on server, to be on backround that sound
I was wrong. You can input use it both ways.
PHP Code:
"spk weapons/ak47_boltpull.wav"
"spk weapons/ak47_boltpull" 
show me the code you're compiling.
DjSoftero is offline
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 02-09-2019 , 11:20   Re: welcome sound wav
Reply With Quote #17

Quote:
Originally Posted by DjSoftero View Post
I was wrong. You can input use it both ways.
PHP Code:
"spk weapons/ak47_boltpull.wav"
"spk weapons/ak47_boltpull" 
show me the code you're compiling.
you must write the .wav otherwise it wont work

@tembeluu maybe other plugin/s block it or smth, does it works?
amxx plugins
meta list
post it here
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 02-09-2019 , 11:29   Re: welcome sound wav
Reply With Quote #18

Quote:
Originally Posted by Nutu_ View Post
you must write the .wav otherwise it wont work

@tembeluu maybe other plugin/s block it or smth, does it works?
amxx plugins
meta list
post it here
in precache, you must write ".wav" in with speak, its optional. Just tested

Last edited by DjSoftero; 02-09-2019 at 11:30.
DjSoftero 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 22:34.


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