Plugin Pedido de admins
#1
Buenas! estoy intentando activar el siguiente plugin, el tema es que me da error, al compilar, ya puse el inc de chema y todo y no me deja compilar,adjunto codigo

Código PHP:
/*
    | INFORMACIÓN |

    # Este PLUGIN ha sido creado por Chema.
*/

#include < amxmodx >
#include < amxmisc >
//#include < cstrike >
//#include < engine >
//#include < fakemeta >
//#include < hamsandwich >
//#include < fun >
//#include < xs >
//#include < sqlx >
#include < adv_vault >

const MESES_MAX 12;

enum _:adminData {
    
    
NOMBRE25 ],
    
COSTO
}

enum _:adminTimeData {
    
    
ACCESO,
    
TIEMPO
}

new const 
g_szAdminsData][ adminData ] = {
    
    { 
"VIP"20 },
    
    { 
"ADMIN"30 },
    
    { 
"SÚPER ADMIN"45 }
}

new 
CHAT_PREFIX[ ] = "!g[ BG ]!y";
new 
CONSOLE_PREFIX[ ] = "[ BG ]";

new const 
g_szFile[ ] = "pedidos.log";

new const 
g_szEmails[ ][ ] = {
    
    
"@live.com",
    
    
"@gmail.com",
    
    
"@hotmail.com",
    
    
"@live.com.ar",
    
    
"@gmail.com.ar",
    
    
"@hotmail.es",
    
    
"@hotmail.com.ar",

    
"@yahoo.com.ar"
};

new 
g_szText300 ],
    
g_iSent33 ],
    
g_szHotmail33 ][ 34 ],
    
g_iContador33 ][ adminTimeData ];

new 
g_iLen;

new 
g_iKeys MENU_KEY_0 MENU_KEY_1 MENU_KEY_2 MENU_KEY_3 MENU_KEY_4 MENU_KEY_5;

/* *** GUARDADO *** */

enum {
    
FIELD_SENT,
    
    
MAX_FIELDS
}

new 
g_iFieldsMAX_FIELDS ];
new 
g_iVault;

new 
g_szPlayerName33 ];

public 
plugin_init( ) {
    
    
register_plugin"Pedido de ADMINS""1.0""Chema" );
    
    
register_clcmd"say /pedido""SM_Pedido" );
    
    
register_clcmd"REGISTER_CONTACT""register_contact" );
    
    
register_menu"PEDIDO"g_iKeys"HM_Pedido");
    
register_menu"CONFIRMACION"g_iKeys"HM_Confirmacion");
    
    
AdvancedVault_Init( );
}

public 
AdvancedVault_Init( ) {
    
    
g_iVault adv_vault_open"bg_admincompra"false );
    
    
g_iFieldsFIELD_SENT ]     = adv_vault_register_fieldg_iVault"FIELD_SENT" );
    
    
adv_vault_initg_iVault );
}

public 
client_putinserverid ) {
    
    
g_iContadorid ][ ACCESO ] = 0;
    
g_iContadorid ][ TIEMPO ] = 0;

    
g_iSentid ] = 0;
    
    
g_szHotmailid ][ ] = 0;
    
    
get_user_nameidg_szPlayerNameid ], sizeofg_szPlayerName ) );
    
    
Load_Dataid );
}

public 
client_disconnectid ) {

    
g_szHotmailid ][ ] = 0;
    
    
Save_Dataid );
}

public 
SM_Pedidoid ) {
    
    if( 
g_iSentid ] == ) {
        
        
ColorChatid"Ya has enviado un pedido de compra." );
        return 
PLUGIN_HANDLED;
    }
    
    
g_iLen 0;
    
    
g_iLen += formatexg_szTextg_iLen ], sizeof g_szText g_iLen"\r[BG]\y COMPRAR ADMINISTRADOR^n^n" );
    
    
g_iLen += formatexg_szTextg_iLen ], sizeof g_szText g_iLen"\r1. \wTIPO: \d[ \r%s \d]^n"g_szAdminsDatag_iContadorid ][ ACCESO ] ][ NOMBRE ] );
    
g_iLen += formatexg_szTextg_iLen ], sizeof g_szText g_iLen"\r2. \wTIEMPO: \d[ \r%d MES%s \d]^n^n",( g_iContadorid ][ TIEMPO ] + ),( g_iContadorid ][ TIEMPO ] == "" "ES" ) );
    
g_iLen += formatexg_szTextg_iLen ], sizeof g_szText g_iLen"COSTO: \d[ \y$%d \d]^n^n",( g_szAdminsDatag_iContadorid ][ ACCESO ] ][ COSTO ] * ( g_iContadorid ][ TIEMPO ] + ) ) );
    
    
g_iLen += formatexg_szTextg_iLen ], sizeof g_szText g_iLen"\r3. \wE-Mail: \d[ \y%s\d ]^n^n"g_szHotmailid ][ ] == "\dIngresa tú E-Mail." g_szHotmailid ] );
    
    
g_iLen += formatexg_szTextg_iLen ], sizeof g_szText g_iLen"\r4. \wEnviar pedido^n^n" );
    
    
g_iLen += formatexg_szTextg_iLen ], sizeof g_szText g_iLen"\r0. \wSalir" );
    
    
show_menuidg_iKeysg_szText, -1"PEDIDO" );
    
    return 
PLUGIN_HANDLED;
}

public 
HM_Pedidoidkeysmenu ) {
    
    switch( 
keys ) {
        
        case 
0: {
            
            if( ++
g_iContadorid ][ ACCESO ] == )
                
g_iContadorid ][ ACCESO ] = 0;
                
            
SM_Pedidoid );
        }
            
        case 
1: {
            
            if( ++
g_iContadorid ][ TIEMPO ] == MESES_MAX )
                
g_iContadorid ][ TIEMPO ] = 0;
                
            
SM_Pedidoid );
        }
        
        case 
2: {
            
            
client_cmdid"messagemode REGISTER_CONTACT" );
        }
        
        case 
3: {
            
            if( 
g_szHotmailid ][ ] == ) {
                
                
g_iContadorid ][ ACCESO ] = 0;
                
g_iContadorid ][ TIEMPO ] = 0;
    
                
client_cmdid"spk buttons/button2.wav" );
                
ColorChatid"Debes ingresar un E-Mail." );
                
SM_Pedidoid );
                
                return 
PLUGIN_HANDLED;
            }
            
            
SM_Confirmacionid );
        }
    }
    
    return 
PLUGIN_HANDLED;
}

public 
SM_Confirmacionid ) {
    
    if( 
g_iSentid ] == ) {
        
        
ColorChatid"Ya has enviado un pedido de compra." );
        return;
    }
    
    
g_iLen 0;
    
    
g_iLen += formatexg_szTextg_iLen ], sizeof g_szText g_iLen"\r[BG]\y Â¿ESTA SEGURO QUE DESEA ENVIAR EL PEDIDO?^n^n" );
    
    
g_iLen += formatexg_szTextg_iLen ], sizeof g_szText g_iLen"\wTIPO: \d[ \r%s \d]^n"g_szAdminsDatag_iContadorid ][ ACCESO ] ][ NOMBRE ] );
    
g_iLen += formatexg_szTextg_iLen ], sizeof g_szText g_iLen"\wTIEMPO: \d[ \r%d MES%s \d]^n^n",( g_iContadorid ][ TIEMPO ] + ),( g_iContadorid ][ TIEMPO ] == "" "ES" ) );
    
g_iLen += formatexg_szTextg_iLen ], sizeof g_szText g_iLen"\wCOSTO: \d[ \y$%d \d]^n^n",( g_szAdminsDatag_iContadorid ][ ACCESO ] ][ COSTO ] * ( g_iContadorid ][ TIEMPO ] + ) ) );
    
    
g_iLen += formatexg_szTextg_iLen ], sizeof g_szText g_iLen"\wE-Mail: \d[ \y%s\d ]^n^n"g_szHotmailid ][ ] == "\dIngresa tú E-Mail." g_szHotmailid ] );
    
    
g_iLen += formatexg_szTextg_iLen ], sizeof g_szText g_iLen"\r1. \wConfirmar pedido^n^n" );
    
    
g_iLen += formatexg_szTextg_iLen ], sizeof g_szText g_iLen"\r0. \wSalir" );
    
    
show_menuidg_iKeysg_szText, -1"CONFIRMACION" );
}

public 
HM_Confirmacionidkeysmenu ) {
    
    switch( 
keys ) {
        
        case 
0: {
            
            
ColorChatid"El pedido ha sido enviado con éxito." );
            
            
console_printid"%s El pedido ha sido enviado con Ã©xito."CONSOLE_PREFIX );
            
            
ColorChatid"TIPO: !g%s!y !t|!y TIEMPO !g%d MES%s !t|!y COSTO: !g$%d!y."g_szAdminsDatag_iContadorid ][ ACCESO ] ][ NOMBRE ], ( g_iContadorid ][ TIEMPO ] + ),( g_iContadorid ][ TIEMPO ] == "" "ES" ), ( g_szAdminsDatag_iContadorid ][ ACCESO ] ][ COSTO ] * ( g_iContadorid ][ TIEMPO ] + ) ) );
            
            
g_iSentid ] = 1;
            
            
get_user_nameidg_szPlayerNameid ], sizeofg_szPlayerName ) );
            
            
log_to_fileg_szFile"NOMBRE: %s | TIPO %s | TIEMPO %d MES%s | COSTO $%d | E-Mail: %s"g_szPlayerNameid ], g_szAdminsDatag_iContadorid ][ ACCESO ] ][ NOMBRE ], ( g_iContadorid ][ TIEMPO ] + ),( g_iContadorid ][ TIEMPO ] == "" "ES" ), ( g_szAdminsDatag_iContadorid ][ ACCESO ] ][ COSTO ] * ( g_iContadorid ][ TIEMPO ] + ) ), g_szHotmailid ] )
            
            
Save_Dataid );
        }
    }
    
    return 
PLUGIN_HANDLED;
}

public 
register_contactid ) {
    
    
read_argsg_szHotmailid ], charsmaxg_szHotmail[ ] ) );
    
remove_quotesg_szHotmailid ] );
    
trimg_szHotmailid ] );
    
    new 
iArroba containg_szHotmailid ], "@");
    new 
bool:bValid false
    
    
if( iArroba && strleng_szHotmailid ] ) > ) {
        
        for( new 
0sizeof g_szEmails ); i++) {
            
            if( 
equalig_szHotmailid ][ iArroba ], g_szEmails] ) ) {
                
                
SM_Pedidoid );
                
                
client_cmdid"spk buttons/button3.wav" );
                
                
bValid true;
                break;
            }
        }
    }
    
    if ( !
bValid ) {
        
        
g_szHotmailid ][ ] = 0;
        
        
SM_Pedidoid );
        
ColorChat id"Dirección de correo electrónico inválido." );
    
        
client_cmdid"spk buttons/button2.wav" );
    }
    
    return 
PLUGIN_HANDLED;
}

public 
Save_Dataid ) {
    
    if( !
is_user_connectedid ) )
        return;
    
    
adv_vault_set_startg_iVault )

    
adv_vault_set_fieldg_iVaultg_iFieldsFIELD_SENT ], g_iSentid ] );
    
    
adv_vault_set_endg_iVault0g_szPlayerNameid ] );
}

public 
Load_Dataid ) {
    
    if( !
adv_vault_get_prepareg_iVault_g_szPlayerNameid ] ) ) {
        
        return;
    }
    
    
g_iSentid ] = adv_vault_get_fieldg_iVaultg_iFieldsFIELD_SENT ] );
}

stock ColorChat( const id, const Text[ ], any:... ) { 
    
    new 
count 1players32 ];
    static 
msg191 ], leni;
    
    
len formatexmsgcharsmax(msg), "%s "CHAT_PREFIX );
    
vformatmsglen ], 190 lenText);
    
    
replace_allmsg190"!g""^4" );
    
replace_allmsg190"!y""^1" );
    
replace_allmsg190"!t""^3" );
    
    static 
iLen sizeofmsg );
    
    
replace_allmsgiLen"á""á" );
    
replace_allmsgiLen"Á""Ã" );
    
replace_allmsgiLen"é""é" );
    
replace_allmsgiLen"É""É" );
    
replace_allmsgiLen"í""Ã*" );
    
replace_allmsgiLen"Í""Ã" );
    
replace_allmsgiLen"ó""ó" );
    
replace_allmsgiLen"Ó""Ó" );
    
replace_allmsgiLen"ú""ú" );
    
replace_allmsgiLen"Ú""Ú" );
    
replace_allmsgiLen"ñ""ñ" );
    
replace_allmsgiLen"Ñ""Ñ" );
    
    
    if(
id
        
players] = id;
    else 
        
get_playersplayerscount"ch" );
             
    for( 
0count; ++i) {
        
        if( 
is_user_connectedplayers] ) ) 
            
writeMessageplayers], msg );    
    }
}

stock writeMessageplayermessage[ ] ) {
    
    
message_beginMSG_ONEget_user_msgid"SayText" ), { 00}, player );
    
write_byteplayer );
    
write_stringmessage );
    
message_end( );


me tira este error

Código:
Error: Cannot read from file: "adv_vault" on line 16


y otra cosa, donde se pone el mail a donde va a llegar el pedido?? Genius Rainbow
(13/05/2017, 02:11 PM)DiCHANHO escribió: off: pobre este ya quedo traumado con lo del autor y robo de plugins
(26/07/2020, 08:32 PM)Hinami escribió: & si soy un gordo cagon, virgen, con posters de anime en todas partes
✅✅Aportes✅✅
Datear Automáticamente CincoYA
Efecto Trueno y Rayo

Responder
#2
te falta el include
te llega al gmail o hotmail, fijate la bandeja de spam

Responder
#3
ya puse el include y me sigue tirando el error, lo puse en scripings, includes, habre puesto uno que no va?
(13/05/2017, 02:11 PM)DiCHANHO escribió: off: pobre este ya quedo traumado con lo del autor y robo de plugins
(26/07/2020, 08:32 PM)Hinami escribió: & si soy un gordo cagon, virgen, con posters de anime en todas partes
✅✅Aportes✅✅
Datear Automáticamente CincoYA
Efecto Trueno y Rayo

Responder
#4
activaste el plugin de adv vault en el sv ?
Responder
#5
Puedes darle en "Descagar AMXX": 
.sma   Descargar AMXX / pedidos.sma (Tamaño: 10.16 KB / Descargas: 32)


Los archivos ".inc" (includes) deben ser colocados en la carpeta: addons/amxmodx/scripting/include (debe ser en la misma carpeta en donde tienes tu compilador (compile.exe) que en mi caso es: addons/amxmodx/scripting/)


Archivos adjuntos
.inc   adv_vault.inc (Tamaño: 10.05 KB / Descargas: 1)
[Imagen: b_350_20_323957_202743_f19a15_111111.png]

Estudia siempre; el tiempo es oro, lo material se puede recuperar pero el tiempo no se puede recuperar.
(02/10/2016, 05:05 PM)meTaLiCroSS escribió: Siempre me gusta ayudar cuando alguien esta interesado realmente en ver que esta programando.
(08/08/2019, 05:32 PM)meTaLiCroSS escribió: grax x el dato cr4ck


Mis aportes

PLUGINS
MAPAS
Menú LANG [SF] Sistema de Frags
Say System (Admin Prefix)
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)