Raised This Month: $12 Target: $400
 3% 

use an ini file to...


Post New Thread Reply   
 
Thread Tools Display Modes
scriptyboy
BANNED
Join Date: Sep 2005
Old 09-28-2005 , 17:09  
Reply With Quote #21

just open up the bmp file and color the skin how u want...u can open it with mspaint, photoshop, and any picture editor.
scriptyboy is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 09-28-2005 , 17:10  
Reply With Quote #22

1) No that will not work for the ini file.
2) No that script that smallwimpyboy did wont be correctly.
dont try and fix what you dont understand but by all means look at it and learn what its doing.

Quote:
Originally Posted by Example INI file
;Add as many steam ids to agree with model...using:
;"STEAM ID" "Model Location\model.mdl"

ini file goes in amxmodx/configs/models.ini

;Example (remove the slashes to make this work.)
;"STEAM_0:0:1967352" "player\chickenmodel\chickenmodel.mdl"
; comments begin with ; not // in this file.
; location of model has to be in cstrike/models/ then whatever location it is.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
smallwimpyboy
Senior Member
Join Date: Aug 2005
Location: United States
Old 09-28-2005 , 17:11  
Reply With Quote #23

HEY how was i suppose to know if it worked in game or not he just wanted the errors gone so back off
smallwimpyboy is offline
Send a message via AIM to smallwimpyboy Send a message via MSN to smallwimpyboy
smallwimpyboy
Senior Member
Join Date: Aug 2005
Location: United States
Old 09-28-2005 , 17:13  
Reply With Quote #24

Quote:
Originally Posted by boadmin
just open up the bmp file and color the skin how u want...u can open it with mspaint, photoshop, and any picture editor.
Oh and i thought you wanted it bigger ... i can change color of it ... it will be done in a few minuts...
smallwimpyboy is offline
Send a message via AIM to smallwimpyboy Send a message via MSN to smallwimpyboy
smallwimpyboy
Senior Member
Join Date: Aug 2005
Location: United States
Old 09-28-2005 , 17:14  
Reply With Quote #25

so you want it all yellow?
smallwimpyboy is offline
Send a message via AIM to smallwimpyboy Send a message via MSN to smallwimpyboy
scriptyboy
BANNED
Join Date: Sep 2005
Old 09-28-2005 , 17:19  
Reply With Quote #26

Quote:
Originally Posted by smallwimpyboy
so you want it all yellow?
Yea...but i want it to look like feathers...

and now i get a loose indentation error on line 62...any ideas??



this is line 62

Code:
else if(userTeam == CS_TEAM_CT) {

Full Code:
Code:
#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() {     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^" doestn exist. Please insure its there.")         return PLUGIN_HANDLED     }     new szLine[101] , 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   }
scriptyboy is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 09-28-2005 , 17:23  
Reply With Quote #27

1) Dont worry about loose indentation it means nothing
2) Thats still not all the code you need.
3) You really dont know how to script at all do you?
4) Blah.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 09-28-2005 , 17:26  
Reply With Quote #28

Fixed code: This is pathetic.
Code:
//that //... in plugin_init means that you needed to fill in the other info there. #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("CHICKEN SUIT", "0.1", "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^" doestn exist. Please insure its there.")         return PLUGIN_HANDLED     }     new szLine[101] , 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   }

[EDIT] forgot about your poor loose indentation....fixed.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
scriptyboy
BANNED
Join Date: Sep 2005
Old 09-28-2005 , 17:26  
Reply With Quote #29

Then why cant you just post the exact code i need? PLEASE
scriptyboy is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 09-28-2005 , 17:29  
Reply With Quote #30

Quote:
Originally Posted by boadmin
Then why cant you just post the exact code i need? PLEASE :oops:
<RANT>
I wanted you to learn something not just get it for free and then post it with no credit to the actual author of the code. Thats why. But your too dense to add two lines of code that you had in your origional code to make it work. Therefore I can rightfully call you dense. Dense I say, dense.
</RANT>

P.S: That last bit is the full code.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Reply



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 14:14.


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