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 |
|
|
|