引用 | 編輯
asd0210a
2016-02-06 13:18 |
樓主
▼ |
||||||||||||
x0
圖 1. 為什麼我改TR的模組會有個人裏面求大大幫我 要怎麼解決 求幫 #include <amxmodx> #include <amxmisc> #include <engine> #include <fun> #include <cstrike> #include <hamsandwich> #include <fakemeta> //new const v_bossclaw[] ={ "models/show/v_bossknife.mdl" } //new const p_bossclaw[] ={ "models/show/p_bossknife.mdl" } public plugin_init() { register_plugin("BossMod", "1.3", "SHow") register_event("CurWeapon", "curwep", "be", "1=1") RegisterHam(Ham_Spawn, "player", "Player_Spawn_Post", 1) } public Player_Spawn_Post( id ) { if(!is_user_alive(id)) return if(cs_get_user_team(id) == CS_TEAM_T) { entity_set_string(id, EV_SZ_viewmodel, "models/show/v_bossknife.mdl" ) entity_set_string(id, EV_SZ_weaponmodel, "models/show/p_bossknife.mdl" ) } } public curwep(id) { new wpnID = read_data(2) if(cs_get_user_team(id) == CS_TEAM_T) { if(wpnID != CSW_KNIFE) { engclient_cmd(id, "weapon_knife") set_user_maxspeed(id, get_cvar_float("boss_speed")) entity_set_string(id, EV_SZ_viewmodel, "models/show/v_bossknife.mdl" ) entity_set_string(id, EV_SZ_weaponmodel, "models/show/p_bossknife.mdl" ) } } return PLUGIN_HANDLED } public plugin_precache() { precache_model("models/show/v_bossknife.mdl") precache_model("models/v_knife.mdl") precache_model("models/show/p_bossknife.mdl" ) }
x0
|
引用 | 編輯
csisgoodgame
2016-02-06 23:50 |
1樓
▲ ▼ |
請善用[code][/code]代碼
複製程式 #include <amxmodx> #include <amxmisc> #include <engine> #include <fun> #include <cstrike> #include <hamsandwich> #include <fakemeta> //new const v_bossclaw[] ={ "models/show/v_bossknife.mdl" } //new const p_bossclaw[] ={ "models/show/p_bossknife.mdl" } public plugin_init() { register_plugin("BossMod", "1.3", "SHow") register_event("CurWeapon", "curwep", "be", "1=1") RegisterHam(Ham_Spawn, "player", "Player_Spawn_Post", 1) } public Player_Spawn_Post( id ) { if(!is_user_alive(id)) return if(cs_get_user_team(id) == CS_TEAM_T) { entity_set_string(id, EV_SZ_viewmodel, "models/show/v_bossknife.mdl" ) entity_set_string(id, EV_SZ_weaponmodel, "models/show/p_bossknife.mdl" ) } } public curwep(id) { new wpnID = read_data(2) if(cs_get_user_team(id) == CS_TEAM_T) { if(wpnID != CSW_KNIFE) { engclient_cmd(id, "weapon_knife") set_user_maxspeed(id, get_cvar_float("boss_speed")) entity_set_string(id, EV_SZ_viewmodel, "models/show/v_bossknife.mdl" ) entity_set_string(id, EV_SZ_weaponmodel, "models/show/p_bossknife.mdl" ) } } return PLUGIN_HANDLED } public plugin_precache() { precache_model("models/show/v_bossknife.mdl") precache_model("models/v_knife.mdl") precache_model("models/show/p_bossknife.mdl" ) } 這個是魔王模式的插件還是? 只看SMA好像沒什麼問題 應該是你放錯模組了吧? v_bossknife.mdl 和 p_bossknife.mdl 都是刀子的模組 不如你貼幾張圖上來讓大家看看? x0 |
引用 | 編輯
csisgoodgame
2016-02-15 17:15 |
3樓
▲ ▼ |
||||||||||
如果是要修改人物「外觀」,該插件裡面都沒有相關內容喔
要讓插件修改人物模組就像s87(ry)桑說的: 下面是引用 s8720419 於 2016-02-08 03:01 發表的 :已經幫你編譯過了,沒有錯誤,不放心的話請自行檢查sma: 複製程式 #include <amxmodx> #include <amxmisc> #include <engine> #include <fun> #include <cstrike> #include <hamsandwich> #include <fakemeta> new const v_bossclaw[] ={ "models/show/v_bossknife.mdl"} new const p_bossclaw[] ={ "models/show/p_bossknife.mdl"} new const model_boss[] ={ "models/show/boss_model.mdl"} public plugin_init() { register_plugin("BossMod", "1.3", "SHow") register_event("CurWeapon", "curwep", "be", "1=1") RegisterHam(Ham_Spawn, "player", "Player_Spawn_Post", 1) } public Player_Spawn_Post( id ) { if(!is_user_alive(id)) return if(cs_get_user_team(id) == CS_TEAM_T) { cs_set_user_model(id, model_boss) entity_set_string(id, EV_SZ_viewmodel, v_bossclaw) entity_set_string(id, EV_SZ_weaponmodel, p_bossclaw) } } public curwep(id) { new wpnID = read_data(2) if(cs_get_user_team(id) == CS_TEAM_T) { if(wpnID != CSW_KNIFE) { engclient_cmd(id, "weapon_knife") cs_set_user_model(id, model_boss) set_user_maxspeed(id, get_cvar_float("boss_speed")) entity_set_string(id, EV_SZ_viewmodel, v_bossclaw) entity_set_string(id, EV_SZ_weaponmodel, p_bossclaw) } } return PLUGIN_HANDLED } public plugin_precache() { precache_model("models/show/v_bossknife.mdl") precache_model("models/v_knife.mdl") precache_model("models/show/p_bossknife.mdl") precache_model("models/show/boss_model.mdl") }
x0 |
引用 | 編輯
csisgoodgame
2016-02-20 17:19 |
5樓
▲ ▼ |
||||||||||
下面是引用 asd0210a 於 2016-02-19 19:09 發表的 : 我的疏忽,抱歉 ; - ; 自行單機測試了一下,應該沒問題了 修正了 cs_set_user_model 的 precache 路徑錯誤 我擅自改寫了原本的 engclient_cmd(id,"weapon_knife") 改寫成將TR武裝解除後給予刀子 不喜歡的話可以自行改回 Code在下方: 複製程式 #include <amxmodx> #include <amxmisc> #include <engine> #include <fun> #include <cstrike> #include <hamsandwich> #include <fakemeta> new const v_bossclaw[] ={ "models/show/v_bossknife.mdl"} new const p_bossclaw[] ={ "models/show/p_bossknife.mdl"} public plugin_init() { register_plugin("BossMod", "1.3", "SHow") register_event("CurWeapon", "curwep", "be", "1=1") RegisterHam(Ham_Spawn, "player", "Player_Spawn_Post", 1) } public Player_Spawn_Post( id ) { if(!is_user_alive(id)) return if(cs_get_user_team(id) == CS_TEAM_T) { cs_set_user_model(id, "boss_model") entity_set_string(id, EV_SZ_viewmodel, v_bossclaw) entity_set_string(id, EV_SZ_weaponmodel, p_bossclaw) } } public curwep(id) { new wpnID = read_data(2) if(cs_get_user_team(id) == CS_TEAM_T) { if(wpnID != CSW_KNIFE) { strip_user_weapons(id) //武裝解除 give_item(id, "weapon_knife") //給予刀子 set_user_maxspeed(id, get_cvar_float("boss_speed")) entity_set_string(id, EV_SZ_viewmodel, v_bossclaw) entity_set_string(id, EV_SZ_weaponmodel, p_bossclaw) } } return PLUGIN_HANDLED } public plugin_precache() { precache_model("models/show/v_bossknife.mdl") precache_model("models/v_knife.mdl") precache_model("models/show/p_bossknife.mdl") precache_model("models/player/boss_model/boss_model.mdl") precache_model("models/player/boss_model/boss_modelT.mdl") }
x0 |
引用 | 編輯
csisgoodgame
2016-02-23 21:15 |
7樓
▲ ▼ |
引用 | 編輯
csisgoodgame
2016-02-27 08:56 |
9樓
▲ ▼ |
引用 | 編輯
csisgoodgame
2016-02-27 20:21 |
11樓
▲ ▼ |
引用 | 編輯
csisgoodgame
2016-02-28 16:39 |
13樓
▲ ▼ |
下面是引用 asd0210a 於 2016-02-27 23:50 發表的 : 這邊一樣使用單機測試了一下,手臂是能夠正常更換的 更換手臂模組的代碼在以下兩個區域: 複製程式 public Player_Spawn_Post( id ) // 玩家重生判斷 { if(!is_user_alive(id)) return if(cs_get_user_team(id) == CS_TEAM_T) // 檢查玩家是否為TR,是則執行以下代碼 { cs_set_user_model(id, "boss_model") // 設置玩家人物模型 entity_set_string(id, EV_SZ_viewmodel, v_bossclaw) // 設置玩家 v_ 手臂模型 entity_set_string(id, EV_SZ_weaponmodel, p_bossclaw) // 設置玩家 p_ 手臂模型 } } public curwep(id) // 玩家當前武器判斷 { new wpnID = read_data(2) if(cs_get_user_team(id) == CS_TEAM_T) // 檢查玩家是否為TR,是則執行以下代碼 { if(wpnID != CSW_KNIFE) // 如果當前武器是不是刀子 { strip_user_weapons(id) // 武裝解除 give_item(id, "weapon_knife") // 給予刀子 set_user_maxspeed(id, get_cvar_float("boss_speed")) // 設置玩家最高移動速度 entity_set_string(id, EV_SZ_viewmodel, v_bossclaw) // 設置玩家 v_ 手臂模型 entity_set_string(id, EV_SZ_weaponmodel, p_bossclaw) // 設置玩家 p_ 手臂模型 } } return PLUGIN_HANDLED } 冒昧問一下,雖然感覺不太可能... 你有自己修正過sma的這個區塊: 複製程式 new const v_bossclaw[] ={ "models/show/v_bossknife.mdl"} new const p_bossclaw[] ={ "models/show/p_bossknife.mdl"} 還是直接使用我附在壓縮檔裡面的amxx? 我能想到的原因只有這裡因為某些原因被忽略掉,導致模組沒有出現... 真的還是有問題的話,只能請a78前輩、Ch前輩等等大手來幫忙了 畢竟我也只是略懂插件w x0 |
引用 | 編輯
csisgoodgame
2016-03-01 13:04 |
15樓
▲ ▼ |
引用 | 編輯
弒血
2016-03-02 12:15 |
18樓
▲ ▼ |
下面是引用 s8720419 於 2016-03-01 19:17 發表的 : 已下有些我把他換成了fakemeta的東西了..eng我果然不太習慣 我還有小改一些細節...雖然沒有實際用SMA轉檔測試..不過大致上應該沒問題。 如果有問題 再回覆吧 複製程式 #include <amxmodx> #include <cstrike> #include <fakemeta> #include <fun> #include <hamsandwich> new const v_bossclaw[] = { "models/show/v_bossknife.mdl" } new const p_bossclaw[] = { "models/show/p_bossknife.mdl" } new const boss_mdl[] = { "models/player/boss_model/boss_model.mdl" } public plugin_precache() { precache_model(v_bossclaw); precache_model(p_bossclaw); precache_model(boss_mdl); } public plugin_init() { register_plugin("BossMod", "1.3", "SHow"); register_event("CurWeapon", "curwep", "be", "1=1"); RegisterHam(Ham_Spawn, "player", "Player_Spawn_Post", 1); } public curwep(id) { if(cs_get_user_team(id) == CS_TEAM_T) { if(read_data(2) != CSW_KNIFE) { engclient_cmd(id, "weapon_knife"); //set_user_maxspeed(id, get_cvar_float("boss_speed")); ??? 沒這個boss_speed怎麼會出現.. } else { set_pev(id, pev_viewmodel2, v_bossclaw); set_pev(id, pev_weaponmodel2, p_bossclaw); } } } public Player_Spawn_Post(id) { if(!is_user_alive(id)) return; if(cs_get_user_team(id) == CS_TEAM_T) { //set_user_maxspeed(id, get_cvar_float("boss_speed")); ??? 沒這個boss_speed怎麼會出現.. cs_set_user_model(id, "boss_model"); } } //支援BOT的... public client_putinserver(id) { static classname[32], bool:Debug; pev(id, pev_classname, classname, charsmax(classname)); if(!equal(classname, "player") && !Debug) { Debug = true; set_task(1.0,"_Debug", id); } } public _Debug(id) RegisterHamFromEntity(Ham_Spawn, id, "Player_Spawn_Post", 1); x0 |