Amxxprogramer / EngFunc_MessageBegin.txt
RichieBurundi's picture
Upload 29 files
ea562e8 verified
Fakemeta Function:
EngFunc_MessageBegin
Description:
This function is used to generate client messages.
Usage:
engfunc(EngFunc_MessageBegin,dest,msg_type,or igin[3]={0,0,0},player=0)
PHP Code:
static Float:origin[3] // Origin should be a Float
pev(id, pev_origin, origin) // Get user origin
engfunc(EngFunc_MessageBegin,MSG_BROADCAST,SVC_TEMPENTITY,origin,0) // Create message
PHP Code:
//With MSG_ONE_UNRELIABLE
engfunc(EngFunc_MessageBegin,MSG_ONE_UNRELIABLE,SVC_TEMPENTITY,_,id) // Create message
PHP Code:
//With MSG_ALL
engfunc(EngFunc_MessageBegin,MSG_ONE_UNRELIABLE,SVC_TEMPENTITY,_,id) // Create message
dest can be :
Code:
#define MSG_BROADCAST 0 // Unreliable to all, There is not id
#define MSG_ONE 1 // Reliable to one (msg_entity)
#define MSG_ALL 2 // Reliable to all, There is not origin
#define MSG_INIT 3 // Write to the init string
#define MSG_PVS 4 // Ents in PVS of org
#define MSG_PAS 5 // Ents in PAS of org
#define MSG_PVS_R 6 // Reliable to PVS
#define MSG_PAS_R 7 // Reliable to PAS
#define MSG_ONE_UNRELIABLE 8 // Send to one client, but don't put in reliable stream, put in unreliable datagram (could be dropped), There is not origin
#define MSG_SPEC 9 // Sends to all spectator proxies
Before calling another EngFunc_MessageBegin you must call message_end()