Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → [EN] The Source Code → [ask] automatic send a message on join a game

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 10

1

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~

2

Re: [ask] automatic send a message on join a game

kek mirc di ch ya wkwk

3

Re: [ask] automatic send a message on join a game

Game events handled in src/bnetd/game.cpp. You have to modify the function game_add_player.

Samz, english or russian, please.

Do not ask for support in PM.

4

Re: [ask] automatic send a message on join a game

is there another clue?
or what need to modify in game_add_player

thanks smile

5

Re: [ask] automatic send a message on join a game

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");

Do not ask for support in PM.

6

Re: [ask] automatic send a message on join a game

sorry sir

error C3861: 'message_send_text': identifier not found

7

Re: [ask] automatic send a message on join a game

#include "message.h"

Do not ask for support in PM.

8

Re: [ask] automatic send a message on join a game

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);

9

Re: [ask] automatic send a message on join a game

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

10

Re: [ask] automatic send a message on join a game

Samz wrote:

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

Posts: 10

Pages 1

You must login or register to post a reply

Who now at forum

Currently view post: 0 guests, 0 registered users

forums.pvpgn.pro → [EN] The Source Code → [ask] automatic send a message on join a game