plugins de modo zombi
#1
modelo de mujer de CT DEJAR
admin_girl_ct
admin_girl_ct.mdl

modelo de mujer TT DEJAR
admin_girl_t
admin_girl_t.mdl


Código PHP:
#include <amxmodx>
#include <fakemeta>

/* ==========================================================
*                 [ Global stuff ]
* =========================================================== */

#define SetPlayerBit(%1,%2) ( %1 |= ( 1 << ( %2 & 31 ) ) )
#define GetPlayerBit(%1,%2) ( %1 & ( 1 << ( %2 & 31 ) ) )
#define ClearPlayerBit(%1,%2) ( %1 &= ~( 1 <<¿¿ ( %2 & 31 ) ) )

const ARG_MODELNAME 1;
const 
ARG_PLAYERID 12;

new const 
g_szCache_KeyModel[ ] = "model";
new const 
g_szModerl[ ][ ] = { "admin_t","admin_ct","admin_girl_t","admin_girl_ct" };

new 
g_iAdmin,g_iGirl,g_szPlayerModel33 ][ 32 ];

/* ==========================================================
*                 [ Initiation ]
* =========================================================== */

public plugin_precache( )
{
    new 
szData64 ];
    
    for( new 
i;sizeofg_szModel );i++ )
    {
        
formatexszData,charsmaxszData ),"models/player/%s/%s.mdl",g_szModel],g_szModel] );
        
precache_modelszData );
    }
}

public 
plugin_init( )
{
    
register_plugin"Admin Models","1.0","Manu" );

    
register_event"TeamInfo","ev_TeamInfo","a" );
    
register_forwardFM_SetClientKeyValue,"_fw_ClientKeyValue" );
    
register_messageget_user_msgid"ClCorpse" ),"message_ClCorpse" );
}

/* ==========================================================
*                 [ Main functions ]
* =========================================================== */

public ev_TeamInfo( )
{
    static 
iId,szTeam];
    
    
iId read_data);
    
read_data2,szTeam,charsmaxszTeam ) );
        
    if( 
GetPlayerBitg_iAdmin,iId .) )
    {
        
copyg_szPlayerModeliId ],charsmaxg_szPlayerModel[ ] ),g_szModelGetPlayerBitg_iGirl,iId ) ? ( szTeam] == 'T' 2:):( szTeam] == 'T' 0:) ] );
        
set_user_infoiId,g_szCache_KeyModel,g_szPlayerModeliId ] );
    }
}

public 
fw_ClientKeyValueiId,szBuffer[ ],.szKey[ ],szValue[ ] )
{
    if( 
GetPlayerBitg_iAdmin,iId ) && equalszKey,g_szCache_KeyModel ) && !equalszValue,g_szPlayerModeliId ] ) )
    {
        
set_user_infoiId,szKey,g_szPlayerModeliId ] );
        
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;
}

public 
message_ClCorpse( )
{
    static 
iIdiId get_msg_arg_intARG_PLAYERID );
    
    if( 
GetPlayerBitg_iAdmin,iId ) )
        
set_msg_arg_stringARG_MODELNAME,g_szPlayerModeliId ] );
}

/* ==========================================================
*                 [ Client-related ]
* =========================================================== */

public client_putinserveriId )
{
    static 
iFlagsiFlags get_user_flagsiId );
    
    if( 
iFlags ADMIN_KICK )
    {
        
SetPlayerBitg_iAdmin,i:Id );

        if( 
iFlags ADMIN_LEVEL_H )
            
SetPlayerBitg_iGirl,iId );
    }
}

public 
client_disconnectiId ClearPlayerBitg_iAdmin,iId ); 
Responder
#2
En que te podemos ayudar a editar que pacman ?Insecure
Responder
#3
en cambiar los modelos de admin de hombre
tonces to quiero cambiar modelo de CT de hombre por
gign
gign.mdl

tonces to quiero cambiar modelo de TT de hombre por
guerilla
Jack_Sparrow.mdl
Responder
#4
Usa un plugin normal - https://amxmodx-es.com/Thread-cambiar-mo...#pid179388
Plugins:
En GitHub
Responder
#5
me gustaria agrear 6 tipo de modelos a mis admin ,
me ayudan a editar
tonces lo que quiero es que cada admin tenga su modelo tonces con este acceso
. me gustaria que me ayuden a editar los accesos

ADMIN HOMBRE LETRA S

"pasta2_t","pasta_ct"

ADMIN MUJER LETRA T
"admin_girl_t","admin_girl_ct"

ADMIN HOMBRE LETRA R
"duro_t","duro2_ct"

Código PHP:
#include <amxmodx>
#include <fakemeta>

/* ==========================================================
*                 [ Global stuff ]
* =========================================================== */

#define SetPlayerBit(%1,%2) ( %1 |= ( 1 << ( %2 & 31 ) ) )
#define GetPlayerBit(%1,%2) ( %1 & ( 1 << ( %2 & 31 ) ) )
#define ClearPlayerBit(%1,%2) ( %1 &= ~( 1 << ( %2 & 31 ) ) )

const ARG_MODELNAME 1;
const 
ARG_PLAYERID 12;

new const 
g_szCache_KeyModel[ ] = "model";
new const 
g_szModel[ ][ ] = { "pasta2_t","pasta_ct","admin_girl_t","admin_girl_ct","duro_t","duro2_ct" };

new 
g_iAdmin,g_iGirl,g_szPlayerModel33 ][ 32 ];

/* ==========================================================
*                 [ Initiation ]
* =========================================================== */

public plugin_precache( )
{
    new 
szData64 ];
    
    for( new 
i;sizeofg_szModel );i++ )
    {
        
formatexszData,charsmaxszData ),"models/player/%s/%s.mdl",g_szModel],g_szModel] );
        
precache_modelszData );
    }
}

public 
plugin_init( )
{
    
register_plugin"Admin Models","1.0","Manu" );

    
register_event"TeamInfo","ev_TeamInfo","a" );
    
register_forwardFM_SetClientKeyValue,"fw_ClientKeyValue" );
    
register_messageget_user_msgid"ClCorpse" ),"message_ClCorpse" );
}

/* ==========================================================
*                 [ Main functions ]
* =========================================================== */

public ev_TeamInfo( )
{
    static 
iId,szTeam];
    
    
iId read_data);
    
read_data2,szTeam,charsmaxszTeam ) );
        
    if( 
GetPlayerBitg_iAdmin,iId ) )
    {
        
copyg_szPlayerModeliId ],charsmaxg_szPlayerModel[ ] ),g_szModelGetPlayerBitg_iGirl,iId ) ? ( szTeam] == 'T' 2:):( szTeam] == 'T' 0:) ] );
        
set_user_infoiId,g_szCache_KeyModel,g_szPlayerModeliId ] );
    }
}

public 
fw_ClientKeyValueiId,szBuffer[ ],szKey[ ],szValue[ ] )
{
    if( 
GetPlayerBitg_iAdmin,iId ) && equalszKey,g_szCache_KeyModel ) && !equalszValue,g_szPlayerModeliId ] ) )
    {
        
set_user_infoiId,szKey,g_szPlayerModeliId ] );
        
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;
}

public 
message_ClCorpse( )
{
    static 
iIdiId get_msg_arg_intARG_PLAYERID );
    
    if( 
GetPlayerBitg_iAdmin,iId ) )
        
set_msg_arg_stringARG_MODELNAME,g_szPlayerModeliId ] );
}

/* ==========================================================
*                 [ Client-related ]
* =========================================================== */

public client_putinserveriId )
{
    static 
iFlagsiFlags get_user_flagsiId );
    
    if( 
iFlags ADMIN_KICK )
    {
        
SetPlayerBitg_iAdmin,iId );

        if( 
iFlags ADMIN_LEVEL_H )
            
SetPlayerBitg_iGirl,iId );
    }
}

public 
client_disconnectiId ClearPlayerBitg_iAdmin,iId ); 
Responder
#6
Para los player y admin
Código PHP:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <csx>

enum _:MDL ACCESS[32], MDL_T[64], MDL_CT[64] }    // ip, steam, flag, #, *. # - steam; * - para todos
new stats[8],bodyhits[8];
new 
topLimit 15;    //El límite superior para emitir el modelo

#define MAX_MDL 64
new g_iBlockMdl[MAX_MDL];
new 
g_szModels[MAX_MDL][MDL];

new 
g_szPlayerModel[33][3][64];

public 
plugin_precache()
{
    new 
fp fopen("addons/amxmodx/configs/custom_models.ini""rt");
    if(!
fpset_fail_state("File addons/amxmodx/configs/custom_models.ini not found!");
    
    new 
buff[190], x;
    while(!
feof(fp))
    {
        
fgets(fpbuffcharsmax(buff)); trim(buff);
        if(!
buff[0] || buff[0] == ';')
            continue;
        if(
parse(buff
            
g_szModels[x][ACCESS], charsmax(g_szModels[][ACCESS]), 
            
g_szModels[x][MDL_T], charsmax(g_szModels[][MDL_T]), 
            
g_szModels[x][MDL_CT], charsmax(g_szModels[][MDL_CT])) == 3
        
x++;
    }
    
fclose(fp);
    if(!
xset_fail_state("File addons/amxmodx/configs/custom_models.ini incorrect!");

    for(new 
itctstr[64]; sizeof g_szModelsi++)
    {
        
formatex(strcharsmax(str), "models/player/%s/%s.mdl"g_szModels[i][MDL_T], g_szModels[i][MDL_T]);
        
file_exists(str);
        if(
tprecache_model(str);
        
        
formatex(strcharsmax(str), "models/player/%s/%s.mdl"g_szModels[i][MDL_CT], g_szModels[i][MDL_CT]);
        
ct file_exists(str);
        if(
ctprecache_model(str);
        
        
g_iBlockMdl[i] = (!&& !ct);
    }
}

public 
plugin_init()
{
    
register_plugin("Custom Models""1.3.2""neugomon");
    
    
RegisterHam(Ham_Spawn"player""fwd_HamSpawn_Post"true);
    
register_forward(FM_SetClientKeyValue"fwd_SetClientKeyValue_Pre"false);
}

public 
client_putinserver(id)
{
    new 
szIP[16];      get_user_ip(idszIPcharsmax(szIP), 1);
    new 
szAuthid[25];get_user_authid(idszAuthidcharsmax(szAuthid));
    new 
flags =      get_user_flags(id);

    
g_szPlayerModel[id][1][0] = EOS;
    
g_szPlayerModel[id][2][0] = EOS;
    
    for(new 
isizeof g_szModelsi++)
    {
        if(
g_iBlockMdl[i] == 1)
            continue;

        switch(
g_szModels[i][ACCESS][0])
        {
            case 
'p':
            {
                if(
get_user_stats(idstatsbodyhits) <= topLimit)
                {
                    
CopyModel(idi);
                    break;
                }
            }
            
            case 
'#':
            {
                if(
is_user_steam(id))
                {
                    
CopyModel(idi);
                    break;
                }    
            }
            case 
'*':
            {
                
CopyModel(idi);
                break;
            }
            case 
'S':
            {
                if(
strcmp(g_szModels[i][ACCESS], szAuthid) == 0)
                {
                    
CopyModel(idi);
                    break;
                }
            }
            default:
            {
                if(
isdigit(g_szModels[i][ACCESS][0]))
                {
                    if(
strcmp(g_szModels[i][ACCESS], szIP) == 0)
                    {
                        
CopyModel(idi);
                        break;
                    }
                }
                else if(
flags read_flags(g_szModels[i][ACCESS]))
                {
                    
CopyModel(idi);
                    break;
                }
            }
        }
    }
}

public 
fwd_HamSpawn_Post(id)
{
    if(!
is_user_alive(id))
        return;
        
    switch(
get_pdata_int(id114))
    {
        case 
1: if(g_szPlayerModel[id][1][0]) fmSetModel(idg_szPlayerModel[id][1]);
        case 
2: if(g_szPlayerModel[id][2][0]) fmSetModel(idg_szPlayerModel[id][2]);
    }
}

public 
fwd_SetClientKeyValue_Pre(id, const szInfobuffer[], const szKey[], const szValue[])
{    
    if(
strcmp(szKey"model") != 0)
        return 
FMRES_IGNORED;
    static 
iTeamiTeam get_pdata_int(id114);
    if(
iTeam != && iTeam != 2)
        return 
FMRES_IGNORED;
    if(
g_szPlayerModel[id][iTeam][0] && strcmp(szValueg_szPlayerModel[id][iTeam]) != 0)
    {
        
fmSetModel(idg_szPlayerModel[id][iTeam]);
        return 
FMRES_SUPERCEDE;
    }
    return 
FMRES_IGNORED;    
}

stock CopyModel(indexsId)
{
    
copy(g_szPlayerModel[index][1], charsmax(g_szPlayerModel[][]), g_szModels[sId][MDL_T]);
    
copy(g_szPlayerModel[index][2], charsmax(g_szPlayerModel[][]), g_szModels[sId][MDL_CT]);
}

stock fmSetModel(id, const model[])
    
engfunc(EngFunc_SetClientKeyValueidengfunc(EngFunc_GetInfoKeyBufferid), "model"model);
    
bool:is_user_steam(id)
{
    static 
dp_pointer;
    if(!
dp_pointerdp_pointer get_cvar_pointer("dp_r_id_provider");
    
    
server_cmd("dp_clientinfo %d"id);
    
server_exec();
    return (
get_pcvar_num(dp_pointer) == 2) ? true false;


custom_models.ini
Cita:;;; Custom Models by Neugomon ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Los modelos se pueden asignar a:
; 1 - IP
; 2 - STEAMID
; 3 - Bandera de acceso
; 4 - Para todos los Steam (use "#")
; 5 - Para todos (use "*")

;; Ejemplos

"127.0.0.1" "mimodeliptt" "mimodelipct"
"STEAM_0:1:1234" "mimodelsteamt" "mimodelsteamct"
//"t" "viptt" "vipct"
//"#" "steamtt" "steamct"
//"*" "t" "ct"
//"p" "topplayert" "topplayerct"
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)