Oyundayken /unammo yazdığımızda bize $4000 dolar a 15 saniyelik (süresini cvar ile ayaliyabilelim) unammo verse ?
Paralı Unammo
)

#include <amxmodx>
#include <fakemeta_util>
#include <hamsandwich>
#include <reapi>
new const PLUGIN[] = "Unammo";
new const VERSION[] = "1.0";
new const AUTHOR[] = "By.KinG";
new const TAG[] = "WebAilesi GaminG";
new const Max_Clip_Ammo[] = { 0, 13, 0, 10, 0, 7, 0, 30, 30, 0, 15, 20, 25, 30, 35, 25, 12, 20, 10, 30, 100, 8, 30, 30, 20, 0, 7, 30, 30, 0, 50 }
new bool: Unammo[33], Cvar;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /unammo", "Unammo_Al");
register_event("CurWeapon", "Event_CurWeapon", "be", "1=1");
Cvar = register_cvar("unammo_sure", "15");
}
public client_putinserver(ID)
{
Unammo[ID] = false;
}
public Unammo_Al(ID)
{
if(get_member(ID, m_iAccount) >= 4000)
{
Unammo[ID] = true;
set_task(get_pcvar_float(Cvar), "Unammo_Off", ID);
Renkli_Yazi(ID, "^1[^3%s^1] ^4Basarili Bir Sekilde ^3Unammo ^4Satin Aldin", TAG);
}
else Renkli_Yazi(ID, "^1[^3%s^1] ^4Yetersiz Bakiye^1.^4Gereken ^1:^3 4000$", TAG);
}
public Unammo_Off(ID)
{
Unammo[ID] = false;
}
public Event_CurWeapon(ID)
{
new Weapon = read_data(2);
if(Unammo[ID] && is_user_alive(ID))
{
if(!(((1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4)) & (1<<Weapon)))
{
set_pdata_int(get_pdata_cbase(ID, 373), 51, Max_Clip_Ammo[Weapon], 4);
}
}
}
stock Renkli_Yazi(const ID, const input[], any:...)
{
new Count = 1, Players[32];
static Message[191];
vformat(Message, 190, input, 3);
replace_all(Message, 190, "^1", "^x01");
replace_all(Message, 190, "^4", "^x04");
replace_all(Message, 190, "^3", "^x03");
if(ID) Players[0] = ID; else get_players(Players, Count, "ch");
{
for(new i = 0; i < Count; i++)
{
if(is_user_connected(Players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, Players[i]);
write_byte(Players[i]);
write_string(Message);
message_end();
}
}
}
}
(04-04-2020, 22:04)By.KinG Adlı Kullanıcıdan Alıntı: Hemen yapıyorumPHP Kod:#include <amxmodx>
#include <fakemeta_util>
#include <hamsandwich>
#include <reapi>
new const PLUGIN[] = "Unammo";
new const VERSION[] = "1.0";
new const AUTHOR[] = "By.KinG";
new const TAG[] = "WebAilesi GaminG";
new const Max_Clip_Ammo[] = { 0, 13, 0, 10, 0, 7, 0, 30, 30, 0, 15, 20, 25, 30, 35, 25, 12, 20, 10, 30, 100, 8, 30, 30, 20, 0, 7, 30, 30, 0, 50 }
new bool: Unammo[33], Cvar;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /unammo", "Unammo_Al");
register_event("CurWeapon", "Event_CurWeapon", "be", "1=1");
Cvar = register_cvar("unammo_sure", "15");
}
public client_putinserver(ID)
{
Unammo[ID] = false;
}
public Unammo_Al(ID)
{
if(get_member(ID, m_iAccount) >= 4000)
{
Unammo[ID] = true;
set_task(get_pcvar_float(Cvar), "Unammo_Off", ID);
Renkli_Yazi(ID, "^1[^3%s^1] ^4Basarili Bir Sekilde ^3Unammo ^4Satin Aldin", TAG);
}
else Renkli_Yazi(ID, "^1[^3%s^1] ^4Yetersiz Bakiye^1.^4Gereken ^1:^3 4000$", TAG);
}
public Unammo_Off(ID)
{
Unammo[ID] = false;
}
public Event_CurWeapon(ID)
{
new Weapon = read_data(2);
if(Unammo[ID] && is_user_alive(ID))
{
if(!(((1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4)) & (1<<Weapon)))
{
set_pdata_int(get_pdata_cbase(ID, 373), 51, Max_Clip_Ammo[Weapon], 4);
}
}
}
stock Renkli_Yazi(const ID, const input[], any:...)
{
new Count = 1, Players[32];
static Message[191];
vformat(Message, 190, input, 3);
replace_all(Message, 190, "^1", "^x01");
replace_all(Message, 190, "^4", "^x04");
replace_all(Message, 190, "^3", "^x03");
if(ID) Players[0] = ID; else get_players(Players, Count, "ch");
{
for(new i = 0; i < Count; i++)
{
if(is_user_connected(Players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, Players[i]);
write_byte(Players[i]);
write_string(Message);
message_end();
}
}
}
}
(05-04-2020, 00:19)By.KinG Adlı Kullanıcıdan Alıntı: Bundan sonra tüm her şeyi konuya yazın ki daha hızlı çözebilelim ayrıca ölen kişide unammo varsa otomatik kapatma da ekledim.Eklentiyi kendi sunucumda denedim 1 tur geçtikten sonra otomatik olarak CT takımında bozuluyor parasız alınıyor ve hazirlik zamanında alınıyor