Topic: [ask] automatic send a message on join a game
hi..
i want to ask, how to make user automatically send a message when he joins a game room?
so, if "a" join a game name "X" and then user "a" will automatically send "hello"
and etc
thank you~
PvPGN Community Forums |
forums.pvpgn.pro → [EN] The Source Code → [ask] automatic send a message on join a game
hi..
i want to ask, how to make user automatically send a message when he joins a game room?
so, if "a" join a game name "X" and then user "a" will automatically send "hello"
and etc
thank you~
kek mirc di ch ya wkwk
Game events handled in src/bnetd/game.cpp. You have to modify the function game_add_player.
Samz, english or russian, please.
is there another clue?
or what need to modify in game_add_player
thanks
For instance, you can add line of code to send message at the end of the function
message_send_text(c,message_type_info,c,"hello");
sorry sir
error C3861: 'message_send_text': identifier not found
#include "message.h"
How To Send this message if user join game
snprintf(msgtemp, sizeof(msgtemp), "[Game Stats] - Jumlah Game: %.14s- | Menang: %.14s- | Kalah: %.14s-",
account_get_jgame(account),
account_get_menang(account),
account_get_kalah(account)),
message_send_text(c,message_type_error,c,msgtemp);
6>game.obj : error LNK2005: "char const * __cdecl pvpgn::bnetd::skip_command(char const *)" (?skip_command@bnetd@pvpgn@@YAPBDPBD@Z) already defined in command.obj
6>game.obj : error LNK2005: "int __cdecl pvpgn::bnetd::handle_command(struct pvpgn::bnetd::connection *,char const *)" (?handle_command@bnetd@pvpgn@@YAHPAUconnection@12@PBD@Z) already defined in command.obj
6>game.obj : error LNK2005: "char * pvpgn::bnetd::msgtemp2" (?msgtemp2@bnetd@pvpgn@@3PADA) already defined in command.obj
6>game.obj : error LNK2005: "char * pvpgn::bnetd::msgtemp" (?msgtemp@bnetd@pvpgn@@3PADA) already defined in command.obj
6>bnetd.exe : fatal error LNK1169: one or more multiply defined symbols found
How To Send this message if user join game
snprintf(msgtemp, sizeof(msgtemp), "[Game Stats] - Jumlah Game: %.14s- | Menang: %.14s- | Kalah: %.14s-",
account_get_jgame(account),
account_get_menang(account),
account_get_kalah(account)),
message_send_text(c,message_type_error,c,msgtemp);
handle_bnet.cpp or you create code on Ghost
forums.pvpgn.pro → [EN] The Source Code → [ask] automatic send a message on join a game