|
发表于 2007-9-7 15:25:29
|
显示全部楼层
来自 中国–广东–深圳
回复: 请问玩家得埋葬费3000元的源码应放到哪个文件?
Post by 吴孟达
tk 自杀一样加3000 没加判断 自己去改吧
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
public plugin_init() {
register_event("DeathMsg", "hook_death", "a... 其实这样的插件早就有人做出来了,是你自己不会搜索,不会变通- #include <amxmodx>
- #include <cstrike>
- new g_round
- public plugin_init(){
- register_plugin("First Victim","1.0","ahcat")
- register_event("DeathMsg", "hook_death", "a")
- register_logevent("hook_roundstart",2,"0=World triggered","1=Round_Start")
- g_round = 0
- }
- public hook_death(){
- if (g_round!=0)
- return PLUGIN_CONTINUE
- new Victim = read_data(2)
- if(Victim==Victim)
- return PLUGIN_CONTINUE
- cs_set_user_money(Victim,cs_get_user_money (Victim)+3000)
- new p_name[32]
- get_user_name(Victim,p_name,31)
- set_hudmessage(255, 255, 255, -1.0, 0.5, 0, 0.1, 0.1, 0.1, 6.0, 1)
- show_hudmessage(0, "玩家 %s 英勇牺牲,本服奖给埋葬费3000元",p_name)
- g_round = 1
- return PLUGIN_CONTINUE
- }
- public hook_roundstart(){
- g_round = 0
- }
复制代码 原贴见http://www.dt-club.net/forum/thread/70/29662/2.htm
要学会变通.
帮你编好了,同样未测试. |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|