Raised This Month: $252 Target: $400
 63% 

move to trash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GoGetSomeSleep
Member
Join Date: Dec 2018
Location: Miami/Florida
Old 07-24-2019 , 06:18   move to trash
Reply With Quote #1

move to trash

Last edited by GoGetSomeSleep; 03-11-2020 at 14:38.
GoGetSomeSleep is offline
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
Old 07-24-2019 , 10:08   Re: No Perm No Chat Sound
Reply With Quote #2

Just fix something
PHP Code:
public Action Command_Say(client, const String:command[], args
To
PHP Code:
public Action Command_Say(int client, const char[] commandint args
__________________

Taking Private(PAID) Plugins In PM
Feel free to Donate with PayPal
Feel free to message me in Discord Pilo#8253
Total donated : 25$

Last edited by Pilo; 07-24-2019 at 10:08.
Pilo is offline
kaiser2nd
Junior Member
Join Date: Jun 2019
Old 07-25-2019 , 16:29   Re: No Perm No Chat Sound
Reply With Quote #3

You already made a thread for this.
kaiser2nd is offline
Cruze
Veteran Member
Join Date: May 2017
Old 08-23-2019 , 12:47   Re: No Perm No Chat Sound
Reply With Quote #4

PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <sdktools>
#include <clientprefs>

#define DD    "buttons/blip1.wav"

bool blocktext false;
Handle g_isEnabled INVALID_HANDLE;

public 
void OnPluginStart()
{
    
g_isEnabled CreateConVar("sm_saysound_enable""1""(1 = ON ; 0 = OFF)"0);

    
AddCommandListener(Command_Say"say");
    
    
blocktext false;
}

stock char RemoveSymbol(char[] buffer)
{   
    
char str[3];
    
char new_str[3];
    
int new_str_count 0;  
    
    
strcopy(str3buffer);   
   
    for (
int i 0len 2<leni++)
    {
        if ((
'!' == str[i]) || ('/' == str[i]))
        {
            
new_str[new_str_count] = str[i];
            
new_str_count++;
        }    
    }
    
strcopy(buffer3new_str);
    return 
buffer;
}

public 
Action Command_Say(int client, const char[] commandint args)  
{
    if(!
g_isEnabled) return Plugin_Stop;

    if (!
blocktext)
    {
        
blocktext true;
        
        
char isay[3];
        if (
GetCmdArgString(isaysizeof(isay)) >= 1)
        {
            
RemoveSymbol(isay);
            
//PrintToChatAll("%s", isay);
            
if ((isay[0] == '!')
            || (
isay[0] == '/'))            
            {
                
blocktext false;
                return 
Plugin_Stop;
            }
            if(
CheckCommandAccess(client""ADMFLAG_RESERVATION ADMFLAG_VOTE ADMFLAG_KICK))
                
EmitSoundToAll(DD);
        }
        
RequestFrame(UnblockText0);
    }
    return 
Plugin_Continue;
}

public 
void UnblockText(any idk)
{
    
blocktext false;

__________________
Taking paid private requests! Add me on steam/discord!

AlliedModders Releases | Github | Private Plugins | PayPal | Steam | My Discord Server
Cruze is offline
Reply


Thread Tools
Display Modes

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 10:47.


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