Topic: [Request] PvPGN FIX
please help me .. I would like to ask pvpgn and in the win32 folder pvpgnnya no-project and taught me to edit / red, / nullred, / nullann, / talk, / meall, / redchat, / annchat please help me
but I thank you before
PvPGN Community Forums |
forums.pvpgn.pro → [EN] The Source Code → [Request] PvPGN FIX
please help me .. I would like to ask pvpgn and in the win32 folder pvpgnnya no-project and taught me to edit / red, / nullred, / nullann, / talk, / meall, / redchat, / annchat please help me
but I thank you before
please help me .. I would like to ask pvpgn and in the win32 folder pvpgnnya no-project and taught me to edit / red, / nullred, / nullann, / talk, / meall, / redchat, / annchat please help me
but I thank you before
/red?
message_type_error
/nullred?
message_type_error
and
snprintf(msgtemp, sizeof(msgtemp), "%s",&text[i]);
/nullann?
message_type_info
and
snprintf(msgtemp, sizeof(msgtemp), "%s",&text[i]);
/talk?
message_type_talk
/meall?
message_type_emote
/redchat?
message_type_error
and modifi do_whisper
zzzzz
is not null
snprintf(msgtemp, sizeof(msgtemp), "%s: %s: %s",account_get_grade(account),conn_get_username(c),&text[i]);
is null
snprintf(msgtemp, sizeof(msgtemp), "%s",&text[i]);
please explain it properly .. I do not understand because I am a beginner
Added: 23.05.2013 12:57
zeloit thanks .. but if the / nullredchat and / nullannchaat what his code?
change and edit to do_whisper, you create do_chat << you know?
different at do chat, change message_type_whisper to message_type_info,
and than, you creating new command, like /whisper, ex:
static int _handle_chat_command(t_connection * c, char const *text)
{
char user[MAX_USERNAME_LEN+MAX_REALMNAME_LEN];
unsigned int i,j;
for (i=0; text[i]!=' ' && text[i]!='\0'; i++); /* skip command */
for (; text[i]==' '; i++);
for (j=0; text[i]!=' ' && text[i]!='\0'; i++) /* get dest */
if (j<sizeof(dest)-1) dest[j++] = text[i];
dest[j] = '\0';
for (; text[i]==' '; i++);
if ((dest[0]=='\0') || (text[i]=='\0'))
{
message_send_text(c,message_type_info,c,"Sends chat to one user, info type");
message_send_text(c,message_type_info,c,"type: /chat <username> <text>");
return 0;
}
do_chat(c,user,&text[i]);
return 0;
}
Added: 23.05.2013 13:14
before, you create:
static void do_chat(t_connection * user_c, char const * dest, char const * text)
{
t_connection * dest_c;
char const * tname;
if (account_get_auth_mute(conn_get_account(user_c))==1)
{
message_send_text(user_c,message_type_error,user_c,"Your account has been muted, you can't chat to other users.");
return;
}
if (!(dest_c = connlist_find_connection_by_name(dest,conn_get_realm(user_c))))
{
message_send_text(user_c,message_type_error,user_c,"That user is not logged on.");
return;
}
if (conn_get_dndstr(dest_c))
{
snprintf(msgtemp, sizeof(msgtemp), "%.64s is unavailable (%.128s)",conn_get_username(dest_c),conn_get_dndstr(dest_c));
message_send_text(user_c,message_type_info,user_c,msgtemp);
return;
}
message_send_text(user_c,message_type_info,dest_c,text);
if (conn_get_awaystr(dest_c))
{
snprintf(msgtemp, sizeof(msgtemp), "%.64s is away (%.128s)",conn_get_username(dest_c),conn_get_awaystr(dest_c));
message_send_text(user_c,message_type_info,user_c,msgtemp);
}
message_send_text(dest_c,message_type_info,user_c,text);
if ((tname = conn_get_username(user_c)))
{
char username[1+MAX_USERNAME_LEN]; /* '*' + username (including NUL) */
if (std::strlen(tname)<MAX_USERNAME_LEN)
{
std::sprintf(username,"*%s",tname);
conn_set_lastsender(dest_c,username);
}
}
}
Error : char user[MAX_USERNAME_LEN+MAX_REALMNAME_LEN];
eaea
char dest[MAX_USERNAME_LEN+MAX_REALMNAME_LEN];
Albhy..
you use pvpgn version 1.8.5 ?
Janu..
I do not know .. I only download what's in love zeloit .. while I can not / clan create
not using /clan create
because your pvpgn not version 1.99-SVN
I do not know what to download version 1.99 that there win32-project
use pvpgn magic builder for newbie
I've no pvpgn builder but no folder win32-project
do you have the files win32-project pvpgn version 1.99?
please help me
pvpgn 1.99 not using win32-project..
code.google.com/p/pvpgn-magic-builder/
that is link download pvpgn magic builder
you must completed all requirment
If I've downloaded all of my requirements can edit the pvpgn?
you must have Visual C++ 2010 (Express is supported) to compile pvpgn
long if I download visual studio 2010 if possible. I'm pvpgn builder got you janu
Added: 23.05.2013 13:44
Zeloit :
zeloit fixed error which char dest [+ MAX_USERNAME_LEN MAX_REALMNAME_LEN];
Added: 23.05.2013 13:49
I already have a microsoft visual studio 2010 express
error do_chat(c,user,&text[i]); "user undeclared identifier"
error do_chat(c,user,&text[i]); "user undeclared identifier"
added
char const * user;
Zeloit, Can you provide full source?
For command /chat
facepalm. Are you know C++?
forums.pvpgn.pro → [EN] The Source Code → [Request] PvPGN FIX