luoyunfeng
|
分享:
▼
x0
|
[1.6] 第三人稱插件的人能不能不透明啊,打开可以看源码
/* / / / 3rd Person View / (ability for both teams) / / by The_Thing / / */ #include <amxmodx> #include <engine> #define PLUGIN "3rd person view" #define VERSION "1.2.4" #define AUTHOR "The_Thing" new g_3rdview_toggle new bool:change_3rdview[33] new maxplayers public plugin_precache() { precache_model("models/rpgrocket.mdl") } public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) g_3rdview_toggle = register_cvar("amx_3rdview", "1") register_event("DeathMsg", "Death", "a") register_event("ResetHUD","NewRound","be") register_concmd("changeview", "change_personal_view", ADMIN_USER, "- 3rd view toggle") maxplayers = get_maxplayers() } public client_connect(id) { change_3rdview[id] = false } public client_disconnect(id) { change_3rdview[id] = false } public Death() { if (!get_pcvar_num(g_3rdview_toggle)) return; new id = read_data( 2 ) if ((id <= 0) || (id > maxplayers)) return; if (is_user_bot(id)) return; if (change_3rdview[id]) { change_3rdview[id] = false set_view(id, CAMERA_NONE) } } public NewRound(id) { if (!get_pcvar_num(g_3rdview_toggle)) return; if (is_user_bot(id)) return; if (is_user_alive(id)) { change_3rdview[id] = false set_view(id, CAMERA_NONE) } } public change_personal_view(id) { if (!get_pcvar_num(g_3rdview_toggle)) return; if (!is_user_alive(id)) return; change_3rdview[id] = !change_3rdview[id] if (change_3rdview[id]) set_view(id, CAMERA_3RDPERSON) else set_view(id, CAMERA_NONE) }
|