AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Detect if MSG_ONE_UNRELIABLE (https://forums.alliedmods.net/showthread.php?t=106539)

meTaLiCroSS 10-16-2009 12:16

Detect if MSG_ONE_UNRELIABLE
 
PHP Code:

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_message(SVC_TEMPENTITY"message_TempEntity")
}

public 
message_TempEntity(msgIDmsgDestid)
{
    if(
get_msg_arg_int(1) != TE_DLIGHT)
        return 
PLUGIN_CONTINUE
        
    
// ...


How?

ConnorMcLeod 10-16-2009 12:55

Re: Detect if MSG_ONE_UNRELIABLE
 
public message_TempEntity(msgID, msgDest, id)


This mean that such a message has been sent :

MESSAGE_BEGIN(msgDest, msgID, Float:vecOrigin, id)

->

if( msgDest == MSG_ONE_UNRELIABLE )

As a side note, if you want to retrieve vecOrigin, use get_msg_origin ( vecOrigin ) to fill the vector you just have created.

meTaLiCroSS 10-16-2009 13:12

Re: Detect if MSG_ONE_UNRELIABLE
 
Quote:

Originally Posted by ConnorMcLeod (Post 963858)
public message_TempEntity(msgID, msgDest, id)


This mean that such a message has been sent :

MESSAGE_BEGIN(msgDest, msgID, Float:vecOrigin, id)

->

if( msgDest == MSG_ONE_UNRELIABLE )

As a side note, if you want to retrieve vecOrigin, use get_msg_origin ( vecOrigin ) to fill the vector you just have created.

Thanks Connor!


All times are GMT -4. The time now is 22:42.

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