Raised This Month: $32 Target: $400
 8% 

Need Vip Model Replacement Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
P0PC0rN
Member
Join Date: Jul 2016
Old 04-14-2017 , 13:26   Need Vip Model Replacement Plugin
Reply With Quote #1

hi guys
i need a plugin for vip skins that work by flags (like flag T)
that support replacing player and gun models
TnX


(sry for my en)
P0PC0rN is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-14-2017 , 13:56   Re: Need Vip Model Replacement Plugin
Reply With Quote #2

For player model
Code:
#include < amxmodx > #include < fakemeta > #include < hamsandwich > new const g_szModel[ ] = "bill" ; #define VIP_FLAG ADMIN_LEVEL_H 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 ) & VIP_FLAG )     return HAM_IGNORED ;     set_user_info( id, "model", g_szModel ) ;         return HAM_HANDLED ; } public fw_SetClientKeyValue( id, const infobuffer[ ], const key[ ] ) {     if( ~ get_user_flags( id ) & VIP_FLAG )     return FMRES_IGNORED ;     if( equal( key, "model" ) ) {         set_user_info( id, "model", g_szModel ) ;         return FMRES_SUPERCEDE ;     }         return FMRES_IGNORED ; }

For weapon models, you can edit GHW Weapon Replacement.
__________________

Last edited by edon1337; 04-14-2017 at 13:57.
edon1337 is offline
P0PC0rN
Member
Join Date: Jul 2016
Old 04-14-2017 , 14:44   Re: Need Vip Model Replacement Plugin
Reply With Quote #3

Quote:
Originally Posted by edon1337 View Post
For player model
Code:
#include < amxmodx > #include < fakemeta > #include < hamsandwich > new const g_szModel[ ] = "bill" ; #define VIP_FLAG ADMIN_LEVEL_H 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 ) & VIP_FLAG )     return HAM_IGNORED ;     set_user_info( id, "model", g_szModel ) ;         return HAM_HANDLED ; } public fw_SetClientKeyValue( id, const infobuffer[ ], const key[ ] ) {     if( ~ get_user_flags( id ) & VIP_FLAG )     return FMRES_IGNORED ;     if( equal( key, "model" ) ) {         set_user_info( id, "model", g_szModel ) ;         return FMRES_SUPERCEDE ;     }         return FMRES_IGNORED ; }

For weapon models, you can edit GHW Weapon Replacement.

thank you
sry if i want to set TR O CT different model for ADMIN_LEVEL_H what i must to do ?

+ how edit GHW plugin ? which part ?
P0PC0rN is offline
tarkan00
Senior Member
Join Date: Jan 2017
Old 04-14-2017 , 16:38   Re: Need Vip Model Replacement Plugin
Reply With Quote #4

Quote:
new const g_szModel[ ] = "bill" ;
if you do
Quote:
new const g_szModel[ ] = "xxx" ;
new model : models/player/xxx/xxx
GHW weapon model change plugin :
you just edit .ini/txt/config files ex:
Quote:
models/v_m4a1.mdl -----(as)---> models/newweaponmodel/v_xxx.mdl
in the .ini/txt/config files
tarkan00 is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-14-2017 , 16:55   Re: Need Vip Model Replacement Plugin
Reply With Quote #5

Code:
#include < amxmodx > #include < fakemeta > #include < hamsandwich > new const g_szModelT[ ] = "t_model" ; new const g_szModelCT[ ] = "ct_model" ; #define VIP_FLAG ADMIN_LEVEL_H 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 szBufferT[ 64 ], szBufferCT[ 64 ] ;     formatex( szBufferT, charsmax( szBufferT ), "models/player/%s/%s.mdl", g_szModelT, g_szModelT ) ;     formatex( szBufferCT, charsmax( szBufferCT ), "models/player/%s/%s.mdl", g_szModelCT, g_szModelCT ) ;         precache_model( szBufferT ) ;     precache_model( szBufferCT ) ; } public fw_HamSpawnPost( id ) {     if( ! is_user_alive( id ) )     return HAM_IGNORED ;     if( ~ get_user_flags( id ) & VIP_FLAG )     return HAM_IGNORED ;     switch( get_user_team( id ) ) {             case 1 : {                         set_user_info( id, "model", g_szModelT ) ;         }             case 2 : {                         set_user_info( id, "model", g_szModelCT ) ;         }     }         return HAM_HANDLED ; } public fw_SetClientKeyValue( id, const infobuffer[ ], const key[ ] ) {     if( ~ get_user_flags( id ) & VIP_FLAG )     return FMRES_IGNORED ;     if( equal( key, "model" ) ) {         switch( get_user_team( id ) ) {                     case 1 : {                                 set_user_info( id, "model", g_szModelT ) ;                 return FMRES_SUPERCEDE ;             }                     case 2 : {                                 set_user_info( id, "model", g_szModelCT ) ;                 return FMRES_SUPERCEDE ;             }         }     }         return FMRES_IGNORED ; }
__________________
edon1337 is offline
P0PC0rN
Member
Join Date: Jul 2016
Old 04-14-2017 , 22:46   Re: Need Vip Model Replacement Plugin
Reply With Quote #6

Quote:
Originally Posted by tarkan00 View Post
if you do


new model : models/player/xxx/xxx
GHW weapon model change plugin :
you just edit .ini/txt/config files ex:

in the .ini/txt/config files
i want to use vip models for special flags like T
how about that ?
P0PC0rN is offline
P0PC0rN
Member
Join Date: Jul 2016
Old 04-14-2017 , 22:50   Re: Need Vip Model Replacement Plugin
Reply With Quote #7

Quote:
Originally Posted by edon1337 View Post
Code:
#include < amxmodx > #include < fakemeta > #include < hamsandwich > new const g_szModelT[ ] = "t_model" ; new const g_szModelCT[ ] = "ct_model" ; #define VIP_FLAG ADMIN_LEVEL_H 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 szBufferT[ 64 ], szBufferCT[ 64 ] ;     formatex( szBufferT, charsmax( szBufferT ), "models/player/%s/%s.mdl", g_szModelT, g_szModelT ) ;     formatex( szBufferCT, charsmax( szBufferCT ), "models/player/%s/%s.mdl", g_szModelCT, g_szModelCT ) ;         precache_model( szBufferT ) ;     precache_model( szBufferCT ) ; } public fw_HamSpawnPost( id ) {     if( ! is_user_alive( id ) )     return HAM_IGNORED ;     if( ~ get_user_flags( id ) & VIP_FLAG )     return HAM_IGNORED ;     switch( get_user_team( id ) ) {             case 1 : {                         set_user_info( id, "model", g_szModelT ) ;         }             case 2 : {                         set_user_info( id, "model", g_szModelCT ) ;         }     }         return HAM_HANDLED ; } public fw_SetClientKeyValue( id, const infobuffer[ ], const key[ ] ) {     if( ~ get_user_flags( id ) & VIP_FLAG )     return FMRES_IGNORED ;     if( equal( key, "model" ) ) {         switch( get_user_team( id ) ) {                     case 1 : {                                 set_user_info( id, "model", g_szModelT ) ;                 return FMRES_SUPERCEDE ;             }                     case 2 : {                                 set_user_info( id, "model", g_szModelCT ) ;                 return FMRES_SUPERCEDE ;             }         }     }         return FMRES_IGNORED ; }

tnx bro
sry how i define vip model folder and name ?
i must change this "models/player/%s/%s.mdl" to "models/player/testfolder/testmode.mdl", ?
P0PC0rN is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-15-2017 , 04:33   Re: Need Vip Model Replacement Plugin
Reply With Quote #8

Quote:
Originally Posted by P0PC0rN View Post
tnx bro
sry how i define vip model folder and name ?
i must change this "models/player/%s/%s.mdl" to "models/player/testfolder/testmode.mdl", ?
Code:
new const g_szModelT[ ] = "t_model" ; new const g_szModelCT[ ] = "ct_model" ;
__________________
edon1337 is offline
P0PC0rN
Member
Join Date: Jul 2016
Old 04-15-2017 , 04:52   Re: Need Vip Model Replacement Plugin
Reply With Quote #9

Quote:
Originally Posted by edon1337 View Post
Code:
new const g_szModelT[ ] = "t_model" ; new const g_szModelCT[ ] = "ct_model" ;
thanks
sry i have another problem
if i want tu put t_model and ct_model into a folder what i must to do ?
P0PC0rN is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-15-2017 , 05:46   Re: Need Vip Model Replacement Plugin
Reply With Quote #10

Quote:
Originally Posted by P0PC0rN View Post
thanks
sry i have another problem
if i want tu put t_model and ct_model into a folder what i must to do ?
Let's say the model name is 'vip'.

You will create a folder called 'vip' in models/player/ and put your .mdl file in that folder.
So the path must be models/player/model_name/model_name.mdl
In the code you just need to change the model_name, path is automatically created.
You can't put both in the same folder.
__________________

Last edited by edon1337; 04-15-2017 at 05:46.
edon1337 is offline
Reply


Thread Tools
Display Modes

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


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