回复: 請問一下高手(當玩家進場時加入幾秒音效)
#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,user,ip,players,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, izBody
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
}应该是这样的了,进服鸡叫
页:
[1]