yesterday00
|
分享:
▲
▼
复制程式
#include <amxmodx>
#include <zombieplague>
public plugin_init()
{
register_plugin("1.0", "1.0", "1.0")
register_event("DeathMsg","death_msg","a", "1!0")
}
public death_msg()
{
new Killer=read_data(1)
new Victim=read_data(2)
if(!is_user_connected(Killer) ||!is_user_connected(Victim))
return PLUGIN_CONTINUE
new Killer_name[32],Victim_name[32] , packs , packsadd
get_user_name(Killer,Killer_name,31)
get_user_name(Victim,Victim_name,31)
packs = zp_get_user_ammo_packs(Killer)
packsadd = 30
if(zp_get_user_nemesis(Killer)&&zp_get_user_survivor(Victim))
{
zp_set_user_ammo_packs(Killer, packs+packsadd)
client_print(0, print_chat ,"复仇者 %s 成功击杀幸者存 %s 奖励%d弹药包" , Killer_name , Victim_name , packsadd)
}
if(zp_get_user_nemesis(Victim)&&zp_get_user_survivor(Killer))
{
zp_set_user_ammo_packs(Killer, packs+packsadd)
client_print(0 , print_chat ," 幸者存 %s 成功击杀复仇者 %s 奖励 %d 弹药包 " ,Killer_name,Victim_name, packsadd)
}
return PLUGIN_CONTINUE
}
|
|
x2
[1 楼]
From:未知地址 | Posted:2010-05-01 19:59 |
|
|
HsK
CCN@HsK
级别: 版主
版区: CS插件区
x1701
x1108
|
分享:
▲
▼
下面是引用 fuworm21so 于 2010-05-01 22:16 发表的 :
回:四楼你的IP是什么呢?..
回:5楼sk..
唔系哦-3-..我想改 例如你张图入边果句
你购买了一个盾牌
我想将果句野改做绿色.. 复制程式
#include <amxmodx>
#include <zombieplague>
public plugin_init()
{
register_plugin("1.0", "1.0", "1.0")
register_event("DeathMsg","death_msg","a", "1!0")
}
public death_msg()
{
new Killer=read_data(1)
new Victim=read_data(2)
if(!is_user_connected(Killer) ||!is_user_connected(Victim))
return PLUGIN_CONTINUE
new Killer_name[32],Victim_name[32] , packs , packsadd
get_user_name(Killer,Killer_name,31)
get_user_name(Victim,Victim_name,31)
packs = zp_get_user_ammo_packs(Killer)
packsadd = 30
if(zp_get_user_nemesis(Killer)&&zp_get_user_survivor(Victim))
{
zp_set_user_ammo_packs(Killer, packs+packsadd)
zp_colored_print(0, ^x04复仇者 %s 成功击杀幸者存 %s 奖励%d弹药包^x01" , Killer_name , Victim_name , packsadd)
}
if(zp_get_user_nemesis(Victim)&&zp_get_user_survivor(Killer))
{
zp_set_user_ammo_packs(Killer, packs+packsadd)
zp_colored_print(0 , "^x04幸者存 %s 成功击杀复仇者 %s 奖励 %d 弹药包^x01 " ,Killer_name,Victim_name, packsadd)
}
return PLUGIN_CONTINUE
}
zp_colored_print(target, const message[], any:...)
{
static buffer[512], i, argscount
argscount = numargs()
// Send to everyone
if (!target)
{
static player
for (player = 1; player <= g_maxplayers; player++)
{
// Not connected
if (!g_isconnected[player])
continue;
// Remember changed arguments
static changed[5], changedcount // [5] = max LANG_PLAYER occurencies
changedcount = 0
// Replace LANG_PLAYER with player id
for (i = 2; i < argscount; i++)
{
if (getarg(i) == LANG_PLAYER)
{
setarg(i, 0, player)
changed[changedcount] = i
changedcount++
}
}
// Format message for player
vformat(buffer, charsmax(buffer), message, 3)
// Send it
message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player)
write_byte(player)
write_string(buffer)
message_end()
// Replace back player id's with LANG_PLAYER
for (i = 0; i < changedcount; i++)
setarg(changed[i], 0, LANG_PLAYER)
}
}
// Send to specific target
else
{
/*
// Not needed since you should set the ML argument
// to the player's id for a targeted print message
// Replace LANG_PLAYER with player id
for (i = 2; i < argscount; i++)
{
if (getarg(i) == LANG_PLAYER)
setarg(i, 0, target)
}
*/
// Format message for player
vformat(buffer, charsmax(buffer), message, 3)
// Send it
message_begin(MSG_ONE, g_msgSayText, _, target)
write_byte(target)
write_string(buffer)
message_end()
}
}
[ 此文章被sk@.@在2010-05-01 22:27重新编辑 ]
|
HsK-Dev Blog By CCN
|
x0
[7 楼]
From:香港有线宽频 | Posted:2010-05-01 22:21 |
|
|
|