Raised This Month: $51 Target: $400
 12% 

Cs 1.6 V.I.P/Admin model Plugin !


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alilp
Junior Member
Join Date: Aug 2017
Old 08-06-2017 , 12:20   Cs 1.6 V.I.P/Admin model Plugin !
Reply With Quote #1

Hey !
I tried some of V.I.P/Admin model plugins but non of them worked !
Could you pls make me a working model changer using "ADMIN_CHAT" (my vips has admin_chat permission too ) .
__________________
Never Learned any scripting lang completely but always got what I wanted by editing and learning the things I need from others scripts !
So please be kind with me and dont see me as a pro .

Last edited by alilp; 08-06-2017 at 12:43.
alilp is offline
batu07040
Junior Member
Join Date: Dec 2016
Old 08-06-2017 , 12:27   Re: Cs 1.6 V.I.P/Admin model Plugin !
Reply With Quote #2

Ohh, Basic

Code:
if ( get_user_flags (id) & ADMIN_CHAT )
{

	cs_set_user_model(id,"modelname");	

}
batu07040 is offline
alilp
Junior Member
Join Date: Aug 2017
Old 08-06-2017 , 12:33   Re: Cs 1.6 V.I.P/Admin model Plugin !
Reply With Quote #3

Quote:
Originally Posted by batu07040 View Post
Ohh, Basic

Code:
if ( get_user_flags (id) & ADMIN_CHAT )
{

	cs_set_user_model(id,"modelname");	

}
its my code after editing is it right ?
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
        register_plugin("AMX Admin Model", "1.1.1", "whitemike")
        register_event("ResetHUD", "resetModel", "b")
        return PLUGIN_CONTINUE
}

public plugin_precache() {
        precache_model("models/player/ALILP-VIP/VIP.mdl")
        precache_model("models/player/ALILP-VIP/vipt.mdl")

        return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
        if (get_user_flags(id) & ADMIN_CHAT) {

                        cs_set_user_model(id, "VIP")

        }

        return PLUGIN_CONTINUE
}
my signature describe my condition
__________________
Never Learned any scripting lang completely but always got what I wanted by editing and learning the things I need from others scripts !
So please be kind with me and dont see me as a pro .

Last edited by alilp; 08-06-2017 at 12:43.
alilp is offline
batu07040
Junior Member
Join Date: Dec 2016
Old 08-06-2017 , 12:50   Re: Cs 1.6 V.I.P/Admin model Plugin !
Reply With Quote #4

@alilp;
If you want both teams to look different

Code:
if (get_user_flags (id) & ADMIN_CHAT) 
{

if (get_user_team(id) == 1)
{

cs_set_user_model(id, "vipt")

}

if (get_user_team (id) == 2)
{

cs_set_user_model(id, "VIP")

}


}

Last edited by batu07040; 08-06-2017 at 12:50.
batu07040 is offline
alilp
Junior Member
Join Date: Aug 2017
Old 08-06-2017 , 13:00   Re: Cs 1.6 V.I.P/Admin model Plugin !
Reply With Quote #5

@batu07040;
what should i do to use my own vip model instead of cs default vip model?
__________________
Never Learned any scripting lang completely but always got what I wanted by editing and learning the things I need from others scripts !
So please be kind with me and dont see me as a pro .
alilp is offline
batu07040
Junior Member
Join Date: Dec 2016
Old 08-06-2017 , 13:13   Re: Cs 1.6 V.I.P/Admin model Plugin !
Reply With Quote #6

Change paths you show

so

precache_model("models/player/yourmodel.mdl")
precache_model("models/player/yourmodelt.mdll")

Last edited by batu07040; 08-06-2017 at 13:14.
batu07040 is offline
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 08-06-2017 , 13:41   Re: Cs 1.6 V.I.P/Admin model Plugin !
Reply With Quote #7

Quote:
Originally Posted by batu07040 View Post
Change paths you show

so

precache_model("models/player/yourmodel.mdl")
precache_model("models/player/yourmodelt.mdll")
precache_model("models/player/yourmodel/yourmodel.mdl")
precache_model("models/player/yourmodelt/yourmodelt.mdll")
__________________

Last edited by Ayman Khaled; 08-06-2017 at 13:42.
Ayman Khaled is offline
alilp
Junior Member
Join Date: Aug 2017
Old 08-07-2017 , 02:12   Re: Cs 1.6 V.I.P/Admin model Plugin !
Reply With Quote #8

i am using precache but it seems its not helping me because it will show default model when i use precache and want to use my own model.
here is my code
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
        register_plugin("AMX VIP Model", "0.0.1", "ALILP")
        register_event("ResetHUD", "resetModel", "b")
        return PLUGIN_CONTINUE
}

public plugin_precache() {
        precache_model("models/player/ALILP-VIP/ALILP-VIP.mdl")
        precache_model("models/player/ALILP-VIPT/ALILP-VIPT.mdl")
        return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
	
if (get_user_flags (id) & ADMIN_CHAT) 
{

if (get_user_team(id) == 1)
{

cs_set_user_model(id, "ALILP-VIPT")

}

if (get_user_team (id) == 2)
{

cs_set_user_model(id, "ALILP-VIP")

}


}
        return PLUGIN_CONTINUE
}
__________________
Never Learned any scripting lang completely but always got what I wanted by editing and learning the things I need from others scripts !
So please be kind with me and dont see me as a pro .
alilp is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 08-07-2017 , 09:09   Re: Cs 1.6 V.I.P/Admin model Plugin !
Reply With Quote #9

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

#define FLAG ADMIN_CHAT

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	RegisterHam(Ham_Spawn,"player","FnHamSpawn",1)
}

public plugin_precache()
{
	precache_model("models/player/ALILP-VIPT/ALILP-VIPT.mdl")
	precache_model("models/player/ALILP-VIP/ALILP-VIP.mdl")
}

public FnHamSpawn(id)
{
	if(is_user_alive(id))
	{
		if(get_user_flags(id) & FLAG)
		{
			if(cs_get_user_team(id) == CS_TEAM_CT)
			{
				cs_set_user_model(id,"ALILP-VIP")
			}
			else
			{
				cs_set_user_model(id,"ALILP-VIPT")
			}
		}
	}
}
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-08-2017 , 06:27   Re: Cs 1.6 V.I.P/Admin model Plugin !
Reply With Quote #10

PHP Code:
#include < amxmodx >
#include < hamsandwich >
#include < fakemeta >

#define VIP_FLAG ADMIN_LEVEL_H

new const g_szVipModelT[ ] = "vip_model_t" ;
new const 
g_szVipModelCT[ ] = "vip_model_ct" ;

public 
plugin_init( ) {

    
register_plugin"VIP Model""1.0""DoNii" ) ;

    
register_forwardFM_SetClientKeyValue"fw_FMSetClientKeyValuePre") ;
    
    
RegisterHamHam_Spawn"player""fw_HamSpawnPost") ;
}

public 
plugin_precache( ) {

    new 
szModelT64 ], szModelCT64 ] ;
    
    
formatexszModelTcharsmaxszModelT ), "models/player/%s/%s.mdl"g_szVipModelTg_szVipModelT ) ;
    
precache_modelszModelT ) ;
    
    
formatexszModelCTcharsmaxszModelCT ), "models/player/%s/%s.mdl"g_szVipModelCTg_szVipModelCT ) ;
    
precache_modelszModelCT ) ;
}

public 
fw_HamSpawnPostid ) {

    if( ! 
is_user_aliveid ) )
    return 
HAM_IGNORED ;
    
    if( ~ 
get_user_flagsid ) & VIP_FLAG )
    return 
HAM_IGNORED ;
    
    switch( 
get_user_teamid ) ) {
        
    case 
1: {
            
            
set_user_infoid"model"g_szVipModelT ) ;
        }
        
    case 
2: {
            
            
set_user_infoid"model"g_szVipModelCT ) ;
        }
    }

    return 
HAM_IGNORED ;
}

public 
fw_FMSetClientKeyValuePreiPlayer, const szBuffer[ ], const szKey[ ] ) {

    if( 
equalszKey"model" ) ) {
        
        if( 
get_user_flagsiPlayer ) & VIP_FLAG ) {

            switch( 
get_user_teamiPlayer ) ) {
                
            case 
1: {
                    
                    
set_user_infoiPlayer"model"g_szVipModelT ) ;
                    return 
FMRES_SUPERCEDE ;
                }
                
            case 
2: {
                    
                    
set_user_infoiPlayer"model"g_szVipModelCT ) ;
                    return 
FMRES_SUPERCEDE ;
                }
            }
        }
    }
    
    return 
FMRES_IGNORED ;

__________________
edon1337 is offline
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 03:15.


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