|
我看了那个插件~
比较完美~
但我现在想在插件上面,就是第一人称显示那里~区别一下~
就是读取用户的权限~然后显示
是管理员~
就显示管理员
是VIP
就显示VIP..
普通的就是普通的显示
CT跟T的显示的颜色又不一样...
怎么样实现这个功能...
谢谢了- #include <amxmodx>
- #include <GetIP>
- #define PLUGIN "ShowIP"
- #define VERSION "1.0"
- #define AUTHOR "Shock.V"
- new Show_Player[32][256]
- new SayText
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR)
-
- register_event("StatusValue","OtherInfo","bd","1=2")
-
- SayText=get_user_msgid("SayText")
- }
- public client_putinserver(id)
- {
- ShowIP(id)
- }
- public client_disconnect(id)
- {
- if (is_user_bot(id))
- return PLUGIN_HANDLED
-
- new name[32],mess[256]
-
- get_user_name(id,name,31)
-
- format(mess,255,"^x01玩家:^x03%s ^x01离开了游戏。",name)
-
- message_begin(MSG_ALL,SayText)
- write_byte(id)
- write_string(mess)
- message_end()
-
- return PLUGIN_HANDLED
- }
- public OtherInfo(id)
- {
- new aid = read_data(2)
-
- if (aid != id && aid != 0)
- {
- new name[32]
- get_user_name(aid,name,31)
-
- set_hudmessage(100,100,0,0.50,0.74, 0, 0.0, 3.0, 0.0, 0.0, 3)
- show_hudmessage(id, "%s^n【来自:%s】", name, Show_Player[id])
- }
- }
- public ShowIP(id)
- {
- if ( !is_user_connected(id))
- return PLUGIN_HANDLED
-
- new playerip[17]
-
- get_user_ip(id, playerip, 16, 1)
-
- csmod_ip(playerip,Show_Player[id],255)
-
- set_task(5.0,"ShowMessage",id)
-
- return PLUGIN_CONTINUE
- }
- public ShowMessage(id)
- {
- if ( !is_user_connected(id))
- return PLUGIN_CONTINUE
-
- new name[32],message[256]
- get_user_name(id,name,31)
-
- format(message, 255, "^x01欢迎^x03 %s ^x01来自:^x04 %s^n", name, Show_Player[id])
- message_begin(MSG_ALL,SayText)
- write_byte(id)
- write_string(message)
- message_end()
-
- return PLUGIN_CONTINUE
- }
复制代码 http://www.dt-club.net/forum/thread/71/37453/3.htm |
|