AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Request plugin. (https://forums.alliedmods.net/showthread.php?t=298773)

Raul3w 06-22-2017 09:28

Request plugin.
 
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.

Shinya. 06-22-2017 11:29

Re: Request plugin.
 
Quote:

Originally Posted by Raul3w (Post 2530669)
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
}*/ 


Raul3w 06-22-2017 11:32

Re: Request plugin.
 
I tried this plugin, but it did not work.

Shinya. 06-22-2017 11:38

Re: Request plugin.
 
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?

edon1337 06-22-2017 11:48

Re: Request plugin.
 
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 ;



Shinya. 06-22-2017 11:51

Re: Request plugin.
 
The same code, https://forums.alliedmods.net/showpo...02&postcount=9!

edon1337 06-22-2017 11:54

Re: Request plugin.
 
Quote:

Originally Posted by Shinya. (Post 2530700)

Double check. It's not the same, but it's alike, what's the matter with it ?

Raul3w 06-22-2017 12:10

Re: Request plugin.
 
Quote:

Originally Posted by edon1337 (Post 2530699)
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

Shinya. 06-22-2017 12:41

Re: Request plugin.
 
Actually, You can use this code, it's better than a 1 cape; https://forums.alliedmods.net/showthread.php?t=58374

Ayman Khaled 06-22-2017 12:46

Re: Request plugin.
 
Quote:

Originally Posted by Shinya. (Post 2530694)
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")*/


All times are GMT -4. The time now is 07:48.

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