心静如水 发表于 2008-10-11 13:23:52

回复: ( 哎 呀 , 帮 帮 忙 好 不 好 ? ) ...有图...

Post by 狙神wmQ
MM,怎么编译呀,我怎么编译不成?说说具体方法呗,谢谢了
new const MODEL_t[] = "wa_te"
new const MODEL_ct[] = "hr_ct"
public plugin_precache() {
precache_model("models/player/wa_te/wa_te.mdl")
precache_model("models/player/hr_ct/hr_ct.mdl")
return PLUGIN_CONTINUE
}

这样改...............要不那个charsmax未定义?不知道对不对?

试了好象10分钟会当机?...........是网管重起主机...............

继续测试中.................

(下面的同志)你缺少编译模块的文件................

狙神wmQ 发表于 2008-10-11 13:48:02

回复: ( 哎 呀 , 帮 帮 忙 好 不 好 ? ) ...有图...

Post by 心静如水
new const MODEL_t[] = "wa_te"
new const MODEL_ct[] = "hr_ct"
public plugin_precache() {
precache_model("models/player/wa_te/wa_te.mdl")
precache_model("models/player/wa_te/wa_teT.mdl")
precache_model("models/player/h...
出现如下错误,不知道怎么回事,如图

jim_yang 发表于 2008-10-11 15:38:15

回复: ( 哎 呀 , 帮 帮 忙 好 不 好 ? ) ...有图...

不应该啊,string.inc里定义了
#define charsmax(%1) (sizeof(%1)-1)
你那么改也没问题,还省事儿了那。死机就不清楚了。。。

心静如水 发表于 2008-10-11 16:53:21

回复: ( 哎 呀 , 帮 帮 忙 好 不 好 ? ) ...有图...

Post by jim_yang
不应该啊,string.inc里定义了
#define charsmax(%1) (sizeof(%1)-1)
你那么改也没问题,还省事儿了那。死机就不清楚了。。。
谢谢.................

狙神wmQ 发表于 2008-10-11 19:04:28

回复: ( 特别感谢..JIM_YANG..老师 ) ...谢...谢...!

姐姐,我也很急呀,怎么编译错误?
是不是我没修改好?
把你修改的源码发出来行吗?再此谢谢了
同样谢谢JIM_YANG!帮帮忙

狙神wmQ 发表于 2008-10-11 20:31:42

回复: ( 特别感谢..JIM_YANG..老师 ) ...谢...谢...!

请问源码哪里不对了?又出现错误了
#include <fakemeta>
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>

new const MODEL_t[] = "wa_te"
new const MODEL_ct[] = "hr_ct"
public plugin_precache() {
precache_model("models/player/wa_te/wa_te.mdl")
precache_model("models/player/wa_te/wa_teT.mdl")
precache_model("models/player/hr_ct/hr_ct.mdl")
return PLUGIN_CONTINUE
}

}
{
    new szFile
    formatex(szFile, charsmax(szFile), "models/player/wa_te/wa_te.md.mdl", MODEL_t, MODEL_t)
    if( file_exists(szFile) )
    {
      precache_model(szFile)
    }
    formatex(szFile, charsmax(szFile), "models/player/hr_ct/hr_ct.mdl", MODEL_ct, MODEL_ct)
    if( file_exists(szFile) )
    {
      precache_model(szFile)
    }
}
public plugin_init()
{
    register_forward(FM_SetClientKeyValue, "SetClientKeyValue")
    RegisterHam(Ham_Spawn, "player", "Spawn", 1)
}

public Spawn(id)
{
    if( is_user_alive(id) )
    {
      if( cs_get_user_team(id) == CS_TEAM_T)
            set_user_info(id, "model", MODEL_t)
      else
            set_user_info(id, "model", MODEL_ct)
    }
}
public SetClientKeyValue(id, infobuffer[], key[], value[])
{
    if(equal(key, "model") && (!equal(value, MODEL_t) || !equal(value, MODEL_ct)))
    {
      if( cs_get_user_team(id) == CS_TEAM_T)
            set_user_info(id, "model", MODEL_t)
      else
            set_user_info(id, "model", MODEL_ct)
      return FMRES_SUPERCEDE
    }
    return FMRES_IGNORED
}

心静如水 发表于 2008-10-11 20:42:23

回复: ( 特别感谢..JIM_YANG..老师 ) ...谢...谢...!

配置文件你少了,fakemeta模块也少,建议你用R版主的编译器.............


#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>

new const MODEL_t[] = "wa_te"
new const MODEL_ct[] = "hr_ct"
public plugin_precache() {
precache_model("models/player/wa_te/wa_te.mdl")
precache_model("models/player/hr_ct/hr_ct.mdl")
return PLUGIN_CONTINUE
}
public plugin_init()
{
register_plugin("team_Model", "1.0", "jim_yang")
register_forward(FM_SetClientKeyValue, "SetClientKeyValue")
RegisterHam(Ham_Spawn, "player", "Spawn", 1)
}

public Spawn(id)
{
if( is_user_alive(id) )
{
if( cs_get_user_team(id) == CS_TEAM_T)
set_user_info(id, "model", MODEL_t)
else
set_user_info(id, "model", MODEL_ct)
}
}
public SetClientKeyValue(id, infobuffer[], key[], value[])
{
if(equal(key, "model") && (!equal(value, MODEL_t) || !equal(value, MODEL_ct)))
{
if( cs_get_user_team(id) == CS_TEAM_T)
set_user_info(id, "model", MODEL_t)
else
set_user_info(id, "model", MODEL_ct)
return FMRES_SUPERCEDE
}
return FMRES_IGNORED
}

测试一晚了没有发现问题......

狙神wmQ 发表于 2008-10-12 12:18:32

回复: ( 特别感谢..JIM_YANG..老师 ) ...谢...谢...!

谢谢 ,姐姐,没有发现群踢现象了吧?
还有,能不能把http://www.dt-club.net/forum/showthread.php?t=40252这帖子的管理员模型那个插件的源码发出来?我想改下源码中的模型文件名,谢谢了

jiunnwoei2629 发表于 2008-10-12 13:42:15

回复: ( 特别感谢..JIM_YANG..老师 ) ...谢...谢...!

mdl和T.mdl是同一個的因為有些的mdl檔案會分開 所以要兩個黨要存在 才可以使用的 有些可以不用

心静如水 发表于 2008-10-12 16:05:27

回复: ( 特别感谢..JIM_YANG..老师 ) ...谢...谢...!

Post by 狙神wmQ
谢谢 ,姐姐,没有发现群踢现象了吧?
还有,能不能把http://www.dt-club.net/forum/showthread.php?t=40252这帖子的管理员模型那个插件的源码发出来?我想改下源码中的模型文件名,谢谢了
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("AdminModel", "2.0", "Rulzy")
register_event("ResetHUD", "resetModel","b");
return PLUGIN_CONTINUE
}
public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_LEVEL_A){
new CsTeams:userTeam = cs_get_user_team(id)

if (userTeam == CS_TEAM_T){
cs_set_user_model(id, "mm_te")
return PLUGIN_CONTINUE
}

if(userTeam == CS_TEAM_CT){
cs_set_user_model(id, "op_ct8")
return PLUGIN_CONTINUE
}
}
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model("models/player/mm_te/mm_te.mdl")
precache_model("models/player/op_ct8/op_ct8.mdl")
return PLUGIN_CONTINUE
}
页: 1 2 [3]
查看完整版本: ( 特别感谢..JIM_YANG..老师 ) ...谢...谢...!