AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved bug change vip skin (https://forums.alliedmods.net/showthread.php?t=293983)

Night Wolf90 02-16-2017 15:52

bug change vip skin
 
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 03-07-2017 07:39

Re: bug change vip skin
 
any idea?

OciXCrom 03-07-2017 08:29

Re: bug change vip skin
 
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"

georgik57 03-07-2017 10:28

Re: bug change vip skin
 
I'd advise you to use Mercylezz's Player Models API in order to avoid SVC_BAD kicks.


All times are GMT -4. The time now is 20:43.

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