Why reinvent the wheel ? Download smlib with over 350 useful functions.
When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
Oh I just saw this, but look at your own plugin....
And how useful it is is up to the developers that use it.
so like a developer could change a text that is printed to console?
What im wondering is if this is just used on PrintToConsole, or if you can stop "Player killed Player2." messages in console.
so like a developer could change a text that is printed to console?
What im wondering is if this is just used on PrintToConsole, or if you can stop "Player killed Player2." messages in console.
It uses SourceHook to hook IVEngineServer::ClientPrintf, so anything sending a message through that will be hooked, and if it's not hooked, you can simply hook the "TextMsg" usermessage and check if the first byte is HUD_PRINTCONSOLE (which is 2), and you have hooked both of the methods that text could be passed on to a client's console (serverside).
Impact has been nice enough to provide us with a Linux binary that will work on non Source 2009 games (so it will work on CS:S but not TF2), I will upload this binary very soon (possibly tomorrow) and will look into compiling this for Source 2009 games.
Done.
new String:interface[64]; if(!GameConfGetKeyValue(gameconf, "EngineInterface", interface, sizeof(interface))) { SetFailState("Failed to get engine interface name"); CloseHandle(gameconf); }
new Handle:temp = EndPrepSDKCall(); new Address:addr = SDKCall(temp, interface, 0);
CloseHandle(gameconf); CloseHandle(temp);
if(!addr) { SetFailState("Failed to get engine ptr"); }
Of course the drawback to using DHooks is you need gamedata and code to grab the engine pointer. But felt this would be helpful example. The example only supports csgo and css but only tested on css.