AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to create print chat for sank sound (https://forums.alliedmods.net/showthread.php?t=320098)

OneHitKilles 12-04-2019 08:03

How to create print chat for sank sound
 
I have the sanksounds plugin and I want when someone writes "text" to write, "user activated the following sound"

Watermelonnable 12-04-2019 08:22

Re: How to create print chat for sank sound
 
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.


All times are GMT -4. The time now is 02:44.

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