Raised This Month: $ Target: $400
 0% 

Solved bug change vip skin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Night Wolf90
Member
Join Date: Jan 2016
Old 02-16-2017 , 15:52   bug change vip skin
Reply With Quote #1

Hi
I install this plugin on server for change skin vip & admin but this plugin have bug!
if select the first player from tr or ct show skin and select other player not show skin.
when change team show skin Previous team. example if you are tr and change team to ct show skin tr
plz fix bug this cod!

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN_NAME "V.I.P Model Changer"
#define PLUGIN_VERSION "1.0.0"
#define PLUGIN_AUTHOR "monister"

public plugin_init() {
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR)
register_event("ResetHUD""resetModel""b")
return 
PLUGIN_CONTINUE
}
public 
plugin_precache() {
precache_model("models/player/VIP/vip_tr.mdl")
precache_model("models/player/VIP/vip_ct.mdl")

return 
PLUGIN_CONTINUE
}

public 
resetModel(idlevelcid) {
if (
get_user_flags(id) & ADMIN_LEVEL_H) {
new 
CsTeams:userTeam cs_get_user_team(id)
if (
userTeam == CS_TEAM_T) {
cs_set_user_model(id"vip_tr")
}
else if (
userTeam == CS_TEAM_CT) {
cs_set_user_model(id"vip_ct")
}
}

return 
PLUGIN_CONTINUE


Night Wolf90 is offline
Night Wolf90
Member
Join Date: Jan 2016
Old 03-07-2017 , 07:39   Re: bug change vip skin
Reply With Quote #2

any idea?
Night Wolf90 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-07-2017 , 08:29   Re: bug change vip skin
Reply With Quote #3

PHP Code:
"models/player/VIP/vip_tr.mdl"
"models/player/VIP/vip_ct.mdl" 
Have a look at all the models in your models/player folder and you will get the idea how they should be added. You can't add a model in a folder with a different name.

"models/player/MODEL_NAME/MODEL_NAME.mdl"
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 03-07-2017 , 10:28   Re: bug change vip skin
Reply With Quote #4

I'd advise you to use Mercylezz's Player Models API in order to avoid SVC_BAD kicks.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
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 20:43.


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