Raised This Month: $ Target: $400
 0% 

Problem about read file and set someting?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 06-27-2009 , 10:25   Re: Problem about read file and set someting?
Reply With Quote #5

can i do like this ?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define PLUGIN "Set Player Model"
#define VERSION "1.0"
#define AUTHOR "K.K.Lv"

new configsdir[64]
public 
plugin_init() {
 
register_plugin(PLUGINVERSIONAUTHOR)
 
 
RegisterHam(Ham_Spawn"player""set_model")
 
get_configsdir(configsdir63)
 
format(configsdir63"%s/plmodels.ini"configsdir)
}
public 
plugin_precache() {
 
precache_model("models/player/admin_ct/admin_ct.mdl")
 
precache_model("models/player/admin_te/admin_te.mdl")
}
public 
set_model(id) {
 new 
name[32], parsedmodels[32], readdata[128], parsedname[32]
 new 
txtlen
 get_user_name
(idname31)
 
 new 
line 0
 
while(!read_file(configsdirline++, 127txtlen)) {
  
parse(configsdirparsedname31parsedmodels31)
  if (
equal(nameparsedname) {
   if (
get_user_flags(id) & ADMIN_KICK) {
    
cs_set_user_model(idparsedmodels)
    break
   }
  }
 }

K.K.Lv is offline
Send a message via MSN to K.K.Lv
 



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 15:39.


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