Merhabalar,
Çok basit bir eklenti rica ediyorum; Bir User Bir Usere bıçak ve awp ile öldürdüğü zaman saydan Renkli bir şekilde Şu Nickli Oyuncu Şu nickli Oyuncuya bıcak ile kesti tarzı bir yazı yazsın yazıyı ben editlerim..
Awpde ise yazı daha farklı olsun Bu eklentide yardım edecek dostlarıma şimdiden teşekkür ediyorum.
Konu
Dene bakalım;
Rakibin isminin chatte yazmasını istiyorsan;
PHP Kod:
#include <amxmodx>
#include <reapi>
new const iTag[] = "Webailesi";
new Messages[][][] =
{
{ 0, "" }, // 0
{ CSW_AWP, "Adli oyuncu awp ile rakibi yok etti !" }, // 1
{ CSW_KNIFE, "Adli oyuncu bicak ile rakibi cizdi !" } // 2
};
public plugin_init()
{
register_plugin("KillMessage", "0.1", "LyNcH");
RegisterHookChain(RG_CBasePlayer_Killed, "@CBasePlayer_Killed", .post = true);
}
@CBasePlayer_Killed(const this, pevAttacker)
{
if(this == pevAttacker || !is_user_connected(pevAttacker))
{
return;
}
new Weapon = get_user_weapon(pevAttacker);
for(new i = 1; i <= sizeof(Messages); i++)
{
if(Weapon == Messages[i][0][0])
{
client_print_color(0,0, "^1[^3%s^1] ^3%n ^4%s", iTag, pevAttacker, Messages[i][1][0]);
}
}
}
PHP Kod:
#include <amxmodx>
#include <reapi>
new const iTag[] = "Webailesi";
new Messages[][][] =
{
{ 0, "", "" }, // 0
{ CSW_AWP, "Adli oyuncu awp ile", "adli rakibi yok etti" }, // 1
{ CSW_KNIFE, "Adli oyuncu bicak ile", "adli rakibi cizdi" } // 2
};
public plugin_init()
{
register_plugin("KillMessage", "0.1", "LyNcH");
RegisterHookChain(RG_CBasePlayer_Killed, "@CBasePlayer_Killed", .post = true);
}
@CBasePlayer_Killed(const this, pevAttacker)
{
if(this == pevAttacker || !is_user_connected(pevAttacker))
{
return;
}
new Weapon = get_user_weapon(pevAttacker);
for(new i = 1; i <= sizeof(Messages); i++)
{
if(Weapon == Messages[i][0][0])
{
client_print_color(0,0, "^1[^3%s^1] ^3%n ^4%s ^3%n ^4%s", iTag, pevAttacker, Messages[i][1][0], this, Messages[i][2][0]);
}
}
}
Admin olan oyuncularda eklenti çalışmayacaktır.
WebAilesi yazan yeri kendinize göre editlemeyi unutmayın.
%s %n kısımlarına dokunmadan yazıları editleyin.
Eklenti :
Kod:
new const sayTag[] = "WebAilesi";Kod:
"^1<^4%s^1> ^3%n ^4isimli oyuncu ^3%n ^4isimli oyuncuyu ^1bicak ile kesti."
"^1<^4%s^1> ^3%n ^4isimli oyuncu ^3%n ^4isimli oyuncuyu ^1Awp ile oldurdu."Eklenti :
PHP Kod:
#include <amxmodx>
#include <reapi>
#pragma semicolon 1
new const sayTag[] = "WebAilesi";
public plugin_init(){
register_plugin("Silahla oldurunce Yazi","1.0","suriyelikene");
RegisterHookChain(RG_CBasePlayer_Killed, "@PlayerKill", .post = true);
}
@PlayerKill(const pVictim, pAttacker, iGib){
if(!is_user_connected(pAttacker) || !is_user_connected(pVictim) || pVictim == pAttacker ||
~get_user_flags(pVictim) & ADMIN_USER || ~get_user_flags(pAttacker) & ADMIN_USER){
return;
}
switch(get_user_weapon(pAttacker)){
case CSW_KNIFE: client_print_color(0,0, "^1<^4%s^1> ^3%n ^4isimli oyuncu ^3%n ^4isimli oyuncuyu ^1bicak ile kesti.",sayTag ,pAttacker ,pVictim);
case CSW_AWP: client_print_color(0,0, "^1<^4%s^1> ^3%n ^4isimli oyuncu ^3%n ^4isimli oyuncuyu ^1Awp ile oldurdu.",sayTag ,pAttacker ,pVictim);
}
}
(11-04-2022, 16:07)orucoglukayra Adlı Kullanıcıdan Alıntı: Dene bakalım;Rakibin isminin chatte yazmasını istiyorsan;PHP Kod:#include <amxmodx>
#include <reapi>
new const iTag[] = "Webailesi";
new Messages[][][] =
{
{ 0, "" }, // 0
{ CSW_AWP, "Adli oyuncu awp ile rakibi yok etti !" }, // 1
{ CSW_KNIFE, "Adli oyuncu bicak ile rakibi cizdi !" } // 2
};
public plugin_init()
{
register_plugin("KillMessage", "0.1", "LyNcH");
RegisterHookChain(RG_CBasePlayer_Killed, "@CBasePlayer_Killed", .post = true);
}
@CBasePlayer_Killed(const this, pevAttacker)
{
if(this == pevAttacker || !is_user_connected(pevAttacker))
{
return;
}
new Weapon = get_user_weapon(pevAttacker);
for(new i = 1; i <= sizeof(Messages); i++)
{
if(Weapon == Messages[i][0][0])
{
client_print_color(0,0, "^1[^3%s^1] ^3%n ^4%s", iTag, pevAttacker, Messages[i][1][0]);
}
}
}PHP Kod:#include <amxmodx>
#include <reapi>
new const iTag[] = "Webailesi";
new Messages[][][] =
{
{ 0, "", "" }, // 0
{ CSW_AWP, "Adli oyuncu awp ile", "adli rakibi yok etti" }, // 1
{ CSW_KNIFE, "Adli oyuncu bicak ile", "adli rakibi cizdi" } // 2
};
public plugin_init()
{
register_plugin("KillMessage", "0.1", "LyNcH");
RegisterHookChain(RG_CBasePlayer_Killed, "@CBasePlayer_Killed", .post = true);
}
@CBasePlayer_Killed(const this, pevAttacker)
{
if(this == pevAttacker || !is_user_connected(pevAttacker))
{
return;
}
new Weapon = get_user_weapon(pevAttacker);
for(new i = 1; i <= sizeof(Messages); i++)
{
if(Weapon == Messages[i][0][0])
{
client_print_color(0,0, "^1[^3%s^1] ^3%n ^4%s ^3%n ^4%s", iTag, pevAttacker, Messages[i][1][0], this, Messages[i][2][0]);
}
}
}
sizeof kullanmanızı tavsiye etmiyorum.
MawiŞ*
(11-04-2022, 16:15)suriyelikene Adlı Kullanıcıdan Alıntı: Admin olan oyuncularda eklenti çalışmayacaktır.WebAilesi yazan yeri kendinize göre editlemeyi unutmayın.Kod:new const sayTag[] = "WebAilesi";%s %n kısımlarına dokunmadan yazıları editleyin.Kod:"^1<^4%s^1> ^3%n ^4isimli oyuncu ^3%n ^4isimli oyuncuyu ^1bicak ile kesti."
"^1<^4%s^1> ^3%n ^4isimli oyuncu ^3%n ^4isimli oyuncuyu ^1Awp ile oldurdu."
Eklenti :PHP Kod:#include <amxmodx>
#include <reapi>
#pragma semicolon 1
new const sayTag[] = "WebAilesi";
public plugin_init(){
register_plugin("Silahla oldurunce Yazi","1.0","suriyelikene");
RegisterHookChain(RG_CBasePlayer_Killed, "@PlayerKill", .post = true);
}
@PlayerKill(const pVictim, pAttacker, iGib){
if(!is_user_connected(pAttacker) || !is_user_connected(pVictim) || pVictim == pAttacker ||
~get_user_flags(pVictim) & ADMIN_USER || ~get_user_flags(pAttacker) & ADMIN_USER){
return;
}
switch(get_user_weapon(pAttacker)){
case CSW_KNIFE: client_print_color(0,0, "^1<^4%s^1> ^3%n ^4isimli oyuncu ^3%n ^4isimli oyuncuyu ^1bicak ile kesti.",sayTag ,pAttacker ,pVictim);
case CSW_AWP: client_print_color(0,0, "^1<^4%s^1> ^3%n ^4isimli oyuncu ^3%n ^4isimli oyuncuyu ^1Awp ile oldurdu.",sayTag ,pAttacker ,pVictim);
}
}
Eklentinin Herkeste Çalışmasını Sağlayabilir misiniz? Herkes için geçerli olmasını rica ediyorum
Eklenti Sorunsuz Çalışıyor Adminler de de çalışabilir konuma getirilse bu iş tamamdır.
Son Düzenleme: 12-04-2022, 00:31, Düzenleyen: SchnAps.
User üzerinden anlatınca sadece userlera özel olacak sandım. Daha açık olmanızı rica ediyorum.
PHP Kod:
#include <amxmodx>
#include <reapi>
#pragma semicolon 1
new const sayTag[] = "WebAilesi";
public plugin_init(){
register_plugin("Silahla oldurunce Yazi","1.0","suriyelikene");
RegisterHookChain(RG_CBasePlayer_Killed, "@PlayerKill", .post = true);
}
@PlayerKill(const pVictim, pAttacker, iGib){
if(!is_user_connected(pAttacker) || !is_user_connected(pVictim) || pVictim == pAttacker){
return;
}
switch(get_user_weapon(pAttacker)){
case CSW_KNIFE: client_print_color(0,0, "^1<^4%s^1> ^3%n ^4isimli oyuncu ^3%n ^4isimli oyuncuyu ^1bicak ile kesti.",sayTag ,pAttacker ,pVictim);
case CSW_AWP: client_print_color(0,0, "^1<^4%s^1> ^3%n ^4isimli oyuncu ^3%n ^4isimli oyuncuyu ^1Awp ile oldurdu.",sayTag ,pAttacker ,pVictim);
}
}
İstek konusu, @"suriyelikene" adlı kullanıcı tarafından 1 gün içinde çözülmüştür.
İsteği çözdüğü için suriyelikene Adlı kullanıcıya 1 rep puanı ve 1 yardım etme puanı otomatik olarak verilmiştir.
suriyelikene Adlı kullanıcı sizin dışınızda toplam 1017 kişiye yardım etmiştir.
Herhangi bir konuda hata olduğunu düşünüyorsanız destek sistemi üzerinden iletişim kurabilirsiniz.
İsteği çözdüğü için suriyelikene Adlı kullanıcıya 1 rep puanı ve 1 yardım etme puanı otomatik olarak verilmiştir.
suriyelikene Adlı kullanıcı sizin dışınızda toplam 1017 kişiye yardım etmiştir.
Herhangi bir konuda hata olduğunu düşünüyorsanız destek sistemi üzerinden iletişim kurabilirsiniz.
Benzer Konular
Yorum
211
Okunma
01-08-2026, 12:00
Yorum
113
Okunma
31-07-2026, 12:33
Yorum
180
Okunma
29-07-2026, 22:31
Yorum
264
Okunma
29-07-2026, 21:51
Yorum
272
Okunma
29-07-2026, 12:05
)

