Raised This Month: $ Target: $400
 0% 

Some engfunc questions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 01-07-2009 , 17:55   Some engfunc questions
Reply With Quote #1

I wanna know what what function does and what are/mean there arguments.

PHP Code:
 EngFunc_AlertMessage,    // void )   (ALERT_TYPE atype, char *szFmt, ...);
 
EngFunc_ClientPrintf,    // void )   (edict_t* pEdict, PRINT_TYPE ptype, const char *szMsg);
 
EngFunc_ServerPrint     // void )   (const char *szMsg); 
Also have some questions.

1. When I use EngFunc_ClientPrintf... And setting print_type to 1 it is a bit random (normal print in center / scroll print in center). Question is: why?

2. Is EngFunc_ClientPrintf the same as engclient_print native?

3. What is EngFunc_ServerPrint and in what cases it is fired?

4. Also never noticed before this function EngFunc_AlertMessage. How to use it/what it does/in what cases is fired?

P.S. Mostly I'm interested in 4th question.
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-07-2009 , 18:22   Re: Some engfunc questions
Reply With Quote #2

1.

2. Yes. ( #define CLIENT_PRINT (*g_engfuncs.pfnClientPrintf) )

3. Showing text in the server console ? Probably the same than server_print() except we can format with that.

4. Seems to be all related to log messages. ( see ALERT define in the HLSDK ). For alert type, see fakemeta_const.inc. I'm using the forward here or here.

Last edited by Arkshine; 01-07-2009 at 18:33.
Arkshine is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 01-07-2009 , 20:32   Re: Some engfunc questions
Reply With Quote #3

Actually I think server_print() calls EngFunc_ServerPrint internally, but always apends a newline to whatever text you passed to it. The only possible utility for EngFunc_ServerPrint is if you don't want to print a new line for some reason.
__________________

Community / No support through PM
danielkza is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 01-07-2009 , 22:40   Re: Some engfunc questions
Reply With Quote #4

AlertMessage

from engine/eiface.h:

void AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
ALERT()

comments:
Print an alert message.
atype is one of:
  • at_notice
  • at_console - "same as at_notice, but forces a ConPrintf, not a message box". Prints output to server console, but only shown if 'developer' is set.
  • at_aiconsole - "same as at_console, but only shown if developer level is 2!"
  • at_warning
  • at_error
  • at_logged - "Server print to console (only in multiplayer games)." Prints output to server logs and console.
amxx hook this function with atype = "at_logged" to hook logevent
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang 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 09:18.


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