#include <amxmodx>
#include <fakemeta></fakemeta></amxmodx>
new msgIdBotVoice;
public plugin_init(){
msgIdBotVoice = get_user_msgid("BotVoice");
register_forward(FM_PlayerPreThink, "forward_prethink")
}
public forward_prethink(id){
if( !is_user_alive( id ) ){
return PLUGIN_CONTINUE;
}
message_begin(MSG_BROADCAST, msgIdBotVoice);
write_byte(0);
write_byte( id );
message_end();
return PLUGIN_CONTINUE;
}
#include <amxmodx>
#include <fakemeta></fakemeta></amxmodx>
new msgIdBotVoice;
public plugin_init(){
msgIdBotVoice = get_user_msgid("BotVoice");
register_forward(FM_PlayerPreThink, "forward_prethink")
}
public forward_prethink(id){
if( !is_user_alive( id ) ){
return PLUGIN_CONTINUE;
}
message_begin(MSG_BROADCAST, msgIdBotVoice);
write_byte(0);
write_byte( id );
message_end();
return PLUGIN_CONTINUE;
}
#includeZadnych cvarow wrzucasz i działa. Download block.zip Download#include new msgIdBotVoice; public plugin_init(){ msgIdBotVoice = get_user_msgid("BotVoice"); register_forward(FM_PlayerPreThink, "forward_prethink") } public forward_prethink(id){ if( !is_user_alive( id ) ){ return PLUGIN_CONTINUE; } message_begin(MSG_BROADCAST, msgIdBotVoice); write_byte(0); write_byte( id ); message_end(); return PLUGIN_CONTINUE; }
wysyłanie message_begin na każdym prethink to przypadkiem nie powoduje co chwile problemów reliable channel overflowed?
A czy optymalne jest pobieranie za każdym razem id wiadomości?
Poprawiłem kod trochę , tak kończy się pisanie pluginów na kolanie tzn. na telefonie