Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Otoban
#6
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Reklam Onleyici"
#define VERSION "1.0"
#define AUTHOR "akcaliberkk"

new const file[] = "addons/amxmodx/configs/reklamban.ini";

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    if(!
file_exists(file)) {
        new 
fopen(file,"wt");
        
fclose(f);
    }
    
    
register_clcmd("say","HookSay")
    
register_clcmd("say_team","HookSay")
}
public 
HookSay(id) {
    new 
szSaid[248];
    
read_args(szSaid,247)
    
remove_quotes(szSaid)
    new 
szWord[64],szReason[64],szFlag[10];
    new 
LineText[148],txtlen;
    new 
maxlines file_size(file,1);
    new 
name[32];
    
get_user_name(id,name,31)
    for(new 
line;line<maxlines;line++) {
        
read_file(file,line,LineText,147,txtlen);
        
parse(LineText,szWord,63,szReason,63,szFlag,9)
        if(
containi(szSaid,szWord) != -1) {
            if(
equali(szFlag,"b")) {
                
server_cmd("amx_ban #%d 0 ^"%s^"",get_user_userid(id),szReason)
                
client_print(0,print_chat,"[OTOBAN] %s Adli Oyuncu Reklam Icerikli Mesajdan Dolayi Banlandi.",name)
            }
            else {
                
server_cmd("kick #%d ^"%s^"",get_user_userid(id),szReason)
                
client_print(0,print_chat,"[OTOKICK] %s Adli Oyuncu Reklam Icerikli Mesajdan Dolayi Atildi.",name)
            }
            break;
        }
    }
    return 
PLUGIN_HANDLED
    


reklamban.ini:
Code:
//"yasakli kelime" "atilma sebebi" "atilma metodu"
//Atılma metodları = b: Ban, k: Kick
//Örnek
"www.csplague.com" "Reklamdan dolayi banlandiniz" "b"
"123.123.123.123" "Reklamdan dolayi atildiniz" "k"


CS:GO ve CS 1.6 için ücretli eklenti yapılır.
Plugin yazmak isteyenlere yardımcı olabilirim.
Skype adresimden ulaşabilirsiniz:
destek_596
Steam: http://steamcommunity.com/id/ca-nemesis/

Reply


Messages In This Thread
Otoban - by melof - 12-05-13, 12:54
Cevap: Otoban - by kApO - 12-05-13, 13:11
Cevap: Otoban - by melof - 12-05-13, 13:38
Cevap: Otoban - by melof - 13-05-13, 17:45
Cevap: Otoban - by akcaliberkk - 13-05-13, 18:23
Cevap: Otoban - by melof - 13-05-13, 20:31
Cevap: Otoban - by akcaliberkk - 14-05-13, 19:26
Cevap: Otoban - by kApO - 12-05-13, 20:06

Foruma Atla:


Users browsing this thread: 1 Guest(s)