Raised This Month: $ Target: $400
 0% 

How to create print chat for sank sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OneHitKilles
New Member
Join Date: Dec 2019
Old 12-04-2019 , 08:03   How to create print chat for sank sound
Reply With Quote #1

I have the sanksounds plugin and I want when someone writes "text" to write, "user activated the following sound"
OneHitKilles is offline
Watermelonnable
Member
Join Date: Feb 2017
Old 12-04-2019 , 08:22   Re: How to create print chat for sank sound
Reply With Quote #2

Hey mate, I think something like this should work:

PHP Code:
// We create the variable for the user name here with a max length of 32 characters
new playerName[32];
// Now we assign the name of the user to that variable
get_user_name(idplayerNamecharsmax(playerName));
// Now we send the message to everyone
client_print(0print_chat"%s activated the following sound"playerName); 
Just add it to the function that executes the sound and it should work. Replace "id" in the get_user_name function arguments with the variable holding the player executing the command.
Watermelonnable 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 02:44.


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