Raised This Month: $ Target: $400
 0% 

Problem with TE_PLAYERATTACHMENT


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kiske
Veteran Member
Join Date: May 2009
Old 01-05-2013 , 21:18   Problem with TE_PLAYERATTACHMENT
Reply With Quote #1

Hi,

Only works when the ID see FRIEND and FRIEND see ID.
If ID see to FRIEND but FRIEND not see ID, ID see sprite in FRIEND but FRIEND not see sprite in ID.

PHP Code:
if(is_user_alive(FRIEND))
{
    
message_begin(MSG_ONE_UNRELIABLESVC_TEMPENTITY_ID);
    
write_byte(TE_PLAYERATTACHMENT);
    
write_byte(FRIEND);
    
write_coord(25);
    
write_short(g_torc_sprite);
    
write_short(32767);
    
message_end();
}

if(
is_user_alive(ID))
{
    
message_begin(MSG_ONE_UNRELIABLESVC_TEMPENTITY_FRIEND);
    
write_byte(TE_PLAYERATTACHMENT);
    
write_byte(ID);
    
write_coord(25);
    
write_short(g_torc_sprite);
    
write_short(32767);
    
message_end();

I test with MSG_ONE and the result is the same.


Thanks in advanced!

Last edited by Kiske; 01-05-2013 at 21:19.
Kiske is offline
Send a message via Skype™ to Kiske
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 01-06-2013 , 07:14   Re: Problem with TE_PLAYERATTACHMENT
Reply With Quote #2

PHP Code:
stock Create_TE_PLAYERATTACHMENT(identityvOffsetiSpritelife){

    
message_beginMSG_ONESVC_TEMPENTITY, { 00}, id );
    
write_byteTE_PLAYERATTACHMENT );
    
write_byteentity );            // entity
    
write_coordvOffset );            // vertical offset ( attachment origin.z = player origin.z + vertical offset )
    
write_shortiSprite );            // model index
    
write_shortlife );                // (life * 10 )
    
message_end();

but if you will use MSG_ALL everyone will see the attachment i think
__________________
skype: pavle_ivanof
-=ThQ=-
PRIVATE SUPPORT = PAID SUPPORT

Last edited by AngeIII; 01-06-2013 at 07:15.
AngeIII is offline
Send a message via Skype™ to AngeIII
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 01-06-2013 , 07:47   Re: Problem with TE_PLAYERATTACHMENT
Reply With Quote #3

Msg_one -> msg_one_unreliable
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Kiske
Veteran Member
Join Date: May 2009
Old 01-06-2013 , 11:01   Re: Problem with TE_PLAYERATTACHMENT
Reply With Quote #4

Quote:
Originally Posted by AngeIII View Post
PHP Code:
stock Create_TE_PLAYERATTACHMENT(identityvOffsetiSpritelife){

    
message_beginMSG_ONESVC_TEMPENTITY, { 00}, id );
    
write_byteTE_PLAYERATTACHMENT );
    
write_byteentity );            // entity
    
write_coordvOffset );            // vertical offset ( attachment origin.z = player origin.z + vertical offset )
    
write_shortiSprite );            // model index
    
write_shortlife );                // (life * 10 )
    
message_end();

but if you will use MSG_ALL everyone will see the attachment i think
Is the same...
Kiske is offline
Send a message via Skype™ to Kiske
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 01-06-2013 , 16:23   Re: Problem with TE_PLAYERATTACHMENT
Reply With Quote #5

Quote:
Originally Posted by dias View Post
Msg_one -> msg_one_unreliable
It's okay, with MSG_ONE there would be 99% probability for showing the message (the other 1% = overflow kick)
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 01-06-2013 , 18:15   Re: Problem with TE_PLAYERATTACHMENT
Reply With Quote #6

^
My server used to kick all player in it
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 01-06-2013 , 19:59   Re: Problem with TE_PLAYERATTACHMENT
Reply With Quote #7

Quote:
Originally Posted by dias View Post
^
My server used to kick all player in it
Well, it's yours, who knows how and when did you send messages to them. The MSG_ONE msgtype uses the reliable channel, so the player will receive the message "yes or yes", if no, will result in a kick
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Kiske
Veteran Member
Join Date: May 2009
Old 01-17-2013 , 04:16   Re: Problem with TE_PLAYERATTACHMENT
Reply With Quote #8

Help me please
Kiske is offline
Send a message via Skype™ to Kiske
Kiske
Veteran Member
Join Date: May 2009
Old 02-09-2013 , 10:02   Re: Problem with TE_PLAYERATTACHMENT
Reply With Quote #9

Bump.
__________________

Kiske is offline
Send a message via Skype™ to Kiske
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 13:36.


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