hook TextMsg, SayText
Below is a code snippet to block "Fire in the hole" message display from all players. Can you guys clear me out the followings:
MsgTextMsg(msgid, dest, id) - params are not being used in the function, so its not required, not sure get_msg_args() != 5 - why checking 5 arguments to be returned get_msg_arg_string(5, arg, sizeof arg - 1) - why getting the 5th argument new caller = str_to_num(arg) - why message argument is converted to number and used as id. PHP Code:
|
Re: hook TextMsg, SayText
|
Re: hook TextMsg, SayText
Okay.
may I know what is the difference between SayText & TextMsg. What I found: to block #Fire_in_the_hole I need to hook TextMsg and for blocking #Cstrike_Name_Change use SayText. How to understand which message comes under what category. |
Re: hook TextMsg, SayText
Tested the above code with some non-steam cs ver (not supporting non-steam, just tested) where "Fire in the hole" prints like:
Player @ CTSpawn (RADIO): Fire in the hole and didn't work. but with normal steam cs its working correctly because there it is only (RADIO): Fire in the hole. Is thise because of argument number matching ? |
Re: hook TextMsg, SayText
Quote:
|
Re: hook TextMsg, SayText
Just want to know the concept how it works.
|
Re: hook TextMsg, SayText
Player @ CTSpawn (RADIO): Fire in the hole
This message is because the non steam version your using has some sort of bots addon (probably zbot) that's why the location is shown. Also if you see this message: (RADIO): Fire in the hole. It has five arguments 1: (RADIO): 2: Fire 3: in 4: the 5: hole. But this message: Player @ CTSpawn (RADIO): Fire in the hole has 7 or 8 parameters I am not sure about this, but it could be :D |
Re: hook TextMsg, SayText
Quote:
|
Re: hook TextMsg, SayText
Quote:
haha |
Re: hook TextMsg, SayText
He is right. AFAIK some non-steam version of 1.6 have also locations in the nav file.
|
| All times are GMT -4. The time now is 06:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.