廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 1477 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為IE收藏   收藏主題   上一主題 | 下一主題   
nav5
個人文章 個人相簿 個人日記 個人地圖
初露鋒芒
級別: 初露鋒芒 該用戶目前不上站
推文 x2 鮮花 x26
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片
推文 x0
[1.6][插件] please make this plugin work with zbot
hello
i ask if some pro scripter can make this plugin work with zbot ?
this plugin is for vip map ,but it doesn't work with zbot
its features :


Plugin enables VIP's buying/collecting but sets armor to 0

also displays special VIP icon to inform the person


Fakemeta module required


CVAR amx_vip_armor (N: armor, default: 0, turn plugin off: -1)


你好
我问如果有些亲编剧可以使ZBOT这个插件的工作吗?
这个插件是VIP地图,但它不使用ZBOT
其特点:


[引用]
插件让VIP的购买/收集,但设置为0的装甲

也显示特殊的VIP图标通知人


fakemeta模块所需


CVaR的amx_vip_armor(N盔甲,默认:0,打开插件:-1)




複製程式
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>


// plugin's main information
#define PLUGIN_NAME "VIP Alternative"
#define PLUGIN_VERSION "0.1b"
#define PLUGIN_AUTHOR "VEN"


// plugin's CVAR name
new CVAR_NAME[] = "amx_vip_armor"


// CVAR's default value
#define CVAR_DEFAULT "0"


// comment to avoid plugin autodisabling on maps without VIP spawn point
#define VIP_MAP_CHECK


// possible special VIP icon display styles
#define BIT_ICON_NORMAL (1<<0)
#define BIT_ICON_BLINK (1<<1)


// comment to disable special VIP icon displaying or change display style
#define BIT_ICON BIT_ICON_NORMAL


// special VIP icon colors in RGB format
#define ICON_R 0
#define ICON_G 0
#define ICON_B 255


#define EXTRA_OFFSET 5


// private data armor type offset
#define OFFSET_ARMORTYPE 112


// armor type offset bits
#define BIT_VEST (1<<0) // vest
#define BIT_VESTHELM (1<<1) // vest + helmet


// when CVAR amx_vip_armor > 0 VIP will gain specified armor type
#define BIT_ARMORTYPE BIT_VEST


// display helmet hud icon bit
#define BIT_HELMET_ICON (1<<0)


// private data VIP offset
#define OFFSET_VIP 209


// VIP offset bit
#define BIT_VIP (1<<8)


new g_cvar_pointer


new ICON_NAME[] = "vipsafety"


#define BIT_CENTER_TEXT (1<<2)
new MESSAGE_TEXT[] = "#Cannot_Switch_From_VIP"


new g_msgid_icon
new g_msgid_armortype
new g_msgid_text


new g_vip_id


public plugin_init() {
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)


g_cvar_pointer = register_cvar(CVAR_NAME, CVAR_DEFAULT)


#if defined VIP_MAP_CHECK
if (!engfunc(EngFunc_FindEntityByString, FM_NULLENT, "classname", "func_vip_safetyzone"))
return
#endif


register_event("HLTV", "event_new_round", "a", "1=0", "2=0")
register_event("StatusIcon", "event_vip_safety", "be", "1=1", "2=vipsafety")


RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1)
#if defined BIT_ICON
register_event("DeathMsg", "event_death", "a", "2!0")
#endif


register_clcmd("chooseteam", "clcmd_role_switch")
register_clcmd("jointeam", "clcmd_role_switch")


g_msgid_icon = get_user_msgid("StatusIcon")
g_msgid_armortype = get_user_msgid("ArmorType")
g_msgid_text = get_user_msgid("TextMsg")
}


/* *************************************************** Base **************************************************** */


public event_new_round() {
if (!g_vip_id || !is_user_connected(g_vip_id))
return


new tchar[2]
get_user_team(g_vip_id, tchar, 1)
if (tchar[0] != 'C') {
g_vip_id = 0
return
}


set_player_vip(g_vip_id)


if (get_pcvar_num(g_cvar_pointer) < 0)
g_vip_id = 0
}


public Player_Spawn(id)
{
new armor = get_pcvar_num(g_cvar_pointer)
if (armor >= 0 && is_user_alive(id) && set_player_vip(id, false)) {
g_vip_id = id
set_player_armor(id, armor)


#if defined BIT_ICON
msg_vip_icon(id)
#endif
}
}


public client_disconnect(id) {
if (id == g_vip_id && !is_player_vip(id)) {
set_player_vip(id)
g_vip_id = 0
}
}


public event_vip_safety(id) {
if (id == g_vip_id)
set_player_vip(id)
}


public event_death() {
new id = read_data(2)
if (id == g_vip_id)
msg_vip_icon(id, false)
}


public clcmd_role_switch(id) {
if (id != g_vip_id)
return PLUGIN_CONTINUE


msg_cant_switch_roles(id)


return PLUGIN_HANDLED
}


/* ************************************************** Stocks *************************************************** */


stock is_player_vip(id) {
return (get_pdata_int(id, OFFSET_VIP, EXTRA_OFFSET) & BIT_VIP)
}


stock bool:set_player_vip(id, bool:vip = true) {
new oldbits = get_pdata_int(id, OFFSET_VIP, EXTRA_OFFSET)
if (!vip && !(oldbits & BIT_VIP))
return false


new newbits
switch (vip) {
case true : newbits = (oldbits | BIT_VIP)
case false: newbits = (oldbits & ~BIT_VIP)
}
set_pdata_int(id, OFFSET_VIP, newbits, EXTRA_OFFSET)


return true
}


stock set_player_armor(id, armor) {
set_pev(id, pev_armorvalue, float(armor))
set_pdata_int(id, OFFSET_ARMORTYPE, (armor ? BIT_ARMORTYPE : 0), EXTRA_OFFSET)


#if BIT_ARMORTYPE == BIT_VESTHELM
msg_helmet_icon(id, armor ? true : false)
#else
msg_helmet_icon(id, false)
#endif
}


stock msg_helmet_icon(id, bool:show = true) {
message_begin(MSG_ONE_UNRELIABLE, g_msgid_armortype, {0, 0, 0}, id)
write_byte((show ? BIT_HELMET_ICON : 0))
message_end()
}


stock msg_vip_icon(id, bool:show = true) {
message_begin(MSG_ONE_UNRELIABLE, g_msgid_icon, {0, 0, 0}, id)
write_byte((show ? BIT_ICON : 0))
write_string(ICON_NAME)
if (show) {
write_byte(ICON_R)
write_byte(ICON_G)
write_byte(ICON_B)
}
message_end()
}


stock msg_cant_switch_roles(id) {
message_begin(MSG_ONE_UNRELIABLE, g_msgid_text, {0, 0, 0}, id)
write_byte(BIT_CENTER_TEXT)
write_string(MESSAGE_TEXT)
message_end()
}


thanks


[ 此文章被nav5在2012-05-11 21:02重新編輯 ]



獻花 x0 回到頂端 [樓 主] From:未知地址 | Posted:2012-05-11 16:51 |
eddie118
個人頭像
個人文章 個人相簿 個人日記 個人地圖
特殊貢獻獎
小人物
級別: 小人物 該用戶目前不上站
推文 x30 鮮花 x70
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

"These words is to use the translator google"

I am from Taiwan

So my English is very bad

This do not have this plug-in

To ask people to do

There is more about the  plug-in

http://bbs-mychat.com/thread.php?fid=438



But is not that you need to

-----------------------------------------------------

question1.

Where are you from?? United States? Canada?


[ 此文章被eddie118在2012-05-11 20:19重新編輯 ]


獻花 x0 回到頂端 [1 樓] From:台灣固網股份有限公司 | Posted:2012-05-11 20:13 |
nav5
個人文章 個人相簿 個人日記 個人地圖
初露鋒芒
級別: 初露鋒芒 該用戶目前不上站
推文 x2 鮮花 x26
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

thank you so much ^^
you 're so kind :D
i tried searching , but i still can't find any VIP plugin like this which works with zbot


i'm from Vietnam ^^ very pleasured to meet you


P/S : i want to like and give flowers to your post ,but i 'm not sured which button to click
to give flower to you ,sorry
表情


太感谢你了^ ^
你再这么客气:
我试图寻找,但我仍然无法找到任何这样的VIP插件与ZBOT


我来自越南的^^很嬉戏,以满足您


的P / S:我喜欢您的文章和给花,但我不sured点击哪个按钮
给花给你,对不起
[S:562]


獻花 x1 回到頂端 [2 樓] From:未知地址 | Posted:2012-05-11 21:01 |

首頁  發表文章 發表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.077996 second(s),query:16 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言