应该会员“火飞寒”要求写的!
#include <amxmodx>#include <cstrike>
#define PLUGIN_NAME "award_System"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "K.K.Lv"
#define NAME_LENTH 32
#define MSG_LENTH 128
new award = {5000,6000,7000, 8000, 9000, 10000}
new g_firstblood
new gmsg_sync
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
register_event("DeathMsg", "event_death", "a")
register_logevent("event_newround", 2, "0=World triggered", "1=Round_Start")
gmsg_sync = CreateHudSyncObj()
}
public client_print_color(playerid, colorid, message[])
{
message_begin(playerid?MSG_ONE:MSG_ALL, get_user_msgid("SayText"), {0, 0, 0}, playerid)
write_byte(colorid)
write_string(message)
message_end()
}
public event_newround()
{
g_firstblood = 1
}
public event_death()
{
new killer = read_data(1)
new victim = read_data(2)
new killer_name
new victim_name
get_user_name(killer, killer_name, charsmax(killer_name))
get_user_name(victim, victim_name, charsmax(victim_name))
new money = cs_get_user_money(killer)
new headshot = read_data(3)
new weapon
read_data(4, weapon, 23)
if (get_user_team(killer) != get_user_team(victim))
{
if (g_firstblood == 1)
{
g_firstblood = 2
new awardmoney = award
new msg, hud_msg
format(hud_msg, charsmax(msg), "%s 一马当先^n英勇杀敌^n奖励 %d 金钱", killer_name, awardmoney)
format(msg, charsmax(msg), "^x03%s ^x04一马当先,英勇杀敌,奖励 ^x03%d ^x04金钱", killer_name, awardmoney)
set_hudmessage(100, 100, 255, 0.75, 0.29, 1, 6.0, 1.5, 0.5, 0.15, 1)
client_print_color(0, killer, msg)
ShowSyncHudMsg(0, gmsg_sync, hud_msg)
cs_set_user_money(killer, money + awardmoney)
}
else if (g_firstblood == 2)
{
g_firstblood = 3
new awardmoney = 2500
new hud_msg
format(hud_msg, charsmax(hud_msg), "%s 第二人杀敌^n奖励 %d 金钱", killer_name, awardmoney)
set_hudmessage(100, 100, 255, 0.75, 0.29, 1, 6.0, 1.5, 0.5, 0.15, 1)
ShowSyncHudMsg(0, gmsg_sync, hud_msg)
cs_set_user_money(killer, money + awardmoney)
}
else if (g_firstblood == 3)
{
g_firstblood = 4
new awardmoney = 1500
new hud_msg
format(hud_msg, charsmax(hud_msg), "%s 第三个杀敌^n奖励 %d 金钱", killer_name, awardmoney)
set_hudmessage(100, 100, 255, 0.75, 0.29, 1, 6.0, 1.5, 0.5, 0.15, 1)
ShowSyncHudMsg(0, gmsg_sync, hud_msg)
cs_set_user_money(killer, money + awardmoney)
}
if (headshot)
{
new awardmoney = 1500
new msg, hud_msg
format(hud_msg, charsmax(msg), "%s 一枪打爆 %s 的头^n奖励 %d 金钱", killer_name, victim_name, awardmoney)
format(msg, charsmax(msg), "^x03%s ^x04爆头奖励 ^x03%d ^x04金钱", killer_name, awardmoney)
set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, 1)
client_print_color(0, killer, msg)
ShowSyncHudMsg(0, gmsg_sync, hud_msg)
cs_set_user_money(killer, money + awardmoney)
}
if (weapon == 'k' && !headshot)
{
new msg, hud_msg
format(msg, charsmax(msg), "^x03%s ^x04使用匕首杀敌,奖励^x03 10000 ^x04金钱", killer_name)
format(hud_msg, charsmax(hud_msg), "%s 用刀戳死了 %s", killer_name, victim_name)
set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, 1)
ShowSyncHudMsg(0, gmsg_sync, hud_msg)
client_print_color(0, killer, msg)
cs_set_user_money(killer, money + 10000)
}
if(weapon == 'r' && !read_data(3))
{
new msg, hud_msg
format(msg, charsmax(msg), "^x03%s ^x04使用高爆手雷弹杀敌,奖励^x03 3000 ^x04金钱", killer_name)
format(hud_msg, charsmax(hud_msg), "%s 使用高爆手雷弹把 %s 炸得粉身碎骨", killer_name, victim_name)
set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, 1)
ShowSyncHudMsg(0, gmsg_sync, hud_msg)
client_print_color(0, killer, msg)
cs_set_user_money(killer, money + 3000)
}
}
}
不错,支持共享精神 太熟练了 佩服 大力支持楼主的共享精神 {:3_56:}
你寫的?! 6# jasonchu9
有问题吗! 我求插件求了半天都没人帮下。。这都有``` 请问楼主会写插件吗,我想搞个混F,带军衔,注册ID,经验和加血的,会的朋友请加我QQ:52951135 是楼猪自己的原创么,还是整合其它插件,千万不要轻易谋杀他人的劳动成果。 10# topstar
是不是你自己看了!其实这种插件都差不多了!