Raised This Month: $ Target: $400
 0% 

Solved [HELP]Vip Skin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-02-2017 , 11:02   Re: [HELP]Vip Skin
Reply With Quote #1

I'm pretty sure I told you how to fix that 20 minutes ago.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Restart
Senior Member
Join Date: Nov 2016
Location: Lithuania
Old 04-02-2017 , 11:07   Re: [HELP]Vip Skin
Reply With Quote #2

Ok
Restart is offline
Send a message via Skype™ to Restart
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-02-2017 , 13:06   Re: [HELP]Vip Skin
Reply With Quote #3

Who told you that? If there are more %s than the number of arguments after the string, it will throw out a "string formatted incorrectly" error, as you can see in the previous post. With that the plugin will NOT work.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-02-2017 , 14:22   Re: [HELP]Vip Skin
Reply With Quote #4

Quote:
Originally Posted by OciXCrom View Post
Who told you that? If there are more %s than the number of arguments after the string, it will throw out a "string formatted incorrectly" error, as you can see in the previous post. With that the plugin will NOT work.
You're right! I didn't know, sorry.

The code before didn't even work, here's the working one + tested.
Code:
#include < amxmodx > #include < fakemeta > #include < hamsandwich > new const g_szModel[ ] = "bill" ; #define ADMIN_FLAG ADMIN_KICK public plugin_init( ) {     register_plugin( "Admin Skin", "1.0", "DoNii" ) ;     RegisterHam( Ham_Spawn, "player", "fw_HamSpawnPost", 1 ) ;     register_forward( FM_SetClientKeyValue, "fw_SetClientKeyValue" ) } public plugin_precache( ) {     new szBuffer[ 64 ] ;     formatex( szBuffer, charsmax( szBuffer ), "models/player/%s/%s.mdl", g_szModel, g_szModel ) ;         precache_model( szBuffer ) ; } public fw_HamSpawnPost( id ) {     if( ! is_user_alive( id ) )     return HAM_IGNORED ;     if( ~ get_user_flags( id ) & ADMIN_FLAG )     return HAM_IGNORED ;     if( get_user_team( id ) != 2 )     return HAM_IGNORED ;     set_user_info( id, "model", g_szModel ) ;         return HAM_HANDLED ; } public fw_SetClientKeyValue( id, const infobuffer[ ], const key[ ] ) {     if( get_user_team( id ) != 2 )     return FMRES_IGNORED ;     if( ~ get_user_flags( id ) & ADMIN_KICK )     return FMRES_IGNORED ;     if( equal( key, "model" ) ) {         set_user_info( id, "model", g_szModel ) ;         return FMRES_SUPERCEDE ;     }         return FMRES_IGNORED ; }
__________________
edon1337 is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 04-02-2017 , 13:26   Re: [HELP]Vip Skin
Reply With Quote #5

try this will be work for you fine and tested by me.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init()
{
        
register_plugin("Vip Skin""1.0""author")
        
register_event("ResetHUD""RestVipSkin""b")
}

public 
plugin_precache()
{
        
precache_model("models/player/YOUR_SKIN_MODEL/YOUR_SKIN_MODEL.mdl")
}

public 
RestVipSkin(id)
{
        if (
get_user_flags(id) & ADMIN_LEVEL_H) {
                if (
cs_get_user_team(id) == CS_TEAM_CT) {
                        
cs_set_user_model(id"YOUR_SKIN_MODEL")
                }
                else {
                        
cs_reset_user_model(id)
                }
        }

        return 
PLUGIN_CONTINUE

__________________

Last edited by D3XT3R; 04-02-2017 at 13:34.
D3XT3R is offline
Send a message via Skype™ to D3XT3R
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-02-2017 , 14:24   Re: [HELP]Vip Skin
Reply With Quote #6

Quote:
Originally Posted by D3XT3R View Post
try this will be work for you fine and tested by me.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init()
{
        
register_plugin("Vip Skin""1.0""author")
        
register_event("ResetHUD""RestVipSkin""b")
}

public 
plugin_precache()
{
        
precache_model("models/player/YOUR_SKIN_MODEL/YOUR_SKIN_MODEL.mdl")
}

public 
RestVipSkin(id)
{
        if (
get_user_flags(id) & ADMIN_LEVEL_H) {
                if (
cs_get_user_team(id) == CS_TEAM_CT) {
                        
cs_set_user_model(id"YOUR_SKIN_MODEL")
                }
                else {
                        
cs_reset_user_model(id)
                }
        }

        return 
PLUGIN_CONTINUE

That's one of the worst Model changing codes I've ever seen. Good job.
__________________
edon1337 is offline
Restart
Senior Member
Join Date: Nov 2016
Location: Lithuania
Old 04-02-2017 , 14:39   Re: [HELP]Vip Skin
Reply With Quote #7

Thanks, i wil try
Restart is offline
Send a message via Skype™ to Restart
Restart
Senior Member
Join Date: Nov 2016
Location: Lithuania
Old 04-02-2017 , 14:56   Re: [HELP]Vip Skin
Reply With Quote #8

Both options not working Something is wrong with mine Umbrella Skin.
Restart is offline
Send a message via Skype™ to Restart
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-02-2017 , 13:28   Re: [HELP]Vip Skin
Reply With Quote #9

Why these return at plugin_precache() and RestVipSkin() ? why (id, level, cid)?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 04-02-2017 at 13:29.
EFFx is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 04-02-2017 , 13:33   Re: [HELP]Vip Skin
Reply With Quote #10

Quote:
Originally Posted by EFFx View Post
Why these return at plugin_precache() and RestVipSkin() ? why (id, level, cid)?
why i answer you?, and you didnt answer me to support in yours furien mod.
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
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 00:53.


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