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

[Ayuda] que agrego a mi antispam para que tenga inmunidad en admins


  
 
 
Thread Tools Display Modes
Author Message
MexPower
Veteran Member
Join Date: Nov 2012
Old 12-19-2012 , 20:02   [Ayuda] que agrego a mi antispam para que tenga inmunidad en admins
#1

Hola bueno queria que mi antispam tubiera inmunidad para admins con el flag de la letra "v" que los que tengan ese flag tengan inmunidad, alguien sabe que tengo que agregar en mi antispam?
MexPower is offline
GalaxyA
BANNED
Join Date: Sep 2012
Location: Noob Member
Old 12-19-2012 , 21:09   Re: [Ayuda] que agrego a mi antispam para que tenga inmunidad en admins
#2

Deja el antispam aca para ayudarte
GalaxyA is offline
Send a message via MSN to GalaxyA
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 12-19-2012 , 21:21   Re: [Ayuda] que agrego a mi antispam para que tenga inmunidad en admins
#3

Publicá el código de tu antispam y te lo agrego.

Edit: Galaxya me ganó xD tenía el post cargado por eso la diferencia horaria
__________________

Last edited by Neeeeeeeeeel.-; 12-19-2012 at 21:22.
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
MexPower
Veteran Member
Join Date: Nov 2012
Old 12-19-2012 , 23:34   Re: [Ayuda] que agrego a mi antispam para que tenga inmunidad en admins
#4

Hai ta
PHP Code:
#include <amxmodx> 

#define MAX_DIGITS 4 

new Array:g_aWords,g_iSize 
new g_msgSayText  

public plugin_init() 

    
register_plugin"AntiSpam","1.0","Manu" 
    
g_msgSayText get_user_msgid("SayText")
     
    
register_clcmd"say","clcmd_say" 
    
register_clcmd"say_team","clcmd_say" 
     
    
fn_Words( ) 


public 
clcmd_sayid 

    static 
sArgs192 ];read_argssArgs,191 
     
    
trimsArgs );remove_quotessArgs 
     
    if( 
fn_ChecksArgs ) ) 
    { 
        
client_printcolor(id,"!t[Mexican Power] !gEL SPAM ESTA PROHIBIDO EN ESTE SERVIDOR!" 
         
        return 
PLUGIN_HANDLED
    } 
     
    return 
PLUGIN_CONTINUE 


stock fn_Check( const string[] ) 

    static 
iCount,i,sWord16 ];iCount 
     
    
for( 0;strlen( string );i++ ) 
    { 
        if( 
isdigitstring] ) ) 
        { 
            if( ++
iCount MAX_DIGITS 
                return 
true
        } 
    } 
     
    if( !
g_iSize 
        return 
false
     
    for( 
0;g_iSize;i++ ) 
    { 
        
ArrayGetStringg_aWords,i,sWord,15 
         
        if( (
containistring,sWord ) >= 0) ) 
            return 
true
    } 
     
    return 
false


stock fn_Words( ) 

    new 
file64 ],f,data16 ];get_localinfo"amxx_configsdir",file,63 
     
    
addfile,63,"/antispam.ini" );g_aWords ArrayCreate16,
     
    if( !
file_existsfile ) ) 
    { 
        
fopenfile,"wt" 
         
        
fputsf,"; Archivo creado automaticamente .-^n" 
        
fputsf,"; Agrega tus palabras a bloquear en el say una debajo de otra^n^n" 
         
        
fputsf,"puto^n" 
        
fputsf,".com" 
         
        
fclose
         
        return; 
    } 
     
    
fopenfile,"rt" 
     
    while( !
feof) ) 
    { 
        
fgetsf,data,15 
         
        
replace_alldata,15,"^n","" 
         
        if( 
data] == ';' || !data] ) 
            continue 
         
        
ArrayPushStringg_aWords,data 
    } 
     
    
g_iSize ArraySizeg_aWords 
     
    
fclose
}  
stock client_printcolor(const id, const input[], any:...)
{
    new 
iCount 1iPlayers[32]
    
    static 
szMsg[191]
    
vformat(szMsgcharsmax(szMsg), input3)
    
    
replace_all(szMsg190"!g""^4"// verde
    
replace_all(szMsg190"!y""^1"// color default del cliente
    
replace_all(szMsg190"!t""^3"// color del team
    
replace_all(szMsg190"/w""^0"// color del team
    
    
if(idiPlayers[0] = id
    
else get_players(iPlayersiCount"ch")
        
    for (new 
0iCounti++)
    {
        if (
is_user_connected(iPlayers[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEg_msgSayText_iPlayers[i])
            
write_byte(iPlayers[i])
            
write_string(szMsg)
            
message_end()
        }
    }
}  

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang2058\\ f0\\ fs16 \n\\ par }
*/ 
MexPower is offline
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 12-20-2012 , 00:13   Re: [Ayuda] que agrego a mi antispam para que tenga inmunidad en admins
#5

PHP Code:
public clcmd_sayid )  
{  
    static 
sArgs192 ];read_argssArgs,191 )  
      
    
trimsArgs );remove_quotessArgs )  
      
    if( 
fn_ChecksArgs ) && !is_user_admin(id))  
    {  
        
client_printcolor(id,"!t[Mexican Power] !gEL SPAM ESTA PROHIBIDO EN ESTE SERVIDOR!" )  
          
        return 
PLUGIN_HANDLED;  
    }  
      
    return 
PLUGIN_CONTINUE  

__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"

Last edited by Roccoxx; 12-20-2012 at 00:14.
Roccoxx is offline
Send a message via MSN to Roccoxx
LeeanAndNeka
Senior Member
Join Date: Feb 2012
Location: Argentina ♥
Old 12-20-2012 , 09:29   Re: [Ayuda] que agrego a mi antispam para que tenga inmunidad en admins
#6

No existe el flag "v"
LeeanAndNeka is offline
Send a message via MSN to LeeanAndNeka Send a message via Skype™ to LeeanAndNeka
MexPower
Veteran Member
Join Date: Nov 2012
Old 12-20-2012 , 13:46   Re: [Ayuda] que agrego a mi antispam para que tenga inmunidad en admins
#7

Bueno y como lo defino para un flag el que sea
MexPower is offline
GalaxyA
BANNED
Join Date: Sep 2012
Location: Noob Member
Old 12-20-2012 , 13:54   Re: [Ayuda] que agrego a mi antispam para que tenga inmunidad en admins
#8

Quote:
Originally Posted by MexPower View Post
Bueno y como lo defino para un flag el que sea
Como dijo roccoxx
Quote:
Originally Posted by Roccoxx View Post
PHP Code:
public clcmd_sayid )  
{  
    static 
sArgs192 ];read_argssArgs,191 )  
      
    
trimsArgs );remove_quotessArgs )  
      
    if( 
fn_ChecksArgs ) && !is_user_admin(id))  
    {  
        
client_printcolor(id,"!t[Mexican Power] !gEL SPAM ESTA PROHIBIDO EN ESTE SERVIDOR!" )  
          
        return 
PLUGIN_HANDLED;  
    }  
      
    return 
PLUGIN_CONTINUE  

Modifica esta linea:
PHP Code:
 if( fn_ChecksArgs ) && !is_user_admin(id)) 
------->
PHP Code:
 if( fn_ChecksArgs ) && !get_user_flags(id) & ADMIN_LEVEL_T
Los que tengan el flag T cumpliran lo que dijistes tu
GalaxyA is offline
Send a message via MSN to GalaxyA
MexPower
Veteran Member
Join Date: Nov 2012
Old 12-20-2012 , 13:58   Re: [Ayuda] que agrego a mi antispam para que tenga inmunidad en admins
#9

a okey muchas gracias ya esta
MexPower is offline
LeeanAndNeka
Senior Member
Join Date: Feb 2012
Location: Argentina ♥
Old 12-20-2012 , 15:54   Re: [Ayuda] que agrego a mi antispam para que tenga inmunidad en admins
#10

Quote:
Originally Posted by GalaxyA View Post
PHP Code:
 if( fn_ChecksArgs ) && !get_user_flags(id) & ADMIN_LEVEL_T
Los que tengan el flag T cumpliran lo que dijistes tu
PHP Code:
ADMIN_LEVEL_T == 'WHAT THE FUCK?' 

PHP Code:
//FLAG T
ADMIN_LEVEL_H 

Last edited by LeeanAndNeka; 12-20-2012 at 15:54.
LeeanAndNeka is offline
Send a message via MSN to LeeanAndNeka Send a message via Skype™ to LeeanAndNeka
 



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 08:34.


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