PLUGIN PEDIDO DE GRACIAS
#1
Estrella 
Hola gente, bueno no la hago larga solo quiero un plugin en la cual en los primeros 50 segundos el jugador al apretar la tecla "B" en el chat/say diga: "El jugador "X" le ha dado las gracias al conductor del autobús". Si las comillas.

Ejemplo:
[Imagen: dar-las-gracias-al-conductor-de-fortnite...00x336.jpg]

Muchas gracias.
Responder
#2
Pero para que mod o tipo de sv es eso?
para poder ayudarte
Responder
#3
Para el mod PUBNITE! Fortnite + PUBG mod del counter-strike 1.6
Responder
#4
(07/11/2018, 03:12 PM)Alejandro escribió: Pero para que mod o tipo de sv es eso?
para poder ayudarte

En qué te limita el tipo de servidor o modo que está corriendo para hacer lo que pide? Se hace exactamente igual independientemente del modo que corra.

@Axon no se puede ejecutar una acción con una tecla específica, solamente podés hacerlo a través de comandos, que luego el usuario puede DECIDIR ponerlos en la tecla B o no.

En la tecla B, por default, el comando cargado es "buy" que no es un comando que sea enviado al servidor (si no me falla la memoria) por lo que tampoco podés hacer mucho. Lo único sería que el usuario elija voluntariamente bindear un segundo comando a la tecla B. Algo así como "buy;accion_plugin"
[Imagen: paypalqr.png]
Responder
#5
Prueba...

Código PHP:
/* Pregunte el mod para que se pudiese adaptar baby <3 */

#include <amxmodx>


#define PLUGIN  "Gracias Conductor"
#define VERSION "1.0"
#define AUTHOR  "Alejandro-."

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd "say /Gracias""Gracias" )
}

public 
Gracias id )
{
       new 
name[33]
       
get_user_name(idname32)
    
Print_Color(0"!g( !y%s !g) !tLe ah dado las Gracias al !gCONDUCTOR."name)
}

stock Print_Color(id, const input[], any:...)
{
    static 
szMsg[191], msgSayText;
    
    if(!
msgSayText) { msgSayText get_user_msgid("SayText"); }
    
    
vformat(szMsg190input3);

    
replace_all(szMsg190"!g""^4");
    
replace_all(szMsg190"!y""^1");
    
replace_all(szMsg190"!t""^3");
    
    
message_begin(id MSG_ONE_UNRELIABLE MSG_BROADCASTmsgSayText, .player id);
    
write_byte(id id 33);
    
write_string(szMsg);
    
message_end();


Hey y pregunte mod para ver si se lo adaptaba para obtener el nombre del conductor <3
Responder
#6
AMX 1.8.3 >=

Código PHP:
#include <amxmodx>

#define VERSION "1.0"
#define TASK_COUNT 11347

new bool:g_bActivebool:g_bUsed[33];

public 
plugin_init()
{
    
register_plugin("Thanks ..."VERSION"kikizon / LSSTUDIOS.XYZ");
    
    
register_event("HLTV""RoundStart""a""1=0""2=0");
    
    
register_clcmd("buy""clcmdThanks");
    
register_clcmd("client_buy_open""clcmdThanks");
}

public 
client_putinserver(indexg_bUsed[index] = false;

public 
RoundStart()
{
    static 
iMaxPlayersindex;
    if(!
iMaxPlayersiMaxPlayers get_maxplayers();

    for(
index index <= iMaxPlayers ; ++index )    
        if(
is_user_connected(index))
            
g_bUsed[index] = false;

    
g_bActive true;
    if(
task_exists(TASK_COUNT)) remove_task(TASK_COUNT);
    
set_task(50.0"RemoveFlag"TASK_COUNT);

    
client_print_color(0print_team_default"Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!");
}

public 
RemoveFlag() g_bActive false;

public 
clcmdThanks(index)
{
    if(
g_bActive && !g_bUsed[index])
    {
        static 
msgBuyClose;
        if(!
msgBuyClosemsgBuyClose get_user_msgid("BuyClose");

        
message_begin(MSG_ONEmsgBuyClose_index);
        
message_end();

        
g_bUsed[index] = true;

        new 
name[32]; get_user_name(indexname31);
        
client_print_color(0print_team_default"^3%s ^1Le ha dado las gracias al conductor!");
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


Cabe aclarar que sera presionando la 'b' siempre y cuando el jugador tenga hookeado el buy en la B

PD: No se testeo.
[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder
#7
(07/11/2018, 05:13 PM)kikizon2 escribió: AMX 1.8.3 >=

Código PHP:
#include <amxmodx>

#define VERSION "1.0"
#define TASK_COUNT 11347

new bool:g_bActivebool:g_bUsed[33];

public 
plugin_init()
{
    
register_plugin("Thanks ..."VERSION"kikizon / LSSTUDIOS.XYZ");
    
    
register_event("HLTV""RoundStart""a""1=0""2=0");
    
    
register_clcmd("buy""clcmdThanks");
    
register_clcmd("client_buy_open""clcmdThanks");
}

public 
client_putinserver(indexg_bUsed[index] = false;

public 
RoundStart()
{
    static 
iMaxPlayersindex;
    if(!
iMaxPlayersiMaxPlayers get_maxplayers();

    for(
index index <= iMaxPlayers ; ++index )    
        if(
is_user_connected(index))
            
g_bUsed[index] = false;

    
g_bActive true;
    if(
task_exists(TASK_COUNT)) remove_task(TASK_COUNT);
    
set_task(50.0"RemoveFlag"TASK_COUNT);

    
client_print_color(0print_team_default"Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!");
}

public 
RemoveFlag() g_bActive false;

public 
clcmdThanks(index)
{
    if(
g_bActive && !g_bUsed[index])
    {
        static 
msgBuyClose;
        if(!
msgBuyClosemsgBuyClose get_user_msgid("BuyClose");

        
message_begin(MSG_ONEmsgBuyClose_index);
        
message_end();

        
g_bUsed[index] = true;

        new 
name[32]; get_user_name(indexname31);
        
client_print_color(0print_team_default"^3%s ^1Le ha dado las gracias al conductor!");
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


Cabe aclarar que sera presionando la 'b' siempre y cuando el jugador tenga hookeado el buy en la B

PD: No se testeo.

Uyy... pronto voy pa ese level xddExcitedeyes
Responder
#8
(07/11/2018, 05:16 PM)Alejandro escribió:
(07/11/2018, 05:13 PM)kikizon2 escribió: AMX 1.8.3 >=

Código PHP:
#include <amxmodx>

#define VERSION "1.0"
#define TASK_COUNT 11347

new bool:g_bActivebool:g_bUsed[33];

public 
plugin_init()
{
    
register_plugin("Thanks ..."VERSION"kikizon / LSSTUDIOS.XYZ");
    
    
register_event("HLTV""RoundStart""a""1=0""2=0");
    
    
register_clcmd("buy""clcmdThanks");
    
register_clcmd("client_buy_open""clcmdThanks");
}

public 
client_putinserver(indexg_bUsed[index] = false;

public 
RoundStart()
{
    static 
iMaxPlayersindex;
    if(!
iMaxPlayersiMaxPlayers get_maxplayers();

    for(
index index <= iMaxPlayers ; ++index )    
        if(
is_user_connected(index))
            
g_bUsed[index] = false;

    
g_bActive true;
    if(
task_exists(TASK_COUNT)) remove_task(TASK_COUNT);
    
set_task(50.0"RemoveFlag"TASK_COUNT);

    
client_print_color(0print_team_default"Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!");
}

public 
RemoveFlag() g_bActive false;

public 
clcmdThanks(index)
{
    if(
g_bActive && !g_bUsed[index])
    {
        static 
msgBuyClose;
        if(!
msgBuyClosemsgBuyClose get_user_msgid("BuyClose");

        
message_begin(MSG_ONEmsgBuyClose_index);
        
message_end();

        
g_bUsed[index] = true;

        new 
name[32]; get_user_name(indexname31);
        
client_print_color(0print_team_default"^3%s ^1Le ha dado las gracias al conductor!");
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


Cabe aclarar que sera presionando la 'b' siempre y cuando el jugador tenga hookeado el buy en la B

PD: No se testeo.

Uyy... pronto voy pa ese level xddExcitedeyes

No, al proximo comentario pendejo tuyo, te bloqueo e ignoro...
[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder
#9
Los amo a todos! son unos genios MOLLONES DE GRACIAS QUERIDOS USUARIOS! Excitedeyes

(07/11/2018, 05:22 PM)kikizon2 escribió:
(07/11/2018, 05:16 PM)Alejandro escribió:
(07/11/2018, 05:13 PM)kikizon2 escribió: AMX 1.8.3 >=

Código PHP:
#include <amxmodx>

#define VERSION "1.0"
#define TASK_COUNT 11347

new bool:g_bActivebool:g_bUsed[33];

public 
plugin_init()
{
    
register_plugin("Thanks ..."VERSION"kikizon / LSSTUDIOS.XYZ");
    
    
register_event("HLTV""RoundStart""a""1=0""2=0");
    
    
register_clcmd("buy""clcmdThanks");
    
register_clcmd("client_buy_open""clcmdThanks");
}

public 
client_putinserver(indexg_bUsed[index] = false;

public 
RoundStart()
{
    static 
iMaxPlayersindex;
    if(!
iMaxPlayersiMaxPlayers get_maxplayers();

    for(
index index <= iMaxPlayers ; ++index )    
        if(
is_user_connected(index))
            
g_bUsed[index] = false;

    
g_bActive true;
    if(
task_exists(TASK_COUNT)) remove_task(TASK_COUNT);
    
set_task(50.0"RemoveFlag"TASK_COUNT);

    
client_print_color(0print_team_default"Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!");
}

public 
RemoveFlag() g_bActive false;

public 
clcmdThanks(index)
{
    if(
g_bActive && !g_bUsed[index])
    {
        static 
msgBuyClose;
        if(!
msgBuyClosemsgBuyClose get_user_msgid("BuyClose");

        
message_begin(MSG_ONEmsgBuyClose_index);
        
message_end();

        
g_bUsed[index] = true;

        new 
name[32]; get_user_name(indexname31);
        
client_print_color(0print_team_default"^3%s ^1Le ha dado las gracias al conductor!");
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


Cabe aclarar que sera presionando la 'b' siempre y cuando el jugador tenga hookeado el buy en la B

PD: No se testeo.

Uyy... pronto voy pa ese level xddExcitedeyes

No, al proximo comentario pendejo tuyo, te bloqueo e ignoro...

Yo mucho no entiendo pero me tira este error

Código PHP:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2013 ITB CompuPhaseAMX Mod X Team

Error
Undefined symbol "client_print_color" on line 33
Warning
Expression has no effect on line 33
Error
Expected token";"but found ")" on line 33
Error
Invalid expressionassumed zero on line 33
Error
Too many error messages on one line on line 33

Compilation aborted
.
4 Errors.
Could not locate output file C:\Users\axon_\Desktop\graciasconductor.amx (compile failed). 
Responder
#10
Toma Compila Perfecto no lo probé avisa si no te sirve para ver si Podemos ayudarte en algo
Código PHP:
#include <amxmodx>
#include <colorChat>

#define VERSION "1.0"
#define TASK_COUNT 11347

new bool:g_bActivebool:g_bUsed[33];

public 
plugin_init()
{
    
register_plugin("Thanks ..."VERSION"kikizon / LSSTUDIOS.XYZ");
    
    
register_event("HLTV""RoundStart""a""1=0""2=0");
    
    
register_clcmd("buy""clcmdThanks");
    
register_clcmd("client_buy_open""clcmdThanks");
}

public 
client_putinserver(indexg_bUsed[index] = false;

public 
RoundStart()
{
    static 
iMaxPlayersindex;
    if(!
iMaxPlayersiMaxPlayers get_maxplayers();

    for(
index index <= iMaxPlayers ; ++index )    
        if(
is_user_connected(index))
            
g_bUsed[index] = false;

    
g_bActive true;
    if(
task_exists(TASK_COUNT)) remove_task(TASK_COUNT);
    
set_task(50.0"RemoveFlag"TASK_COUNT);

    
ColorChat(0GREEN"Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!");
}

public 
RemoveFlag() g_bActive false;

public 
clcmdThanks(index)
{
    if(
g_bActive && !g_bUsed[index])
    {
        static 
msgBuyClose;
        if(!
msgBuyClosemsgBuyClose get_user_msgid("BuyClose");

        
message_begin(MSG_ONEmsgBuyClose_index);
        
message_end();

        
g_bUsed[index] = true;

        new 
name[32]; get_user_name(indexname31);
        
ColorChat(0GREEN,  "^3%s ^1Le ha dado las gracias al conductor!");
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


Acá te dejo en include colorchat si no lo tenes


Archivos adjuntos
.inc   colorchat.inc (Tamaño: 2.48 KB / Descargas: 2)
Cita: Kikizon2 Dijo :
Lo que deberian de aprender es a escribir, parece que escriben con el escroto en la mano.
Responder
#11
(07/11/2018, 10:19 PM)KevinJesus escribió: Toma Compila Perfecto no lo probé avisa si no te sirve para ver si Podemos ayudarte en algo
Código PHP:
#include <amxmodx>
#include <colorChat>

#define VERSION "1.0"
#define TASK_COUNT 11347

new bool:g_bActivebool:g_bUsed[33];

public 
plugin_init()
{
    
register_plugin("Thanks ..."VERSION"kikizon / LSSTUDIOS.XYZ");
    
    
register_event("HLTV""RoundStart""a""1=0""2=0");
    
    
register_clcmd("buy""clcmdThanks");
    
register_clcmd("client_buy_open""clcmdThanks");
}

public 
client_putinserver(indexg_bUsed[index] = false;

public 
RoundStart()
{
    static 
iMaxPlayersindex;
    if(!
iMaxPlayersiMaxPlayers get_maxplayers();

    for(
index index <= iMaxPlayers ; ++index )    
        if(
is_user_connected(index))
            
g_bUsed[index] = false;

    
g_bActive true;
    if(
task_exists(TASK_COUNT)) remove_task(TASK_COUNT);
    
set_task(50.0"RemoveFlag"TASK_COUNT);

    
ColorChat(0GREEN"Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!");
}

public 
RemoveFlag() g_bActive false;

public 
clcmdThanks(index)
{
    if(
g_bActive && !g_bUsed[index])
    {
        static 
msgBuyClose;
        if(!
msgBuyClosemsgBuyClose get_user_msgid("BuyClose");

        
message_begin(MSG_ONEmsgBuyClose_index);
        
message_end();

        
g_bUsed[index] = true;

        new 
name[32]; get_user_name(indexname31);
        
ColorChat(0GREEN,  "^3%s ^1Le ha dado las gracias al conductor!");
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


Acá te dejo en include colorchat si no lo tenes

No me responde apretando la B ni ningún teclado lo que si me gustaría es que me deje despues de 10 segundo de una partida
Responder
#12
(07/11/2018, 10:28 PM)Axon escribió:
(07/11/2018, 10:19 PM)KevinJesus escribió: Toma Compila Perfecto no lo probé avisa si no te sirve para ver si Podemos ayudarte en algo
Código PHP:
#include <amxmodx>
#include <colorChat>

#define VERSION "1.0"
#define TASK_COUNT 11347

new bool:g_bActivebool:g_bUsed[33];

public 
plugin_init()
{
    
register_plugin("Thanks ..."VERSION"kikizon / LSSTUDIOS.XYZ");
    
    
register_event("HLTV""RoundStart""a""1=0""2=0");
    
    
register_clcmd("buy""clcmdThanks");
    
register_clcmd("client_buy_open""clcmdThanks");
}

public 
client_putinserver(indexg_bUsed[index] = false;

public 
RoundStart()
{
    static 
iMaxPlayersindex;
    if(!
iMaxPlayersiMaxPlayers get_maxplayers();

    for(
index index <= iMaxPlayers ; ++index )    
        if(
is_user_connected(index))
            
g_bUsed[index] = false;

    
g_bActive true;
    if(
task_exists(TASK_COUNT)) remove_task(TASK_COUNT);
    
set_task(50.0"RemoveFlag"TASK_COUNT);

    
ColorChat(0GREEN"Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!");
}

public 
RemoveFlag() g_bActive false;

public 
clcmdThanks(index)
{
    if(
g_bActive && !g_bUsed[index])
    {
        static 
msgBuyClose;
        if(!
msgBuyClosemsgBuyClose get_user_msgid("BuyClose");

        
message_begin(MSG_ONEmsgBuyClose_index);
        
message_end();

        
g_bUsed[index] = true;

        new 
name[32]; get_user_name(indexname31);
        
ColorChat(0GREEN,  "^3%s ^1Le ha dado las gracias al conductor!");
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


Acá te dejo en include colorchat si no lo tenes

No me responde apretando la B ni ningún teclado lo que si me gustaría es que me deje despues de 10 segundo de una partida

Tienes algun plugin que bloquee el buy?

Código PHP:
#include <amxmodx>

#if AMXX_VERSION_NUM < 183

    #define print_team_default 0
    
stock client_print_color(idunUsedxd, const input[], any:...)
    {
        
#pragma unused unUsedxd
        
static szMsg[191], msgSayText;
        if (!
msgSayTextmsgSayText get_user_msgid("SayText");
    
        
vformat(szMsg190input4);

        
message_begin(id MSG_ONE_UNRELIABLE MSG_BROADCASTmsgSayText, .player id);
        
write_byte(id id 33);
        
write_string(szMsg);
        
message_end();
    }

#endif

#define VERSION "1.0"
#define TASK_COUNT 11347

new bool:g_bActive truebool:g_bUsed[33];

public 
plugin_init()
{
    
register_plugin("Thanks ..."VERSION"kikizon / LSSTUDIOS.XYZ");
    
    
register_event("HLTV""RoundStart""a""1=0""2=0");
    
    
register_clcmd("buy""clcmdThanks");
    
register_clcmd("client_buy_open""clcmdThanks");
}

public 
client_putinserver(indexg_bUsed[index] = false;

public 
RoundStart()
{
    static 
iMaxPlayersindex;
    if(!
iMaxPlayersiMaxPlayers get_maxplayers();

    for(
index index <= iMaxPlayers ; ++index )    
        if(
is_user_connected(index))
            
g_bUsed[index] = false;

    
g_bActive true;
    if(
task_exists(TASK_COUNT)) remove_task(TASK_COUNT);
    
set_task(50.0"RemoveFlag"TASK_COUNT);

    
client_print_color(0print_team_default"Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!");
}

public 
RemoveFlag() g_bActive false;

public 
clcmdThanks(index)
{
    if(
g_bActive && !g_bUsed[index])
    {
        static 
msgBuyClose;
        if(!
msgBuyClosemsgBuyClose get_user_msgid("BuyClose");

        
message_begin(MSG_ONEmsgBuyClose_index);
        
message_end();

        
g_bUsed[index] = true;

        new 
name[32]; get_user_name(indexname31);
        
client_print_color(0print_team_default"^3%s ^1Le ha dado las gracias al conductor!"name);
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


Testeado en AMX 1.9, deberia funcionar en AMX 1.8.2...
[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder
#13
no habia que extender la buyzone a todo el map para que funcione ?
Responder
#14
(07/11/2018, 11:43 PM)kikizon2 escribió:
(07/11/2018, 10:28 PM)Axon escribió:
(07/11/2018, 10:19 PM)KevinJesus escribió: Toma Compila Perfecto no lo probé avisa si no te sirve para ver si Podemos ayudarte en algo
Código PHP:
#include <amxmodx>
#include <colorChat>

#define VERSION "1.0"
#define TASK_COUNT 11347

new bool:g_bActivebool:g_bUsed[33];

public 
plugin_init()
{
    
register_plugin("Thanks ..."VERSION"kikizon / LSSTUDIOS.XYZ");
    
    
register_event("HLTV""RoundStart""a""1=0""2=0");
    
    
register_clcmd("buy""clcmdThanks");
    
register_clcmd("client_buy_open""clcmdThanks");
}

public 
client_putinserver(indexg_bUsed[index] = false;

public 
RoundStart()
{
    static 
iMaxPlayersindex;
    if(!
iMaxPlayersiMaxPlayers get_maxplayers();

    for(
index index <= iMaxPlayers ; ++index )    
        if(
is_user_connected(index))
            
g_bUsed[index] = false;

    
g_bActive true;
    if(
task_exists(TASK_COUNT)) remove_task(TASK_COUNT);
    
set_task(50.0"RemoveFlag"TASK_COUNT);

    
ColorChat(0GREEN"Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!");
}

public 
RemoveFlag() g_bActive false;

public 
clcmdThanks(index)
{
    if(
g_bActive && !g_bUsed[index])
    {
        static 
msgBuyClose;
        if(!
msgBuyClosemsgBuyClose get_user_msgid("BuyClose");

        
message_begin(MSG_ONEmsgBuyClose_index);
        
message_end();

        
g_bUsed[index] = true;

        new 
name[32]; get_user_name(indexname31);
        
ColorChat(0GREEN,  "^3%s ^1Le ha dado las gracias al conductor!");
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


Acá te dejo en include colorchat si no lo tenes

No me responde apretando la B ni ningún teclado lo que si me gustaría es que me deje despues de 10 segundo de una partida

Tienes algun plugin que bloquee el buy?

Código PHP:
#include <amxmodx>

#if AMXX_VERSION_NUM < 183

    #define print_team_default 0
    
stock client_print_color(idunUsedxd, const input[], any:...)
    {
        
#pragma unused unUsedxd
        
static szMsg[191], msgSayText;
        if (!
msgSayTextmsgSayText get_user_msgid("SayText");
    
        
vformat(szMsg190input4);

        
message_begin(id MSG_ONE_UNRELIABLE MSG_BROADCASTmsgSayText, .player id);
        
write_byte(id id 33);
        
write_string(szMsg);
        
message_end();
    }

#endif

#define VERSION "1.0"
#define TASK_COUNT 11347

new bool:g_bActive truebool:g_bUsed[33];

public 
plugin_init()
{
    
register_plugin("Thanks ..."VERSION"kikizon / LSSTUDIOS.XYZ");
    
    
register_event("HLTV""RoundStart""a""1=0""2=0");
    
    
register_clcmd("buy""clcmdThanks");
    
register_clcmd("client_buy_open""clcmdThanks");
}

public 
client_putinserver(indexg_bUsed[index] = false;

public 
RoundStart()
{
    static 
iMaxPlayersindex;
    if(!
iMaxPlayersiMaxPlayers get_maxplayers();

    for(
index index <= iMaxPlayers ; ++index )    
        if(
is_user_connected(index))
            
g_bUsed[index] = false;

    
g_bActive true;
    if(
task_exists(TASK_COUNT)) remove_task(TASK_COUNT);
    
set_task(50.0"RemoveFlag"TASK_COUNT);

    
client_print_color(0print_team_default"Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!");
}

public 
RemoveFlag() g_bActive false;

public 
clcmdThanks(index)
{
    if(
g_bActive && !g_bUsed[index])
    {
        static 
msgBuyClose;
        if(!
msgBuyClosemsgBuyClose get_user_msgid("BuyClose");

        
message_begin(MSG_ONEmsgBuyClose_index);
        
message_end();

        
g_bUsed[index] = true;

        new 
name[32]; get_user_name(indexname31);
        
client_print_color(0print_team_default"^3%s ^1Le ha dado las gracias al conductor!"name);
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


Testeado en AMX 1.9, deberia funcionar en AMX 1.8.2...
En este mod no tenemos BUY ZONE por que las armas aparecen al azar en todo el mapa y solo quiero que al inicio de cada partida cuando estamos en el Autobús pueda dar ese saludo por el CHAT SAY apretando el teclado "B"
Responder
#15
ahi esta el problema amigo, para que funcione es necesario la buy zone
Responder
#16
(08/11/2018, 12:35 AM)Nelo escribió: ahi esta el problema amigo, para que funcione es necesario la buy zone
Y tenes idea como hago para que ande este plugin sin buy zone?

(07/11/2018, 11:43 PM)kikizon2 escribió:
(07/11/2018, 10:28 PM)Axon escribió:
(07/11/2018, 10:19 PM)KevinJesus escribió: Toma Compila Perfecto no lo probé avisa si no te sirve para ver si Podemos ayudarte en algo
Código PHP:
#include <amxmodx>
#include <colorChat>

#define VERSION "1.0"
#define TASK_COUNT 11347

new bool:g_bActivebool:g_bUsed[33];

public 
plugin_init()
{
    
register_plugin("Thanks ..."VERSION"kikizon / LSSTUDIOS.XYZ");
    
    
register_event("HLTV""RoundStart""a""1=0""2=0");
    
    
register_clcmd("buy""clcmdThanks");
    
register_clcmd("client_buy_open""clcmdThanks");
}

public 
client_putinserver(indexg_bUsed[index] = false;

public 
RoundStart()
{
    static 
iMaxPlayersindex;
    if(!
iMaxPlayersiMaxPlayers get_maxplayers();

    for(
index index <= iMaxPlayers ; ++index )    
        if(
is_user_connected(index))
            
g_bUsed[index] = false;

    
g_bActive true;
    if(
task_exists(TASK_COUNT)) remove_task(TASK_COUNT);
    
set_task(50.0"RemoveFlag"TASK_COUNT);

    
ColorChat(0GREEN"Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!");
}

public 
RemoveFlag() g_bActive false;

public 
clcmdThanks(index)
{
    if(
g_bActive && !g_bUsed[index])
    {
        static 
msgBuyClose;
        if(!
msgBuyClosemsgBuyClose get_user_msgid("BuyClose");

        
message_begin(MSG_ONEmsgBuyClose_index);
        
message_end();

        
g_bUsed[index] = true;

        new 
name[32]; get_user_name(indexname31);
        
ColorChat(0GREEN,  "^3%s ^1Le ha dado las gracias al conductor!");
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


Acá te dejo en include colorchat si no lo tenes

No me responde apretando la B ni ningún teclado lo que si me gustaría es que me deje despues de 10 segundo de una partida

Tienes algun plugin que bloquee el buy?

Código PHP:
#include <amxmodx>

#if AMXX_VERSION_NUM < 183

    #define print_team_default 0
    
stock client_print_color(idunUsedxd, const input[], any:...)
    {
        
#pragma unused unUsedxd
        
static szMsg[191], msgSayText;
        if (!
msgSayTextmsgSayText get_user_msgid("SayText");
    
        
vformat(szMsg190input4);

        
message_begin(id MSG_ONE_UNRELIABLE MSG_BROADCASTmsgSayText, .player id);
        
write_byte(id id 33);
        
write_string(szMsg);
        
message_end();
    }

#endif

#define VERSION "1.0"
#define TASK_COUNT 11347

new bool:g_bActive truebool:g_bUsed[33];

public 
plugin_init()
{
    
register_plugin("Thanks ..."VERSION"kikizon / LSSTUDIOS.XYZ");
    
    
register_event("HLTV""RoundStart""a""1=0""2=0");
    
    
register_clcmd("buy""clcmdThanks");
    
register_clcmd("client_buy_open""clcmdThanks");
}

public 
client_putinserver(indexg_bUsed[index] = false;

public 
RoundStart()
{
    static 
iMaxPlayersindex;
    if(!
iMaxPlayersiMaxPlayers get_maxplayers();

    for(
index index <= iMaxPlayers ; ++index )    
        if(
is_user_connected(index))
            
g_bUsed[index] = false;

    
g_bActive true;
    if(
task_exists(TASK_COUNT)) remove_task(TASK_COUNT);
    
set_task(50.0"RemoveFlag"TASK_COUNT);

    
client_print_color(0print_team_default"Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!");
}

public 
RemoveFlag() g_bActive false;

public 
clcmdThanks(index)
{
    if(
g_bActive && !g_bUsed[index])
    {
        static 
msgBuyClose;
        if(!
msgBuyClosemsgBuyClose get_user_msgid("BuyClose");

        
message_begin(MSG_ONEmsgBuyClose_index);
        
message_end();

        
g_bUsed[index] = true;

        new 
name[32]; get_user_name(indexname31);
        
client_print_color(0print_team_default"^3%s ^1Le ha dado las gracias al conductor!"name);
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


Testeado en AMX 1.9, deberia funcionar en AMX 1.8.2...
O de ultima que sea otro teclado como ejemplo la "H"
Responder
#17
Código PHP:
#include <amxmodx>
#include <fakemeta>

#if AMXX_VERSION_NUM < 183

    #define print_team_default 0
    
stock client_print_color(idunUsedxd, const input[], any:...)
    {
        
#pragma unused unUsedxd
        
static szMsg[191], msgSayText;
        if (!
msgSayTextmsgSayText get_user_msgid("SayText");
    
        
vformat(szMsg190input4);

        
message_begin(id MSG_ONE_UNRELIABLE MSG_BROADCASTmsgSayText, .player id);
        
write_byte(id id 33);
        
write_string(szMsg);
        
message_end();
    }
#endif

#define VERSION "1.0"
#define TASK_COUNT 11347

new bool:g_bActive truebool:g_bUsed[33], g_iEntBuy;

public 
plugin_init()
{
    
register_plugin("Thanks ..."VERSION"kikizon / LSSTUDIOS.XYZ");
    
    
register_event("HLTV""RoundStart""a""1=0""2=0");
    
    
register_clcmd("buy""clcmdThanks");
    
register_clcmd("client_buy_open""clcmdThanks");

    
register_forward(FM_PlayerPostThink"PlayerPostThink");

    
g_iEntBuy engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"func_buyzone"));
    
dllfunc(DLLFunc_Spawng_iEntBuy);
    
engfunc(EngFunc_SetSizeg_iEntBuyFloat:{-8192.0, -8192.0, -8192.0}, Float:{-8191.0, -8191.0, -8191.0});
}

public 
PlayerPostThink(index)
{
    if (
is_user_alive(index) && g_bActive && !g_bUsed[index])
        
dllfunc(DLLFunc_Touchg_iEntBuyindex);
}

public 
client_putinserver(indexg_bUsed[index] = false;

public 
RoundStart()
{
    static 
iMaxPlayersindex;
    if(!
iMaxPlayersiMaxPlayers get_maxplayers();

    for(
index index <= iMaxPlayers ; ++index )    
        if(
is_user_connected(index))
            
g_bUsed[index] = false;

    
g_bActive true;
    if(
task_exists(TASK_COUNT)) remove_task(TASK_COUNT);
    
set_task(50.0"RemoveFlag"TASK_COUNT);

    
client_print_color(0print_team_default"Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!");
}

public 
RemoveFlag() g_bActive false;

public 
clcmdThanks(index)
{
    if(
g_bActive && !g_bUsed[index])
    {
        static 
msgBuyClose;
        if(!
msgBuyClosemsgBuyClose get_user_msgid("BuyClose");

        
message_begin(MSG_ONEmsgBuyClose_index);
        
message_end();

        
g_bUsed[index] = true;

        new 
name[32]; get_user_name(indexname31);
        
client_print_color(0print_team_default"^3%s ^1Le ha dado las gracias al conductor!"name);
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


PD: Gracias @Nelo.
[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder
#18
(08/11/2018, 12:57 AM)kikizon2 escribió:
Código PHP:
#include <amxmodx>
#include <fakemeta>

#if AMXX_VERSION_NUM < 183

    #define print_team_default 0
    
stock client_print_color(idunUsedxd, const input[], any:...)
    {
        
#pragma unused unUsedxd
        
static szMsg[191], msgSayText;
        if (!
msgSayTextmsgSayText get_user_msgid("SayText");
    
        
vformat(szMsg190input4);

        
message_begin(id MSG_ONE_UNRELIABLE MSG_BROADCASTmsgSayText, .player id);
        
write_byte(id id 33);
        
write_string(szMsg);
        
message_end();
    }
#endif

#define VERSION "1.0"
#define TASK_COUNT 11347

new bool:g_bActive truebool:g_bUsed[33], g_iEntBuy;

public 
plugin_init()
{
    
register_plugin("Thanks ..."VERSION"kikizon / LSSTUDIOS.XYZ");
    
    
register_event("HLTV""RoundStart""a""1=0""2=0");
    
    
register_clcmd("buy""clcmdThanks");
    
register_clcmd("client_buy_open""clcmdThanks");

    
register_forward(FM_PlayerPostThink"PlayerPostThink");

    
g_iEntBuy engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"func_buyzone"));
    
dllfunc(DLLFunc_Spawng_iEntBuy);
    
engfunc(EngFunc_SetSizeg_iEntBuyFloat:{-8192.0, -8192.0, -8192.0}, Float:{-8191.0, -8191.0, -8191.0});
}

public 
PlayerPostThink(index)
{
    if (
is_user_alive(index) && g_bActive && !g_bUsed[index])
        
dllfunc(DLLFunc_Touchg_iEntBuyindex);
}

public 
client_putinserver(indexg_bUsed[index] = false;

public 
RoundStart()
{
    static 
iMaxPlayersindex;
    if(!
iMaxPlayersiMaxPlayers get_maxplayers();

    for(
index index <= iMaxPlayers ; ++index )    
        if(
is_user_connected(index))
            
g_bUsed[index] = false;

    
g_bActive true;
    if(
task_exists(TASK_COUNT)) remove_task(TASK_COUNT);
    
set_task(50.0"RemoveFlag"TASK_COUNT);

    
client_print_color(0print_team_default"Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!");
}

public 
RemoveFlag() g_bActive false;

public 
clcmdThanks(index)
{
    if(
g_bActive && !g_bUsed[index])
    {
        static 
msgBuyClose;
        if(!
msgBuyClosemsgBuyClose get_user_msgid("BuyClose");

        
message_begin(MSG_ONEmsgBuyClose_index);
        
message_end();

        
g_bUsed[index] = true;

        new 
name[32]; get_user_name(indexname31);
        
client_print_color(0print_team_default"^3%s ^1Le ha dado las gracias al conductor!"name);
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


PD: Gracias @Nelo.
Lo único que aparece es esto:
Presiona ^4'B (buy)' ^1Para darle las gracias al conductor!
Pero presiono la B y no me dice nada en el say. Cutecry
Responder
#19
de seguro dentro del mod tenes algo que bloquea o remueve la buyzone, podrias dejar el codigo para revisar ?
Responder
#20
Ésto ya está implementado en el modo precionando la tecla E mientras sigues en el autobús...
[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)