Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ozel Mesaj Plugini
#1
Selamun aleykum. Simdi aklima soyle birsey geldi eger pluginci arkadasların elinden gelirse cok iyi olur.

Fikir şu: Serverlardaki admin ve slotlara serverdaki yonetıcıler tarafından cezayi işlem uygulandıgında bu gibi cezalardan dogrudan haberi olmalari icin servera ilk girislerinde ekranın ortasında HUD mesaji ile "Ozel mesajiniz var!" diye bir yazı geçecek. O mesajida sadece server yoneticileri atabilecek admin veya slot ise /mesajlarim yazarak kendisine dogrudan bir mesaj bırakılıp bırakılmadıgını kontrol edebilecek. Eger mesaj yoksa "Ozel bir mesajiniz yok." diye bir yazı gececek saydan burdaki amaç; Yoneticiler adminlerine veya slotlarına ceza işlemi uyguladıklarında kişilerin hangi sebebten kac gun ceza yediklerinden haberdar olmaları ve bu mesajı panelden ozel bir .txt dosyasıyla duzenlenebilme olanagı olsun. Mesela ben "asd" nickli adama bir ozel mesaj iletmek istiyorum servera girisinde gorsun diye. En basitinden ornek vermek gerekirse....

"oyuncunun nicki" "burayada o kişiye iletilecek mesaj yazilsin"

yukardaki şekildeki gibi eğer pluginci arkadaslardan boyle bir plugini yapma şansları varsa sevinirim tesekkurler okudugunuz icin kolay gelsin...
CS 1.6 TR 1.Sİ DEATHRUN Server IP: | 95.173.172.7 |RsT # DEATHRUN - www.rstgaming.netServer IP: 95.173.172.7 & dr.rstgaming.netWeb: www.rstgaming.net
Reply
#2
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Ozel Mesaj TXT"
#define VERSION "1.0"
#define AUTHOR "akcaliberkk"

#define TASK_HUD  8765

new file[] = "addons/amxmodx/configs/mesajlar.txt";
new 
bool:gChecked[33];

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /mesajlarim","ShowMessage");
}
public 
ShowMessage(id) {
    
gChecked[id] = true;
    
    new 
message[200],bool:newmessage;
    new 
bool:has has_user_message(id,message,charsmax(message),newmessage);
    if(!
has) {
        
ColorChat(id,"^3[Ozel Mesaj] ^4Ozel mesajiniz bulunmamaktadir.");
        return 
PLUGIN_HANDLED
    
}
    if(!
newmessage) {
        
ColorChat(id,"^3[Ozel Mesaj] ^4Bir okunmus mesaj bulundu:");
        
ColorChat(id,"^3*** ^4%s",message);
        return 
PLUGIN_HANDLED
    
}
    
ColorChat(id,"^3[Ozel Mesaj] ^4Bir okunmamis mesaj bulundu:");
    
ColorChat(id,"^3*** ^4%s",message);
    
set_read(id);
    return 
PLUGIN_HANDLED
}

public 
client_putinserver(id) {
    
gChecked[id] = false;
    new 
message[200], bool:newmessage;
    if(
has_user_message(id,message,charsmax(message),newmessage)) {
        if(
newmessage) {
            
set_task(5.0,"ShowHud",id+TASK_HUD);
        }
    }
}
public 
ShowHud(id) {
    
id-=TASK_HUD;
    if(!
is_user_connected(id)) return PLUGIN_HANDLED
    
    set_hudmessage
(025542, -1.0, -1.001.01.0)
    
show_hudmessage(id"Adiniza Kayitli^n Okunmamis Ozel Mesajiniz Bulunuyor^nKontrol Etmek Icin:^n^n/mesajlarim Yaziniz.")
    if(!
gChecked[id]) set_task(1.0,"ShowHud",id+TASK_HUD);
    
    return 
PLUGIN_HANDLED
}
stock set_read(id) {
    new 
=fopen(file,"a+");
    new 
tempfile[] = "addons/amxmodx/configs/a123temp.txt";
    new 
tf fopen(tempfile,"a+");
    
    new 
name[32];
    
get_user_name(id,name,31);
    new 
buffer[256];
    new 
szName[32], szMessage[200], szCheck[6];
    
    while(
fgets(f,buffer,charsmax(buffer))) {
        
parse(buffer,szName,charsmax(szName),szMessage,charsmax(szMessage),szCheck,charsmax(szCheck));
        if(!
equali(szName,name)) {
            
fprintf(tf,"%s",buffer);
            } else {
            
fprintf(tf,"^"%s^" ^"%s^" ^"1^"^n",szName,szMessage)
        }
    }
    
fclose(f)
    
fclose(tf)
    
delete_file(file);
    
rename_file(tempfile,file,1);
    
}
stock bool:has_user_message(idmessage[],msglen, &bool:newmessage) {
    new 
fopen(file,"rt");
    
    new 
name[32];
    
get_user_name(id,name,31);
    
newmessage false;
    
    new 
buffer[256];
    new 
szName[32], szMessage[200], szCheck[6];
    new 
check;
    while(
fgets(f,buffer,charsmax(buffer))) {
        
parse(buffer,szName,charsmax(szName),szMessage,charsmax(szMessage),szCheck,charsmax(szCheck))
        
check str_to_num(szCheck);
        if(
equali(szName,name)) {
            if(!
checknewmessage true;
            
copy(message,msglen,szMessage);
            
fclose(f);
            return 
true;
        }
    }
    
fclose(f);
    return 
false;
}
stock ColorChat(const id, const string[], {FloatSqlResul,_}:...) { 
    new 
msg[191], players[32], count 1
    
    static 
len
    
len formatex(msgcharsmax(msg), "^x01" ); 
    
vformat(msg[len], charsmax(msg) - lenstring3); 
    
    if(
id)players[0] = id
    else 
get_players(players,count,"ch"); 
    
    for (new 
0counti++){ 
        
        if(
is_user_connected(players[i])){ 
            
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"),_players); 
            
write_byte(players); 
            
write_string(msg); 
            
message_end(); 
        } 
    } 
    return; 


configs klasörüne mesajlar.txt dosyasını oluşturun.

Yazılışı:

"hedef isim" "gönderilecek mesaj" "0"

"0" ı koymayı unutmayın. Eğer "0", "1" e dönüşürse, bu hedef kişinin mesajı okuduğu anlamına gelir.[/i][/i][/i]


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
#3
Tesekkurler kardeşim eline sağlık.
CS 1.6 TR 1.Sİ DEATHRUN Server IP: | 95.173.172.7 |RsT # DEATHRUN - www.rstgaming.netServer IP: 95.173.172.7 & dr.rstgaming.netWeb: www.rstgaming.net
Reply
#4
Ct ye oto silah verme plugini istiyorum
Reply
#5
Sağol eline sağlık Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Mapa Göre Cvar plugini melof 8 9,378 16-11-20, 02:00
Last Post: es_Dark_Es
  Time 15 Plugini fenerbahce07 24 12,131 23-09-18, 03:19
Last Post: qalatas06
  toplantı plugini bihterr 22 10,684 08-10-17, 14:21
Last Post: kronossbey
  Hosgeldin Plugini hpph1294 9 6,848 03-09-17, 18:08
Last Post: tahayasin
  Jailbreak Banka Plugini sefatokgoz 8 8,134 03-09-17, 18:06
Last Post: tahayasin
  [İSTEK]Jb Verme Plugini (/mg) NorDan 8 12,917 03-09-17, 18:06
Last Post: tahayasin
  250 Hp Plugini Sadece R Yetkisinde Olsun GurkanCounter 8 10,877 03-09-17, 18:04
Last Post: tahayasin
  [JB] CT Özel Hook Grab Rope Plugini Nobb 21 10,721 03-09-17, 18:03
Last Post: tahayasin
  Adminlere Özel HP Lorenca 14 9,853 25-04-17, 17:29
Last Post: bahaduhan404
  Multi Jump [CT ÖZEL] Furkan Dize 7 3,781 01-04-17, 16:40
Last Post: muratbayar

Foruma Atla:


Users browsing this thread: 1 Guest(s)