maint: add a new macro

This commit is contained in:
6arelyFuture 2023-03-16 14:54:25 +00:00
parent 5c2f8155ce
commit 7715b339b2
No known key found for this signature in database
GPG Key ID: 22F9079C86CFAB31

View File

@ -23,6 +23,17 @@
thread onPlayerConnect(); \ thread onPlayerConnect(); \
} }
/* Captures a "connected" event. Perform your action(s) using the "player" variable */
#define _ON_PLAYER_CNCT_BEGIN onPlayerConnect() \
{ \
while ( true ) \
{ \
level waittill( "connected", player );
#define _ON_PLAYER_CNCT_END \
} \
}
/* IW4x MP has printConsole Built-in. __VA_OPT__ requires C++20 compliant preprocessor */ /* IW4x MP has printConsole Built-in. __VA_OPT__ requires C++20 compliant preprocessor */
/* Do not use the + to concatenate strings, let the GSC VM do it for you */ /* Do not use the + to concatenate strings, let the GSC VM do it for you */
/* Other clients will have print avaiable */ /* Other clients will have print avaiable */
@ -85,7 +96,7 @@
#if defined(IW4MP) || defined(IW5x) #if defined(IW4MP) || defined(IW5x)
#define BOT_CHK(ent) \ #define BOT_CHK(ent) \
if ( ent isBot() ) \ if ( ent isTestClient() ) \
{ \ { \
CHK_ACTION; \ CHK_ACTION; \
} }