本文整理汇总了C#中ArgumentList类的典型用法代码示例。如果您正苦于以下问题:C#ArgumentList类的具体用法?C#ArgumentList怎么用?C#ArgumentList使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:InvalidatePlayer
publicstaticvoidInvalidatePlayer(Serverserver,ISendersender,ArgumentListargs)
{
stringplayerName,param;
Playerplayer=server.GetPlayerByName(sender.Name);
if(args.TryGetString(0,outplayerName))
{
if(server.GetPlayerByName(playerName)!=null)
{
Login.plugin.SetPlayerInvalid(playerName);
SendMessage(player,"Youhaveinvalidated"+playerName);
}
else
{
if(args.TryGetString(1,outparam))
{
if(param.ToUpper()=="FORCE")
{
Login.plugin.SetPlayerInvalid(playerName);
SendMessage(player,"Youhaveinvalidated"+playerName);
}
else
SendMessage(player,"Usage:/invalidate
(force)");
}
else
{
SendMessage(player,"Thereisnocurrentplayernames"+playerName);
SendMessage(player,"Use/invalidateforcetoremoveofflineplayers");
}
}
}
else
SendMessage(player,"Youmustsupplyaplayername");
}
原文链接:http://www.jxszl.com/biancheng/C/556570.html