AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Some engfunc questions (https://forums.alliedmods.net/showthread.php?t=83316)

MPNumB 01-07-2009 17:55

Some engfunc questions
 
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.

Arkshine 01-07-2009 18:22

Re: Some engfunc questions
 
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.

danielkza 01-07-2009 20:32

Re: Some engfunc questions
 
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.

jim_yang 01-07-2009 22:40

Re: Some engfunc questions
 
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


All times are GMT -4. The time now is 09:18.

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