Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
text
Languages:
Russian
Size:
10K - 100K
Tags:
code
License:
File size: 1,607 Bytes
ea562e8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
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() |