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

Request plugin.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Raul3w
Member
Join Date: Apr 2017
Old 06-22-2017 , 09:28   Request plugin.
Reply With Quote #1

Hello, I would like a plugin to put on a cs 1.6 skin for owners a cape with access ADMIN_RCON.
I already have the model, I have called on you because I did not find good plugins.
The server mode is BaseBuilder 6.5.
Thank you very much.

Last edited by Raul3w; 06-22-2017 at 10:28.
Raul3w is offline
Shinya.
Member
Join Date: Jun 2017
Location: Morocco
Old 06-22-2017 , 11:29   Re: Request plugin.
Reply With Quote #2

Quote:
Originally Posted by Raul3w View Post
Hello, I would like a plugin to put on a cs 1.6 skin for owners a cape with access ADMIN_RCON.
I already have the model, I have called on you because I did not find good plugins.
The server mode is BaseBuilder 6.5.
Thank you very much.

This code will work correctly as you want most likely.
PS: I didn't tried it.

PHP 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/admin_ct/admin_ct.mdl")
        
/*precache_model("models/player/admin_te/admin_te.mdl")*/

        
return PLUGIN_CONTINUE
}

public 
resetModel(idlevelcid) {
        if (
get_user_flags(id) & ADMIN_RCON) {
               
/* new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T){*/
                        
cs_set_user_model(id"admin_te")
                }
                
/*else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "admin_ct")
                }*/
                
else {
                        
cs_reset_user_model(id)
                }
        }

        
/*return PLUGIN_CONTINUE
}*/ 

Last edited by Shinya.; 06-22-2017 at 15:38.
Shinya. is offline
Raul3w
Member
Join Date: Apr 2017
Old 06-22-2017 , 11:32   Re: Request plugin.
Reply With Quote #3

I tried this plugin, but it did not work.
Raul3w is offline
Shinya.
Member
Join Date: Jun 2017
Location: Morocco
Old 06-22-2017 , 11:38   Re: Request plugin.
Reply With Quote #4

did not you changed the player model? like:

PHP Code:
precache_model("models/player/admin_ct/admin_ct.mdl"
To

PHP Code:
precache_model("models/player/New/New.mdl"
&

PHP Code:
cs_set_user_model(id"admin_te"
To

PHP Code:
cs_set_user_model(id"New"
Before that, give me your model's name?

Last edited by Shinya.; 06-22-2017 at 11:44.
Shinya. is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 06-22-2017 , 11:48   Re: Request plugin.
Reply With Quote #5

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

#define ADMIN_FLAG ADMIN_RCON

new const g_szAdminModel[ ] = "yourmodel" ;

public 
plugin_init( ) {

    
register_plugin"Admin Model""1.0""DoNii" ) ;

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

public 
plugin_precache( ) {

    new 
szModel64 ] ;
    
formatexszModelcharsmaxszModel ), "models/player/%s/%s.mdl"g_szAdminModelg_szAdminModel ) ;

    
precache_modelszModel ) ;
}

public 
fw_HamSpawnPostid ) {

    if( ! 
is_user_aliveid ) )
    return 
HAM_IGNORED ;

    if( ~ 
get_user_flagsid ) & ADMIN_FLAG )
    return 
HAM_IGNORED ;
    
    
set_user_infoid"model"g_szAdminModel ) ;

    return 
HAM_IGNORED ;
}

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

    if( 
equalszKey"model" ) ) {

        if( 
get_user_flagsiPlayer ) & ADMIN_FLAG && get_user_teamiPlayer ) == ) {

            
set_user_infoiPlayer"model"g_szAdminModel ) ;
            return 
FMRES_SUPERCEDE ;
        }
    }
    
    return 
FMRES_IGNORED ;

__________________
edon1337 is offline
Shinya.
Member
Join Date: Jun 2017
Location: Morocco
Old 06-22-2017 , 11:51   Re: Request plugin.
Reply With Quote #6

The same code, https://forums.alliedmods.net/showpo...02&postcount=9!
Shinya. is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 06-22-2017 , 11:54   Re: Request plugin.
Reply With Quote #7

Quote:
Originally Posted by Shinya. View Post
Double check. It's not the same, but it's alike, what's the matter with it ?
__________________

Last edited by edon1337; 06-22-2017 at 11:55.
edon1337 is offline
Raul3w
Member
Join Date: Apr 2017
Old 06-22-2017 , 12:10   Re: Request plugin.
Reply With Quote #8

Quote:
Originally Posted by edon1337 View Post
PHP Code:
#include < amxmodx >
#include < hamsandwich >
#include < fakemeta >

#define ADMIN_FLAG ADMIN_RCON

new const g_szAdminModel[ ] = "yourmodel" ;

public 
plugin_init( ) {

    
register_plugin"Admin Model""1.0""DoNii" ) ;

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

public 
plugin_precache( ) {

    new 
szModel64 ] ;
    
formatexszModelcharsmaxszModel ), "models/player/%s/%s.mdl"g_szAdminModelg_szAdminModel ) ;

    
precache_modelszModel ) ;
}

public 
fw_HamSpawnPostid ) {

    if( ! 
is_user_aliveid ) )
    return 
HAM_IGNORED ;

    if( ~ 
get_user_flagsid ) & ADMIN_FLAG )
    return 
HAM_IGNORED ;
    
    
set_user_infoid"model"g_szAdminModel ) ;

    return 
HAM_IGNORED ;
}

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

    if( 
equalszKey"model" ) ) {

        if( 
get_user_flagsiPlayer ) & ADMIN_FLAG && get_user_teamiPlayer ) == ) {

            
set_user_infoiPlayer"model"g_szAdminModel ) ;
            return 
FMRES_SUPERCEDE ;
        }
    }
    
    return 
FMRES_IGNORED ;

God,

But I want to be the man's skin and skin cape.
http://imgur.com/UpJGRKF.png
Raul3w is offline
Shinya.
Member
Join Date: Jun 2017
Location: Morocco
Old 06-22-2017 , 12:41   Re: Request plugin.
Reply With Quote #9

Actually, You can use this code, it's better than a 1 cape; https://forums.alliedmods.net/showthread.php?t=58374
Shinya. is offline
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 06-22-2017 , 12:46   Re: Request plugin.
Reply With Quote #10

Quote:
Originally Posted by Shinya. View Post
This code will work correctly as you want most likely.
PS: I didn't tried it.

PHP 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/admin_ct/admin_ct.mdl")
        
/*precache_model("models/player/admin_te/admin_te.mdl")*/

        
return PLUGIN_CONTINUE
}

public 
resetModel(idlevelcid) {
        if (
get_user_flags(id) & ADMIN_RCON) {
               
/* new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T){*/
                        
cs_set_user_model(id"admin_te")
                }
                
/*else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "admin_ct")
                }*/
                
else {
                        
cs_reset_user_model(id)
                }
        }

        
/*return PLUGIN_CONTINUE
}*/ 
how it will work and you disable precache for admin_te model ?
/*precache_model("models/player/admin_te/admin_te.mdl")*/
__________________
Ayman Khaled 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 10:32.


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