Raised This Month: $51 Target: $400
 12% 

svc_updateuserinfo parameters


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Destro-
Veteran Member
Join Date: Jun 2010
Location: $me->location();
Old 07-20-2013 , 17:40   svc_updateuserinfo parameters
Reply With Quote #1

As do this in amxx?
PHP Code:
void SV_FullClientUpdatesv_client_t *clsizebuf_t *msg )
{
    
int    i;
    
char    info[MAX_INFO_STRING];
    
    
cl svs.clients;

    
BF_WriteBytemsgsvc_updateuserinfo );
    
BF_WriteUBitLongmsgiMAX_CLIENT_BITS );

    if( 
cl->name[0] )
    {
        
BF_WriteOneBitmsg);

        
Q_strncpyinfocl->userinfosizeofinfo ));

        
// remove server passwords, etc.
        
Info_RemovePrefixedKeysinfo'_' );
        
BF_WriteStringmsginfo );
    }
    else 
BF_WriteOneBitmsg);

everything I try fails (svc_bad)



Sorry for my English use a translator.
__________________

Last edited by Destro-; 07-20-2013 at 19:28.
Destro- is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-20-2013 , 20:02   Re: svc_updateuserinfo parameters
Reply With Quote #2

I think it is :

PHP Code:
Util_UPDATEUSERINFO(idplayerIndexplayerUserIdplayerUserInfo[])
{
    
message_begin(id MSG_ONE MSG_ALLSVC_UPDATEUSERINFO_id);
    
write_byte(playerIndex); // index
    
write_long(playerUserId playerUserId get_user_userid(playerIndex)); // userid
    
write_string(playerUserInfo); // infostring
    
message_end();

But last time i tried it was kicking client.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Destro-
Veteran Member
Join Date: Jun 2010
Location: $me->location();
Old 07-20-2013 , 20:49   Re: svc_updateuserinfo parameters
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
But last time i tried it was kicking client.
yes

http://wiki.amxmodx.org/Half-Life_1_...UPDATEUSERINFO
the "userid" parameter is not used


Client engine
Code:
void CL_UpdateUserinfo( sizebuf_t *msg ) {     int  slot;     qboolean        active;     player_info_t   *player;
    slot = BF_ReadUBitLong( msg, MAX_CLIENT_BITS );
    if( slot >= MAX_CLIENTS )         Host_Error( "CL_ParseServerMessage: svc_updateuserinfo > MAX_CLIENTS\n" );     player = &cl.players[slot];
    active = BF_ReadOneBit( msg ) ? true : false;
    if( active )     {         Q_strncpy( player->userinfo, BF_ReadString( msg ), sizeof( player->userinfo ));         Q_strncpy( player->name, Info_ValueForKey( player->userinfo, "name" ), sizeof( player->name ));         Q_strncpy( player->model, Info_ValueForKey( player->userinfo, "model" ), sizeof( player->model ));         if( slot == cl.playernum ) Q_memcpy( &menu.playerinfo, player, sizeof( player_info_t ));     }     else Q_memset( player, 0, sizeof( *player )); }
__________________

Last edited by Destro-; 07-20-2013 at 20:50.
Destro- is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-21-2013 , 02:05   Re: svc_updateuserinfo parameters
Reply With Quote #4

Had this in OSHLDS (SV_FullClientUpdate) :

Code:
   Q_strncpy(info, client->InfoKeyBuffer, sizeof(info)-1);
   info[sizeof(info)-1] = '\0';

   Info_RemovePrefixedKeys(info, '_');

   MSG_WriteByte(buf, 0x0D); // SVC_UPDATEUSERINFO
   MSG_WriteByte(buf, i); // index
   MSG_WriteLong(buf, client->padding4A8C_PlayerUID); // userid
   MSG_WriteString(buf, info);

And code i tried and failed :
Spoiler
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 07-21-2013 at 02:11.
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-21-2013 , 04:35   Re: svc_updateuserinfo parameters
Reply With Quote #5

It misses MSG_WriteBuf with MD5 of client->hashedcdkey.

MD5Init(&context);
MD5Update(&context, client->hashedcdkey, 64);
MD5Final(&digest, &context);
MSG_WriteBuf(buf, 16, &digest);

Not sure what we could use and if it's really used. Maybe we could just send : write_string( "" ) or four write_long(). Not sure.
__________________
Arkshine is offline
Destro-
Veteran Member
Join Date: Jun 2010
Location: $me->location();
Old 07-21-2013 , 14:43   Re: svc_updateuserinfo parameters
Reply With Quote #6

Quote:
Originally Posted by ConnorMcLeod View Post
Had this in OSHLDS (SV_FullClientUpdate) :
I look in sing-engine


Quote:
Originally Posted by Arkshine View Post
Not sure what we could use and if it's really used. Maybe we could just send : write_string( "" ) or four write_long(). Not sure.
I love you: D

works with 4 write_long().

PHP Code:
message_begin(MSG_ALLSVC_UPDATEUSERINFO)
write_byte(slot(Player index-1)?) 
write_long(userid?)
write_string(userinfo)
write_long(0)
write_long(0)
write_long(0)
write_long(0)
message_end() 
__________________

Last edited by Destro-; 07-21-2013 at 15:11.
Destro- is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode