merhaba arkadaslar dm sw ye gore /bonus yazınca farklı seyleırn vermesı mp armor vesaire ama bonus icindekilerin cok olması lazım
saygılarımla
saygılarımla
)

#include <amxmodx>
#include <reapi>
#define PLUGIN "[ZP] Random Bonus System"
#define VERSION "1.1"
#define AUTHOR "Gemini"
const Float:BONUS_HEALTH_VALUE = 50.0;
const Float:BONUS_ARMOR_VALUE = 25.0;
const Float:BONUS_SPEED_VALUE = 400.0;
const Float:BONUS_SPEED_TIME = 10.0;
const Float:BONUS_GRAVITY_VALUE = 0.5;
const Float:BONUS_GRAVITY_TIME = 15.0;
new bool:g_bHasSpeed[MAX_CLIENTS + 1];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /bonus", "Cmd_Bonus");
register_clcmd("say_team /bonus", "Cmd_Bonus");
RegisterHookChain(RG_CBasePlayer_ResetMaxSpeed, "@CBasePlayer_ResetMaxSpeed_Post", .post = true);
}
public client_disconnected(id)
{
g_bHasSpeed[id] = false;
}
@CBasePlayer_ResetMaxSpeed_Post(const id)
{
if (!is_user_alive(id) || !g_bHasSpeed[id])
return;
set_entvar(id, var_maxspeed, BONUS_SPEED_VALUE);
}
public Cmd_Bonus(id)
{
if (!is_user_alive(id))
{
client_print_color(id, print_team_default, "^4[Bonus] ^1Ölüyken bonus alamazsın!");
return PLUGIN_HANDLED;
}
new iRandom = random_num(0, 4);
switch (iRandom)
{
case 0: Give_HP(id);
case 1: Give_Armor(id);
case 2: Give_Speed(id);
case 3: Give_Glow(id);
case 4: Give_Gravity(id);
}
return PLUGIN_HANDLED;
}
Give_HP(id)
{
new Float:fHealth;
get_entvar(id, var_health, fHealth);
set_entvar(id, var_health, fHealth + BONUS_HEALTH_VALUE);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3+%.0f HP ^1geldi!", BONUS_HEALTH_VALUE);
}
Give_Armor(id)
{
new Float:fArmor;
get_entvar(id, var_armorvalue, fArmor);
set_entvar(id, var_armorvalue, fArmor + BONUS_ARMOR_VALUE);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3+%.0f Armor ^1geldi!", BONUS_ARMOR_VALUE);
}
Give_Speed(id)
{
g_bHasSpeed[id] = true;
rg_reset_maxspeed(id);
set_task(BONUS_SPEED_TIME, "Remove_Speed", id);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3Hız ^1geldi! (%.0f Saniye)", BONUS_SPEED_TIME);
}
public Remove_Speed(id)
{
if (is_user_connected(id))
{
g_bHasSpeed[id] = false;
if (is_user_alive(id))
{
rg_reset_maxspeed(id);
client_print_color(id, print_team_default, "^4[Bonus] ^1Hız etkisinin süresi doldu.");
}
}
}
Give_Gravity(id)
{
set_entvar(id, var_gravity, BONUS_GRAVITY_VALUE);
set_task(BONUS_GRAVITY_TIME, "Remove_Gravity", id);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3Düşük Yerçekimi ^1geldi! (%.0f Saniye)", BONUS_GRAVITY_TIME);
}
public Remove_Gravity(id)
{
if (is_user_alive(id))
{
set_entvar(id, var_gravity, 1.0);
client_print_color(id, print_team_default, "^4[Bonus] ^1Yerçekimi normale döndü.");
}
}
Give_Glow(id)
{
new Float:fColor[3];
fColor[0] = random_float(0.0, 255.0);
fColor[1] = random_float(0.0, 255.0);
fColor[2] = random_float(0.0, 255.0);
set_entvar(id, var_renderfx, kRenderFxGlowShell);
set_entvar(id, var_rendercolor, fColor);
set_entvar(id, var_rendermode, kRenderNormal);
set_entvar(id, var_renderamt, 16.0);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3Parlama Efekti ^1geldi!");
}(07-03-2026, 02:13)Serpentraz Adlı Kullanıcıdan Alıntı:malesef calısmadıBu tür basit eklentileri yapay zekaya yaptırabilirsinizKod:#include <amxmodx>
#include <reapi>
#define PLUGIN "[ZP] Random Bonus System"
#define VERSION "1.1"
#define AUTHOR "Gemini"
const Float:BONUS_HEALTH_VALUE = 50.0;
const Float:BONUS_ARMOR_VALUE = 25.0;
const Float:BONUS_SPEED_VALUE = 400.0;
const Float:BONUS_SPEED_TIME = 10.0;
const Float:BONUS_GRAVITY_VALUE = 0.5;
const Float:BONUS_GRAVITY_TIME = 15.0;
new bool:g_bHasSpeed[MAX_CLIENTS + 1];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /bonus", "Cmd_Bonus");
register_clcmd("say_team /bonus", "Cmd_Bonus");
RegisterHookChain(RG_CBasePlayer_ResetMaxSpeed, "@CBasePlayer_ResetMaxSpeed_Post", .post = true);
}
public client_disconnected(id)
{
g_bHasSpeed[id] = false;
}
@CBasePlayer_ResetMaxSpeed_Post(const id)
{
if (!is_user_alive(id) || !g_bHasSpeed[id])
return;
set_entvar(id, var_maxspeed, BONUS_SPEED_VALUE);
}
public Cmd_Bonus(id)
{
if (!is_user_alive(id))
{
client_print_color(id, print_team_default, "^4[Bonus] ^1Ölüyken bonus alamazsın!");
return PLUGIN_HANDLED;
}
new iRandom = random_num(0, 4);
switch (iRandom)
{
case 0: Give_HP(id);
case 1: Give_Armor(id);
case 2: Give_Speed(id);
case 3: Give_Glow(id);
case 4: Give_Gravity(id);
}
return PLUGIN_HANDLED;
}
Give_HP(id)
{
new Float:fHealth;
get_entvar(id, var_health, fHealth);
set_entvar(id, var_health, fHealth + BONUS_HEALTH_VALUE);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3+%.0f HP ^1geldi!", BONUS_HEALTH_VALUE);
}
Give_Armor(id)
{
new Float:fArmor;
get_entvar(id, var_armorvalue, fArmor);
set_entvar(id, var_armorvalue, fArmor + BONUS_ARMOR_VALUE);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3+%.0f Armor ^1geldi!", BONUS_ARMOR_VALUE);
}
Give_Speed(id)
{
g_bHasSpeed[id] = true;
rg_reset_maxspeed(id);
set_task(BONUS_SPEED_TIME, "Remove_Speed", id);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3Hız ^1geldi! (%.0f Saniye)", BONUS_SPEED_TIME);
}
public Remove_Speed(id)
{
if (is_user_connected(id))
{
g_bHasSpeed[id] = false;
if (is_user_alive(id))
{
rg_reset_maxspeed(id);
client_print_color(id, print_team_default, "^4[Bonus] ^1Hız etkisinin süresi doldu.");
}
}
}
Give_Gravity(id)
{
set_entvar(id, var_gravity, BONUS_GRAVITY_VALUE);
set_task(BONUS_GRAVITY_TIME, "Remove_Gravity", id);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3Düşük Yerçekimi ^1geldi! (%.0f Saniye)", BONUS_GRAVITY_TIME);
}
public Remove_Gravity(id)
{
if (is_user_alive(id))
{
set_entvar(id, var_gravity, 1.0);
client_print_color(id, print_team_default, "^4[Bonus] ^1Yerçekimi normale döndü.");
}
}
Give_Glow(id)
{
new Float:fColor[3];
fColor[0] = random_float(0.0, 255.0);
fColor[1] = random_float(0.0, 255.0);
fColor[2] = random_float(0.0, 255.0);
set_entvar(id, var_renderfx, kRenderFxGlowShell);
set_entvar(id, var_rendercolor, fColor);
set_entvar(id, var_rendermode, kRenderNormal);
set_entvar(id, var_renderamt, 16.0);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3Parlama Efekti ^1geldi!");
}
(07-03-2026, 21:01)pamuk Adlı Kullanıcıdan Alıntı:bu yolladıgım bonusa armor sped glow ve gravity ekleyebılırmısın rıca etsem(07-03-2026, 02:13)Serpentraz Adlı Kullanıcıdan Alıntı:malesef calısmadıBu tür basit eklentileri yapay zekaya yaptırabilirsinizKod:#include <amxmodx>
#include <reapi>
#define PLUGIN "[ZP] Random Bonus System"
#define VERSION "1.1"
#define AUTHOR "Gemini"
const Float:BONUS_HEALTH_VALUE = 50.0;
const Float:BONUS_ARMOR_VALUE = 25.0;
const Float:BONUS_SPEED_VALUE = 400.0;
const Float:BONUS_SPEED_TIME = 10.0;
const Float:BONUS_GRAVITY_VALUE = 0.5;
const Float:BONUS_GRAVITY_TIME = 15.0;
new bool:g_bHasSpeed[MAX_CLIENTS + 1];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /bonus", "Cmd_Bonus");
register_clcmd("say_team /bonus", "Cmd_Bonus");
RegisterHookChain(RG_CBasePlayer_ResetMaxSpeed, "@CBasePlayer_ResetMaxSpeed_Post", .post = true);
}
public client_disconnected(id)
{
g_bHasSpeed[id] = false;
}
@CBasePlayer_ResetMaxSpeed_Post(const id)
{
if (!is_user_alive(id) || !g_bHasSpeed[id])
return;
set_entvar(id, var_maxspeed, BONUS_SPEED_VALUE);
}
public Cmd_Bonus(id)
{
if (!is_user_alive(id))
{
client_print_color(id, print_team_default, "^4[Bonus] ^1Ölüyken bonus alamazsın!");
return PLUGIN_HANDLED;
}
new iRandom = random_num(0, 4);
switch (iRandom)
{
case 0: Give_HP(id);
case 1: Give_Armor(id);
case 2: Give_Speed(id);
case 3: Give_Glow(id);
case 4: Give_Gravity(id);
}
return PLUGIN_HANDLED;
}
Give_HP(id)
{
new Float:fHealth;
get_entvar(id, var_health, fHealth);
set_entvar(id, var_health, fHealth + BONUS_HEALTH_VALUE);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3+%.0f HP ^1geldi!", BONUS_HEALTH_VALUE);
}
Give_Armor(id)
{
new Float:fArmor;
get_entvar(id, var_armorvalue, fArmor);
set_entvar(id, var_armorvalue, fArmor + BONUS_ARMOR_VALUE);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3+%.0f Armor ^1geldi!", BONUS_ARMOR_VALUE);
}
Give_Speed(id)
{
g_bHasSpeed[id] = true;
rg_reset_maxspeed(id);
set_task(BONUS_SPEED_TIME, "Remove_Speed", id);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3Hız ^1geldi! (%.0f Saniye)", BONUS_SPEED_TIME);
}
public Remove_Speed(id)
{
if (is_user_connected(id))
{
g_bHasSpeed[id] = false;
if (is_user_alive(id))
{
rg_reset_maxspeed(id);
client_print_color(id, print_team_default, "^4[Bonus] ^1Hız etkisinin süresi doldu.");
}
}
}
Give_Gravity(id)
{
set_entvar(id, var_gravity, BONUS_GRAVITY_VALUE);
set_task(BONUS_GRAVITY_TIME, "Remove_Gravity", id);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3Düşük Yerçekimi ^1geldi! (%.0f Saniye)", BONUS_GRAVITY_TIME);
}
public Remove_Gravity(id)
{
if (is_user_alive(id))
{
set_entvar(id, var_gravity, 1.0);
client_print_color(id, print_team_default, "^4[Bonus] ^1Yerçekimi normale döndü.");
}
}
Give_Glow(id)
{
new Float:fColor[3];
fColor[0] = random_float(0.0, 255.0);
fColor[1] = random_float(0.0, 255.0);
fColor[2] = random_float(0.0, 255.0);
set_entvar(id, var_renderfx, kRenderFxGlowShell);
set_entvar(id, var_rendercolor, fColor);
set_entvar(id, var_rendermode, kRenderNormal);
set_entvar(id, var_renderamt, 16.0);
client_print_color(id, print_team_default, "^4[Bonus] ^1Şansına ^3Parlama Efekti ^1geldi!");
}