先打开zombie_plague40.sma
找(2165Line)
复制程式
// Reward ammo packs for every [ammo damage] dealt
将
复制程式
while (g_damagedealt[attacker] > get_pcvar_num(cvar_ammodamage))
{
g_ammopacks[attacker]++
g_damagedealt[attacker] -= get_pcvar_num(cvar_ammodamage)
}
修改成
复制程式
while (g_damagedealt[attacker] > get_pcvar_num(cvar_ammodamage))
{
g_damagedealt[attacker] -= get_pcvar_num(cvar_ammodamage)
if(g_ammopacks[attacker] < 160) // 现在子弹包上限为160
g_ammopacks[attacker]++
}
以下是 将 管理员/VIP 和 普通玩家 的设定至限制不同
有两个方法
第一、(这是适用于ADMIN_LEVEL_A - ADMIN_LEVEL_H)
将
复制程式
while (g_damagedealt[attacker] > get_pcvar_num(cvar_ammodamage))
{
g_ammopacks[attacker]++
g_damagedealt[attacker] -= get_pcvar_num(cvar_ammodamage)
}
修改成
复制程式
while (g_damagedealt[attacker] > get_pcvar_num(cvar_ammodamage))
{
g_damagedealt[attacker] -= get_pcvar_num(cvar_ammodamage)
if(g_ammopacks[attacker] < 200 && is_user_admin(attacker)) // VIP或管理员统一限制 (限制200)
g_ammopacks[attacker]++
else if(g_ammopacks[attacker] < 160) // 普通玩家 (限制160)
g_ammopacks[attacker]++
}
第二、(这是将每个不同的等级配置, 不建议使用)
将
复制程式
while (g_damagedealt[attacker] > get_pcvar_num(cvar_ammodamage))
{
g_ammopacks[attacker]++
g_damagedealt[attacker] -= get_pcvar_num(cvar_ammodamage)
}
修改成
复制程式
while (g_damagedealt[attacker] > get_pcvar_num(cvar_ammodamage))
{
g_damagedealt[attacker] -= get_pcvar_num(cvar_ammodamage)
if(g_ammopacks[attacker] < 200 && get_user_flags(attacker) & ADMIN_LEVEL_A) //限制拥有LEVEL_A(限制200)
g_ammopacks[attacker]++
else if(g_ammopacks[attacker] < 160) // 普通玩家 (限制160)
g_ammopacks[attacker]++
}
以下是再分开每个LEVEL设定
复制程式
while (g_damagedealt[attacker] > get_pcvar_num(cvar_ammodamage))
{
g_damagedealt[attacker] -= get_pcvar_num(cvar_ammodamage)
if(g_ammopacks[attacker] < 200 && get_user_flags(attacker) & ADMIN_LEVEL_A) // LEVEL_A (200)
g_ammopacks[attacker]++
else if(g_ammopacks[attacker] < 190 && get_user_flags(attacker) & ADMIN_LEVEL_B) // LEVEL_B (190)
g_ammopacks[attacker]++
else if(g_ammopacks[attacker] < 180 && get_user_flags(attacker) & ADMIN_LEVEL_C) // LEVEL_C (190)
g_ammopacks[attacker]++
else if(g_ammopacks[attacker] < 160) // 普通玩家(160)
g_ammopacks[attacker]++
}
教学已完....(我真的很无聊-.- , 因为想不起做什么就打教学....)