Raised This Month: $32 Target: $400
 8% 

Model by SteamID


Post New Thread Reply   
 
Thread Tools Display Modes
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 09-29-2005 , 20:25  
Reply With Quote #21

If you do that then take off the return PLUGIN_HANDLED line.
and this doesnt add to the ini file (yet) untill then that line isnt needed, becuase it just simply reads from the file.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Agret
Member
Join Date: Jan 2005
Location: Melbourne, Victoria
Old 09-30-2005 , 08:34  
Reply With Quote #22

Quote:
Originally Posted by boadmin
well..fine then...i will add credits...to ALL forum members
Don't forget to thank me for supporting you by viewing this thread and making this comment.
__________________

(¯`·._¤²°°²Agret²°°²¤_.·´¯)
¸.-~·*'˜¨¯Ï”m_†hê_ôñë_åñd_õñl¥_Åg®ê†¨˜'*·~-.¸
Agret is offline
Send a message via ICQ to Agret Send a message via AIM to Agret Send a message via MSN to Agret Send a message via Yahoo to Agret
scriptyboy
BANNED
Join Date: Sep 2005
Old 09-30-2005 , 11:04  
Reply With Quote #23

I dont know why this plugin isnt working right now...cant test it till next wed or thurs...it kept crashing my HLDS last night while i was setting a model to my steam id...I dont know why.
scriptyboy is offline
Mulan
Senior Member
Join Date: Jul 2005
Location: [GER]Worbis
Old 09-30-2005 , 12:55  
Reply With Quote #24

nice plugin... dosnt work... server crashed
Mulan is offline
Send a message via ICQ to Mulan
scriptyboy
BANNED
Join Date: Sep 2005
Old 09-30-2005 , 15:27  
Reply With Quote #25

Quote:
Originally Posted by boadmin
I dont know why this plugin isnt working right now...cant test it till next wed or thurs...it kept crashing my HLDS last night while i was setting a model to my steam id...I dont know why.
ill try to work the bugs out.
scriptyboy is offline
scriptyboy
BANNED
Join Date: Sep 2005
Old 09-30-2005 , 15:33  
Reply With Quote #26

try this...plugin download at botom.

Code:
// Thanks Suicid3 for helping me make this plugin #include <amxmodx>    #include <amxmisc>    #include <cstrike>  #define MAX_STUFF  64    /* / How it works    g_szInfo[i][0] = AuthID    g_szInfo[i][1] = Model    / */    new g_szInfo[MAX_STUFF][2][65]    new g_iCount = 0    public plugin_init()    {        register_plugin("playermodel", "0.2", "boadmin")        register_event("ResetHUD", "resetModel", "b")          ReadFile()    }    public ReadFile()    {        new szFile[66]        get_configsdir( szFile , 65 )        format(szFile , 65 , "%s/models.ini",szFile)        if(!file_exists(szFile))    {            log_amx("[ChickenSuit] File ^"%s^" does not exist.",szFile)          return PLUGIN_HANDLED    }        new szLine[01] , line = 0, len = 0        while(read_file(szFile, line++ , szLine , 100 , len) && (g_iCount < MAX_STUFF) )        {            if(szLine[0] == ';' || !len) continue            strbreak(szLine, g_szInfo[g_iCount][0] , 63 , g_szInfo[g_iCount][1] , 63)            g_iCount++        }        return PLUGIN_CONTINUE    }  //Your code revised    public plugin_precache() {          for(new i = 0; i < g_iCount; i++)        {           precache_model(g_szInfo[i][1])   //I think this should work.           //If it doesnt work try adding "g_szInfo[i][1] =  " before precache_model        }    }      public resetModel(id, level, cid) {              new authid[50]              get_user_authid(id,authid,49)              for(new i = 0; i < g_iCount; i++)            {                 if(equali(authid,g_szInfo[i][0])) {                         new CsTeams:userTeam = cs_get_user_team(id)                         if (userTeam == CS_TEAM_T) {                                 cs_set_user_model(id, g_szInfo[i][1])                         }                         else if(userTeam == CS_TEAM_CT) {                                 cs_set_user_model(id, g_szInfo[i][1])                         }                         else {                                 cs_reset_user_model(id)                         }                    }            }              return PLUGIN_CONTINUE      }

changed:

Code:
for(new i = 0; i <g_iCount; i++)
to

Code:
for(new i = 0; i < g_iCount; i++)
and i dont know if this was the problem...im not sure at all...but

Code:
new szLine[101] , line = 0, len = 0
to

Code:
new szLine[01] , line = 0, len = 0
Attached Files
File Type: sma Get Plugin or Get Source (playermodel.sma - 965 views - 2.2 KB)
scriptyboy is offline
BACARRA
Senior Member
Join Date: Mar 2005
Old 09-30-2005 , 19:07  
Reply With Quote #27

does it work or not?
BACARRA is offline
scriptyboy
BANNED
Join Date: Sep 2005
Old 09-30-2005 , 19:34  
Reply With Quote #28

well...if u read my above post on page 2...you will know that i need someone to test the fixed version...(i dont have access to a server at the moment.)
scriptyboy is offline
BACARRA
Senior Member
Join Date: Mar 2005
Old 09-30-2005 , 19:45  
Reply With Quote #29

kk ill install it right now and test for you.
just wondering shouldnt "player/chickenmodel/chickenmodel.mdl" be
"models/player/chickenmodel/chickenmodel.mdl"
BACARRA is offline
scriptyboy
BANNED
Join Date: Sep 2005
Old 09-30-2005 , 19:50  
Reply With Quote #30

yea it should.
scriptyboy is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode