Mensajes: 167
Temas: 79
Registro en: Jun 2018
Reputación:
0
07/11/2018, 03:05 PM
(Última modificación: 07/11/2018, 03:09 PM por Axon .)
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:
Muchas gracias.
Mensajes: 659
Temas: 97
Registro en: Feb 2016
Reputación:
12
Pero para que mod o tipo de sv es eso?
para poder ayudarte
Mensajes: 167
Temas: 79
Registro en: Jun 2018
Reputación:
0
07/11/2018, 03:27 PM
(Última modificación: 07/11/2018, 03:28 PM por Axon .)
Para el mod PUBNITE! Fortnite + PUBG mod del counter-strike 1.6
Mensajes: 4,637
Temas: 73
Registro en: Oct 2013
Reputación:
44
(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"
Mensajes: 659
Temas: 97
Registro en: Feb 2016
Reputación:
12
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 ( PLUGIN , VERSION , AUTHOR ) register_clcmd ( "say /Gracias" , "Gracias" ) } public Gracias ( id ) { new name [ 33 ] get_user_name ( id , name , 32 ) 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 ( szMsg , 190 , input , 3 ); replace_all ( szMsg , 190 , "!g" , "^4" ); replace_all ( szMsg , 190 , "!y" , "^1" ); replace_all ( szMsg , 190 , "!t" , "^3" ); message_begin ( id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST , msgSayText , . 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
Mensajes: 6,664
Temas: 81
Registro en: Jan 2014
Reputación:
68
AMX 1.8.3 >=
Código PHP:
#include <amxmodx> #define VERSION "1.0" #define TASK_COUNT 11347 new bool : g_bActive , bool : 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 ( index ) g_bUsed [ index ] = false ; public RoundStart () { static iMaxPlayers , index ; if(! iMaxPlayers ) iMaxPlayers = get_maxplayers (); for( index = 1 ; 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 ( 0 , print_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(! msgBuyClose ) msgBuyClose = get_user_msgid ( "BuyClose" ); message_begin ( MSG_ONE , msgBuyClose , _ , index ); message_end (); g_bUsed [ index ] = true ; new name [ 32 ]; get_user_name ( index , name , 31 ); client_print_color ( 0 , print_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.
► NO DOY AYUDA VIA MENSAJE PRIVADO ◄
* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Mensajes: 659
Temas: 97
Registro en: Feb 2016
Reputación:
12
(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_bActive , bool : 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 ( index ) g_bUsed [ index ] = false ; public RoundStart () { static iMaxPlayers , index ; if(! iMaxPlayers ) iMaxPlayers = get_maxplayers (); for( index = 1 ; 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 ( 0 , print_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(! msgBuyClose ) msgBuyClose = get_user_msgid ( "BuyClose" ); message_begin ( MSG_ONE , msgBuyClose , _ , index ); message_end (); g_bUsed [ index ] = true ; new name [ 32 ]; get_user_name ( index , name , 31 ); client_print_color ( 0 , print_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 xdd
Mensajes: 6,664
Temas: 81
Registro en: Jan 2014
Reputación:
68
(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_bActive , bool : 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 ( index ) g_bUsed [ index ] = false ; public RoundStart () { static iMaxPlayers , index ; if(! iMaxPlayers ) iMaxPlayers = get_maxplayers (); for( index = 1 ; 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 ( 0 , print_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(! msgBuyClose ) msgBuyClose = get_user_msgid ( "BuyClose" ); message_begin ( MSG_ONE , msgBuyClose , _ , index ); message_end (); g_bUsed [ index ] = true ; new name [ 32 ]; get_user_name ( index , name , 31 ); client_print_color ( 0 , print_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 xdd
No, al proximo comentario pendejo tuyo, te bloqueo e ignoro...
► NO DOY AYUDA VIA MENSAJE PRIVADO ◄
* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Mensajes: 167
Temas: 79
Registro en: Jun 2018
Reputación:
0
07/11/2018, 07:22 PM
(Última modificación: 07/11/2018, 07:31 PM por Axon .)
Los amo a todos! son unos genios MOLLONES DE GRACIAS QUERIDOS USUARIOS!
(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_bActive , bool : 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 ( index ) g_bUsed [ index ] = false ; public RoundStart () { static iMaxPlayers , index ; if(! iMaxPlayers ) iMaxPlayers = get_maxplayers (); for( index = 1 ; 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 ( 0 , print_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(! msgBuyClose ) msgBuyClose = get_user_msgid ( "BuyClose" ); message_begin ( MSG_ONE , msgBuyClose , _ , index ); message_end (); g_bUsed [ index ] = true ; new name [ 32 ]; get_user_name ( index , name , 31 ); client_print_color ( 0 , print_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 xdd
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 ( c ) 1997 - 2013 ITB CompuPhase , AMX 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 expression , assumed 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 ).
Mensajes: 160
Temas: 17
Registro en: Apr 2018
Reputación:
1
07/11/2018, 10:19 PM
(Última modificación: 07/11/2018, 10:23 PM por KevinJesus .)
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_bActive , bool : 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 ( index ) g_bUsed [ index ] = false ; public RoundStart () { static iMaxPlayers , index ; if(! iMaxPlayers ) iMaxPlayers = get_maxplayers (); for( index = 1 ; 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 ( 0 , GREEN , "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(! msgBuyClose ) msgBuyClose = get_user_msgid ( "BuyClose" ); message_begin ( MSG_ONE , msgBuyClose , _ , index ); message_end (); g_bUsed [ index ] = true ; new name [ 32 ]; get_user_name ( index , name , 31 ); ColorChat ( 0 , GREEN , "^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
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.
Mensajes: 167
Temas: 79
Registro en: Jun 2018
Reputación:
0
(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_bActive , bool : 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 ( index ) g_bUsed [ index ] = false ; public RoundStart () { static iMaxPlayers , index ; if(! iMaxPlayers ) iMaxPlayers = get_maxplayers (); for( index = 1 ; 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 ( 0 , GREEN , "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(! msgBuyClose ) msgBuyClose = get_user_msgid ( "BuyClose" ); message_begin ( MSG_ONE , msgBuyClose , _ , index ); message_end (); g_bUsed [ index ] = true ; new name [ 32 ]; get_user_name ( index , name , 31 ); ColorChat ( 0 , GREEN , "^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
Mensajes: 6,664
Temas: 81
Registro en: Jan 2014
Reputación:
68
07/11/2018, 11:43 PM
(Última modificación: 08/11/2018, 12:01 AM por kikizon2 .)
(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_bActive , bool : 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 ( index ) g_bUsed [ index ] = false ; public RoundStart () { static iMaxPlayers , index ; if(! iMaxPlayers ) iMaxPlayers = get_maxplayers (); for( index = 1 ; 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 ( 0 , GREEN , "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(! msgBuyClose ) msgBuyClose = get_user_msgid ( "BuyClose" ); message_begin ( MSG_ONE , msgBuyClose , _ , index ); message_end (); g_bUsed [ index ] = true ; new name [ 32 ]; get_user_name ( index , name , 31 ); ColorChat ( 0 , GREEN , "^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 ( id , unUsedxd , const input [], any :...) { #pragma unused unUsedxd static szMsg [ 191 ], msgSayText ; if (! msgSayText ) msgSayText = get_user_msgid ( "SayText" ); vformat ( szMsg , 190 , input , 4 ); message_begin ( id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST , msgSayText , . 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 = true , bool : 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 ( index ) g_bUsed [ index ] = false ; public RoundStart () { static iMaxPlayers , index ; if(! iMaxPlayers ) iMaxPlayers = get_maxplayers (); for( index = 1 ; 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 ( 0 , print_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(! msgBuyClose ) msgBuyClose = get_user_msgid ( "BuyClose" ); message_begin ( MSG_ONE , msgBuyClose , _ , index ); message_end (); g_bUsed [ index ] = true ; new name [ 32 ]; get_user_name ( index , name , 31 ); client_print_color ( 0 , print_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...
► NO DOY AYUDA VIA MENSAJE PRIVADO ◄
* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Mensajes: 1,148
Temas: 82
Registro en: May 2015
Reputación:
8
no habia que extender la buyzone a todo el map para que funcione ?
Mensajes: 167
Temas: 79
Registro en: Jun 2018
Reputación:
0
(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_bActive , bool : 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 ( index ) g_bUsed [ index ] = false ; public RoundStart () { static iMaxPlayers , index ; if(! iMaxPlayers ) iMaxPlayers = get_maxplayers (); for( index = 1 ; 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 ( 0 , GREEN , "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(! msgBuyClose ) msgBuyClose = get_user_msgid ( "BuyClose" ); message_begin ( MSG_ONE , msgBuyClose , _ , index ); message_end (); g_bUsed [ index ] = true ; new name [ 32 ]; get_user_name ( index , name , 31 ); ColorChat ( 0 , GREEN , "^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 ( id , unUsedxd , const input [], any :...) { #pragma unused unUsedxd static szMsg [ 191 ], msgSayText ; if (! msgSayText ) msgSayText = get_user_msgid ( "SayText" ); vformat ( szMsg , 190 , input , 4 ); message_begin ( id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST , msgSayText , . 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 = true , bool : 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 ( index ) g_bUsed [ index ] = false ; public RoundStart () { static iMaxPlayers , index ; if(! iMaxPlayers ) iMaxPlayers = get_maxplayers (); for( index = 1 ; 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 ( 0 , print_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(! msgBuyClose ) msgBuyClose = get_user_msgid ( "BuyClose" ); message_begin ( MSG_ONE , msgBuyClose , _ , index ); message_end (); g_bUsed [ index ] = true ; new name [ 32 ]; get_user_name ( index , name , 31 ); client_print_color ( 0 , print_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"
Mensajes: 1,148
Temas: 82
Registro en: May 2015
Reputación:
8
ahi esta el problema amigo, para que funcione es necesario la buy zone
Mensajes: 167
Temas: 79
Registro en: Jun 2018
Reputación:
0
08/11/2018, 12:45 AM
(Última modificación: 08/11/2018, 12:48 AM por Axon .)
(08/11/2018, 12:35 AM) Nelo escribió: ahi esta el problema amigo, para que funcione es necesario la buy zoneY 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_bActive , bool : 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 ( index ) g_bUsed [ index ] = false ; public RoundStart () { static iMaxPlayers , index ; if(! iMaxPlayers ) iMaxPlayers = get_maxplayers (); for( index = 1 ; 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 ( 0 , GREEN , "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(! msgBuyClose ) msgBuyClose = get_user_msgid ( "BuyClose" ); message_begin ( MSG_ONE , msgBuyClose , _ , index ); message_end (); g_bUsed [ index ] = true ; new name [ 32 ]; get_user_name ( index , name , 31 ); ColorChat ( 0 , GREEN , "^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 ( id , unUsedxd , const input [], any :...) { #pragma unused unUsedxd static szMsg [ 191 ], msgSayText ; if (! msgSayText ) msgSayText = get_user_msgid ( "SayText" ); vformat ( szMsg , 190 , input , 4 ); message_begin ( id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST , msgSayText , . 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 = true , bool : 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 ( index ) g_bUsed [ index ] = false ; public RoundStart () { static iMaxPlayers , index ; if(! iMaxPlayers ) iMaxPlayers = get_maxplayers (); for( index = 1 ; 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 ( 0 , print_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(! msgBuyClose ) msgBuyClose = get_user_msgid ( "BuyClose" ); message_begin ( MSG_ONE , msgBuyClose , _ , index ); message_end (); g_bUsed [ index ] = true ; new name [ 32 ]; get_user_name ( index , name , 31 ); client_print_color ( 0 , print_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"
Mensajes: 6,664
Temas: 81
Registro en: Jan 2014
Reputación:
68
08/11/2018, 12:57 AM
(Última modificación: 08/11/2018, 12:58 AM por kikizon2 .)
Código PHP:
#include <amxmodx> #include <fakemeta> #if AMXX_VERSION_NUM < 183 #define print_team_default 0 stock client_print_color ( id , unUsedxd , const input [], any :...) { #pragma unused unUsedxd static szMsg [ 191 ], msgSayText ; if (! msgSayText ) msgSayText = get_user_msgid ( "SayText" ); vformat ( szMsg , 190 , input , 4 ); message_begin ( id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST , msgSayText , . 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 = true , bool : 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_CreateNamedEntity , engfunc ( EngFunc_AllocString , "func_buyzone" )); dllfunc ( DLLFunc_Spawn , g_iEntBuy ); engfunc ( EngFunc_SetSize , g_iEntBuy , Float :{- 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_Touch , g_iEntBuy , index ); } public client_putinserver ( index ) g_bUsed [ index ] = false ; public RoundStart () { static iMaxPlayers , index ; if(! iMaxPlayers ) iMaxPlayers = get_maxplayers (); for( index = 1 ; 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 ( 0 , print_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(! msgBuyClose ) msgBuyClose = get_user_msgid ( "BuyClose" ); message_begin ( MSG_ONE , msgBuyClose , _ , index ); message_end (); g_bUsed [ index ] = true ; new name [ 32 ]; get_user_name ( index , name , 31 ); client_print_color ( 0 , print_team_default , "^3%s ^1Le ha dado las gracias al conductor!" , name ); return PLUGIN_HANDLED ; } return PLUGIN_CONTINUE ; }
PD: Gracias @Nelo.
► NO DOY AYUDA VIA MENSAJE PRIVADO ◄
* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Mensajes: 167
Temas: 79
Registro en: Jun 2018
Reputación:
0
(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 ( id , unUsedxd , const input [], any :...) { #pragma unused unUsedxd static szMsg [ 191 ], msgSayText ; if (! msgSayText ) msgSayText = get_user_msgid ( "SayText" ); vformat ( szMsg , 190 , input , 4 ); message_begin ( id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST , msgSayText , . 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 = true , bool : 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_CreateNamedEntity , engfunc ( EngFunc_AllocString , "func_buyzone" )); dllfunc ( DLLFunc_Spawn , g_iEntBuy ); engfunc ( EngFunc_SetSize , g_iEntBuy , Float :{- 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_Touch , g_iEntBuy , index ); } public client_putinserver ( index ) g_bUsed [ index ] = false ; public RoundStart () { static iMaxPlayers , index ; if(! iMaxPlayers ) iMaxPlayers = get_maxplayers (); for( index = 1 ; 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 ( 0 , print_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(! msgBuyClose ) msgBuyClose = get_user_msgid ( "BuyClose" ); message_begin ( MSG_ONE , msgBuyClose , _ , index ); message_end (); g_bUsed [ index ] = true ; new name [ 32 ]; get_user_name ( index , name , 31 ); client_print_color ( 0 , print_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.
Mensajes: 1,148
Temas: 82
Registro en: May 2015
Reputación:
8
de seguro dentro del mod tenes algo que bloquea o remueve la buyzone, podrias dejar el codigo para revisar ?
Mensajes: 4,247
Temas: 94
Registro en: Mar 2014
Reputación:
58
Ésto ya está implementado en el modo precionando la tecla E mientras sigues en el autobús...
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)