设为首页收藏本站新闻投稿

MOD中国同盟社

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 320|回复: 3

[求助] 求插件高手及英文高手帮忙,谢谢 [复制链接]

Rank: 7Rank: 7Rank: 7

帖子
226
精华
0
声望
2854 点
金币
579 Mold
被赞许
4 次
注册时间
2011-12-5

懒人勋章

发表于 2012-2-22 09:53:58 |显示全部楼层
求高手能把这页内容的注释准确的翻译一下。不会的也顶一下,谢谢!
register_eventregister_event - Registers an event on which a given function will be called
Syntax:     register_event ( const event[], const function[], const flags[], [ cond=[], ... ] )
Type:    Native
Notes:event is a message, such as "DeathMsg", "Damage", et cetera.
function is the name of a public function which will be called on this event.
flags is a combination of flags that determine if this event is forwarded:
"a" - Global Event
"b" - Event sent to a single target
"c" - Send only once when repeated to other players
"d" - Only if sent to a dead player
"e" - Only if sent to an alive player
You can optionally set a list of restrictions/conditions on the event. For example:
"2=c4" - 2nd parameter of message must be string "c4".
"3>10" - 3rd parameter must be greater then 10.
"3!4" - 3rd must not be 4.
"2&Buy" - 2nd parameter of message must contain "Buy" substring.
"2!Buy" - 2nd parameter of message can't contain "Buy" substring.
Example:
public plugin_init()
{
   //Only called if killer is not worldspawn  
   register_event("DeathMsg", "hook_death", "a", "1>0")
}
public hook_death()
{
   new Killer = read_data(1)
   new Victim = read_data(2)
}
User Contributed Notes
phatency at gmail dot com
Feb-15-08 05:28:11
For Natural-Selection:
Note that if you want to get only the weapon user is changing to (or firing with, picking up etc.), use:
register_event("CurWeapon","callbackFunc","be","1=6");
If the argument1 is 6, then argument2 is the current weapon.
If argument1 is 4, then argument2 is the last weapon. If you don't filter out lastweapon events, don't expect them to come in certain order (before or after currentweapon).
silencer191 at yahoo dot de
Sep-10-06 15:20:17
[[ CORRECTION OF THE STUFF BELOW ]]
For Counter-Strike:
/* 'start' is being called when the Freeze Time (When you buy Weapons) has ended (Round Start) */
register_logevent("start",2,"1=Round_Start")  
/* 'end' is being called when a Team has won (Round End) */  
register_logevent("end",2,"1=Round_End")


使用道具 举报

Rank: 8Rank: 8

帖子
300
精华
8
声望
1108 点
金币
32 Mold
被赞许
36 次
注册时间
2012-2-18

MTT职员 懒人勋章 精华帖制造者 可爱小猫

发表于 2012-2-22 11:19:55 |显示全部楼层
表示,看英语,一愣一愣的。

使用道具 举报

Modchina声望-崇拜

在逃模客

Rank: 15Rank: 15Rank: 15Rank: 15Rank: 15

帖子
2536
精华
0
声望
8050 点
金币
1500 Mold
被赞许
120 次
注册时间
2010-2-7

懒人勋章

发表于 2012-2-22 12:49:09 |显示全部楼层
regsiter_event么....当初学插件的时候对这个函数下了一番功夫啊....虽说我想帮你但是我的时间不够,而且谷歌翻译莫名其妙的抽了....我自身英语就不怎么好....从点通论坛那里找了个说明,你看一下然后对照这个教程应该能看懂。另外最后两个logevent意思好像是开局时和结束时触发事件啊....

register_event的使用说明
その一   いつもと违う髪形に気が付くこと
その二   ちゃんと靴まで见ること   いいね?
その三   わたしの一言には三つの言叶で返

使用道具 举报

Rank: 7Rank: 7Rank: 7

帖子
226
精华
0
声望
2854 点
金币
579 Mold
被赞许
4 次
注册时间
2011-12-5

懒人勋章

发表于 2012-2-22 16:49:47 |显示全部楼层
非常感谢!      

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

回顶部