mirror of
https://github.com/diamante0018/PP-GSC.git
synced 2025-05-12 15:34:52 +00:00
maint: add a new macro
This commit is contained in:
parent
5c2f8155ce
commit
7715b339b2
13
_utility.gsh
13
_utility.gsh
@ -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; \
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user