|
发表于 2007-7-2 08:40:14
|
显示全部楼层
来自 中国–广西–柳州–城中区
回复: 請問一下高手(當玩家進場時加入幾秒音效)
#include <amxmodx>
#include <amxmisc>
#define CSSTATS // If you want to show the user's rank on join and on leave.
// You must be using the csstats module and have stats plugins loaded.
// Comment it out if you don't want to use it.
#if defined CSSTATS
#include <csstats>
#endif
#define ADMIN ADMIN_LEVEL_A // Change to something else if you like.
public plugin_init()
{
register_plugin("Join IP","1.1","jsauce")
}
public client_authorized(id)
{
set_task(0.5,"client_is_auth",id)
}
public client_is_auth(id)
{
new authid[35],user[32],ip[32],players[32],inum
get_user_name(id,user,31)
get_user_ip(id,ip,31,1)
get_user_authid(id,authid,34)
get_players(players,inum)
#if defined CSSTATS
new izStats[8], izBody[8]
new iRankPos, iRankMax
iRankPos = get_user_stats(id,izStats,izBody)
iRankMax = get_statsnum()
for (new i = 0; i < inum; ++i)
{
if(get_user_flags(players) & ADMIN)
{
client_print(players,print_chat,"%s (IP:%s) (%s) is connecting to server.",user,ip,authid,iRankPos,iRankMax)
client_cmd(0,"spk misc/killChicken")
}
else
{
client_print(players,print_chat,"%s is connecting to server.",user,iRankPos,iRankMax)
client_cmd(0,"spk misc/killChicken")
}
}
#else
for (new i = 0; i < inum; ++i)
{
if(get_user_flags(players) & ADMIN)
{
client_print(players,print_chat,"%s (IP:%s) (%s) is connecting to server.",user,ip,authid)
client_cmd(0,"spk misc/killChicken")
}
else
{
client_print(players,print_chat,"%s is connecting to server.",user)
client_cmd(0,"spk misc/killChicken")
}
}
#endif
return PLUGIN_CONTINUE
} 应该是这样的了,进服鸡叫 |
|