AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   move to trash (https://forums.alliedmods.net/showthread.php?t=317682)

GoGetSomeSleep 07-24-2019 06:18

move to trash
 
move to trash

Pilo 07-24-2019 10:08

Re: No Perm No Chat Sound
 
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


kaiser2nd 07-25-2019 16:29

Re: No Perm No Chat Sound
 
You already made a thread for this.

Cruze 08-23-2019 12:47

Re: No Perm No Chat Sound
 
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;




All times are GMT -4. The time now is 03:19.

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