【已成功】為什麼我改TR的模組會有個人

Home Home
引用 | 編輯 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" )
}

本帖包含附件
檔名: zip models.rar   (2022-06-09 14:21 / 1184 KB)   下載次數:5


獻花 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
引用 | 編輯 弒血
2016-02-08 03:01
2樓
  
下面是引用 asd0210a 於 2016-02-06 13:18 發表的 模組會有個人在裏面模組會有個人在裏面模組會有個人在裏面,|為什麼我改TR的模組會有個人: 到引言文
為什麼我改TR的模組會有個人裏面求大大幫我   要怎麼解決 求幫


#include <amxmodx>
#include <amxmisc>
.......

是不是搞錯了阿..


EV_SZ_viewmodel //這個不是第一人手的模組嗎.
EV_SZ_weaponmodel // 這個不是持東西的外觀嗎..


使用模組應該是 cs_set_user_model(id, " ??? ") 

獻花 x0
引用 | 編輯 csisgoodgame
2016-02-15 17:15
3樓
  
如果是要修改人物「外觀」,該插件裡面都沒有相關內容喔
要讓插件修改人物模組就像s87(ry)桑說的:
下面是引用 s8720419 於 2016-02-08 03:01 發表的 : 到引言文
使用模組應該是 cs_set_user_model(id, " ??? ")
已經幫你編譯過了,沒有錯誤,不放心的話請自行檢查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")
}
沒有測試過,所以我也不知道效果(?

本帖包含附件
檔名: zip Code.7z   (2022-06-09 14:21 / 3 KB)   下載次數:3


獻花 x0
引用 | 編輯 asd0210a
2016-02-19 19:09
4樓
  
下面是引用 csisgoodgame 於 2016-02-15 17:15 發表的 : 到引言文
如果是要修改人物「外觀」,該插件裡面都沒有相關內容喔
要讓插件修改人物模組就像s87(ry)桑說的:
已經幫你編譯過了,沒有錯誤,不放心的話請自行檢查sma:
[code]#include <amxmodx>
.......



 為什麼用你的插件一進伺服器就自動關hlds

獻花 x0
引用 | 編輯 csisgoodgame
2016-02-20 17:19
5樓
  
下面是引用 asd0210a 於 2016-02-19 19:09 發表的 : 到引言文




 為什麼用你的插件一進伺服器就自動關hlds

我的疏忽,抱歉 ; - ;
自行單機測試了一下,應該沒問題了




修正了 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")
}


本帖包含附件
檔名: zip Code.7z   (2022-06-09 14:21 / 3 KB)   下載次數:3


獻花 x0
引用 | 編輯 asd0210a
2016-02-22 18:47
6樓
  
下面是引用 csisgoodgame 於 2016-02-20 17:19 發表的 : 到引言文

我的疏忽,抱歉 ; - ;
自行單機測試了一下,應該沒問題了
[attachment=849740]
[attachment=849741]
.......

  感谢的大大的幫忙 但是為什麼模組變了 但手沒有變 可以的話在一次請求大大幫我 謝謝你

獻花 x0
引用 | 編輯 csisgoodgame
2016-02-23 21:15
7樓
  
下面是引用 asd0210a 於 2016-02-22 18:47 發表的 : 到引言文


  感谢的大大的幫忙 但是為什麼模組變了 但手沒有變 可以的話在一次請求大大幫我 謝謝你

v_ 模型路徑:models/show/v_bossknife.mdl
p_ 模型路徑:models/show/p_bossknife.mdl
稍微看一下這兩個地方有沒有模組吧

獻花 x0
引用 | 編輯 asd0210a
2016-02-24 02:29
8樓
  
下面是引用 csisgoodgame 於 2016-02-23 21:15 發表的 : 到引言文


v_ 模型路徑:models/show/v_bossknife.mdl
p_ 模型路徑:models/show/p_bossknife.mdl
稍微看一下這兩個地方有沒有模組吧



没错啊 這2個地方我都有放 我也測試很多次都沒有手只有身體的變化

獻花 x0
引用 | 編輯 csisgoodgame
2016-02-27 08:56
9樓
  
下面是引用 asd0210a 於 2016-02-24 02:29 發表的 : 到引言文


没错啊 這2個地方我都有放 我也測試很多次都沒有手只有身體的變化

怪了...那麼我不清楚了呢
要不要換個刀子的模型試試看?
或是你私信給我刀子模型 我幫你測試看看吧

獻花 x0
引用 | 編輯 asd0210a
2016-02-27 13:37
10樓
  
下面是引用 csisgoodgame 於 2016-02-27 08:56 發表的 : 到引言文


怪了...那麼我不清楚了呢
要不要換個刀子的模型試試看?
或是你私信給我刀子模型 我幫你測試看看吧





我要怎麼私信給你 或者你有rc 什麼的嗎?

獻花 x0
引用 | 編輯 csisgoodgame
2016-02-27 20:21
11樓
  
下面是引用 asd0210a 於 2016-02-27 13:37 發表的 : 到引言文
我要怎麼私信給你 或者你有rc 什麼的嗎?



在論壇頁面上方,私人訊息 > 發新訊息
編輯格式和發表文章一樣
至於檔案的話可以上傳到自己的雲端硬碟或是免空
如果模組不是CSO相關的產物的話,其實可以直接上傳到論壇當作附件就好

獻花 x0
引用 | 編輯 asd0210a
2016-02-27 23:50
12樓
  
下面是引用 csisgoodgame 於 2016-02-27 20:21 發表的 : 到引言文


[attachment=849847]

在論壇頁面上方,私人訊息 > 發新訊息
編輯格式和發表文章一樣
至於檔案的話可以上傳到自己的雲端硬碟或是免空
如果模組不是CSO相關的產物的話,其實可以直接上傳到論壇當作附件就好



那我上載到這個文章你自己下載
我也問了我的朋友他說 precache只是要個SERVER叫CLIENT DOWNLOAD 要用的檔,要換手還有CODE要入

獻花 x0
引用 | 編輯 csisgoodgame
2016-02-28 16:39
13樓
  
下面是引用 asd0210a 於 2016-02-27 23:50 發表的 : 到引言文
那我上載到這個文章你自己下載
我也問了我的朋友他說 precache只是要個SERVER叫CLIENT DOWNLOAD 要用的檔,要換手還有CODE要入

這邊一樣使用單機測試了一下,手臂是能夠正常更換的

更換手臂模組的代碼在以下兩個區域:
複製程式
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
引用 | 編輯 asd0210a
2016-02-28 17:01
14樓
  
下面是引用 csisgoodgame 於 2016-02-28 16:39 發表的 : 到引言文

這邊一樣使用單機測試了一下,手臂是能夠正常更換的
更換手臂模組的代碼在以下兩個區域:
[code]public Player_Spawn_Post( id )        // 玩家重生判斷
.......



我是直接用你的插件啊
我也試過改刀的模組名字也是不行

獻花 x0
引用 | 編輯 csisgoodgame
2016-03-01 13:04
15樓
  
下面是引用 asd0210a 於 2016-02-28 17:01 發表的 : 到引言文
我是直接用你的插件啊
我也試過改刀的模組名字也是不行

不如你把你的插件列表貼上來吧
說不定是插件衝突?

獻花 x0
引用 | 編輯 asd0210a
2016-03-01 17:40
16樓
  

圖 1.


下面是引用 csisgoodgame 於 2016-03-01 13:04 發表的 : 到引言文


不如你把你的插件列表貼上來吧
說不定是插件衝突?


獻花 x0
引用 | 編輯 弒血
2016-03-01 19:17
17樓
  
下面是引用 asd0210a 於 2016-03-01 17:40 發表的 : 到引言文

你把這個插件SMA內容code上來..幫你檢查一下..

獻花 x2
引用 | 編輯 弒血
2016-03-02 12:15
18樓
  
下面是引用 s8720419 於 2016-03-01 19:17 發表的 : 到引言文


你把這個插件SMA內容code上來..幫你檢查一下..


已下有些我把他換成了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
引用 | 編輯 asd0210a
2016-03-02 19:46
19樓
  
下面是引用 s8720419 於 2016-03-02 12:15 發表的 : 到引言文


已下有些我把他換成了fakemeta的東西了..eng我果然不太習慣
我還有小改一些細節...雖然沒有實際用SMA轉檔測試..不過大致上應該沒問題。
如果有問題 再回覆吧
.......



非常感謝2位大大一起幫我解決 已成功了 謝謝@@

獻花 x2