I've been trying to create a lightning beam to the point id is aiming.
This is part of a FM_CmdStart hook & is called when id presses IN_USE.
I've tried all the commented ways of message_begin() but i can't get it working.
I'm sure the message is called because the lower part of that code block does work.
I'm also not really understanding when to use the origin & id parameters of message_begin().
Can someone explain that ?
PHP Code:
new iOrigin[3], iAimOrigin[3];
get_user_origin(id, iOrigin, 1);
get_user_origin(id, iAimOrigin, 3);
// message_begin(MSG_BROADCAST, SVC_TEMPENTITY, iOrigin, id)
// message_begin(MSG_BROADCAST, SVC_TEMPENTITY, iOrigin)
// message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
// message_begin(MSG_ALL, SVC_TEMPENTITY, iOrigin, id)
// message_begin(MSG_ALL, SVC_TEMPENTITY, iOrigin)
// message_begin(MSG_ALL, SVC_TEMPENTITY)
write_byte(TE_LIGHTNING);
write_coord(iOrigin[0]);
write_coord(iOrigin[1]);
write_coord(iOrigin[2]);
write_coord(iAimOrigin[0]);
write_coord(iAimOrigin[1]);
write_coord(iAimOrigin[2]);
write_byte(15);
write_byte(50);
write_byte(100);
write_short(g_iSprLightning);
message_end();
__________________