Raised This Month: $51 Target: $400
 12% 

Solved read coord data


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 11-15-2023 , 19:33   read coord data
Reply With Quote #1

PHP Code:
L 11/15/2023 20:43:23MessageBegin (31"31") (Destination "PVS<4>") (Args "2") (Entity "<NULL>") (Classname "<NULL>") (Netname "<NULL>") (Origin "2122.077392 16.350963 -198.712203"
How can i read the coord and save it with register message?, is in the message begin, not an argument.

Last edited by MrPickles; 11-16-2023 at 19:11.
MrPickles is offline
Leech_v2
Senior Member
Join Date: Mar 2011
Location: Chinese GuangDong
Old 11-15-2023 , 23:43   Re: read coord data
Reply With Quote #2

What you mean is: read the coordinate parameter of the message_begin function in the callback function of the message hook. Is that right? Perhaps the read_data function can do it
Leech_v2 is offline
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 11-16-2023 , 18:40   Re: read coord data
Reply With Quote #3

Quote:
Originally Posted by Leech_v2 View Post
What you mean is: read the coordinate parameter of the message_begin function in the callback function of the message hook. Is that right? Perhaps the read_data function can do it
its a parameter but not an argument, u cant use read_data to hook/save/get the info of the message_begin:

PHP Code:

L 11
/16/2023 20:37:36MessageBegin (31 "31") (Destination "PVS<4>") (Args "2") (Entity "<NULL>") (Classname "<NULL>") (Netname "<NULL>") (Origin "1121.517822 407.840240 -344.339233")
L 11/16/2023 20:37:36Arg 1 (Byte "1"// the data is 1
L 11/16/2023 20:37:36Arg 2 (Byte "1"// the data is 1
L 11/16/2023 20:37:36MessageEnd (31"31"
using get_msg_arg_int(1) = 1; get_msg_arg_int(2) = 1;

PHP Code:
public MSG_HookmsgIDdestClient )
{
       new 
Data[2];
       
Data[0] = get_msg_arg_int(1); // the data is 1
       
Data[1] = get_msg_arg_int(2); // the data is 1

get_msg_arg_int is getting the ARGUMENT of the message, the header of the public can hook the parameters of the message_begin, but i only know msgID, dest and the client ( who see the effect ), but i dont know what comes next...


upadate: use get_msg_origin(const Float:_Origin[3]);

thanks for nothing

Last edited by MrPickles; 11-17-2023 at 18:05.
MrPickles is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-16-2023 , 19:03   Re: read coord data
Reply With Quote #4

Which message are you hooking?
__________________
Bugsy is offline
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 16:30.


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