Moved ZMenu reminder to roundstart module, and fixed bug where it would be printed twice when connecting/spawning.
This commit is contained in:
parent
3f08d6f72c
commit
735839c19c
@ -184,6 +184,7 @@ public Action:EventPlayerSpawn(Handle:event, const String:name[], bool:dontBroad
|
|||||||
AccountOnClientSpawn(index); // Some modules depend on this to finish first.
|
AccountOnClientSpawn(index); // Some modules depend on this to finish first.
|
||||||
ClassOnClientSpawn(index);
|
ClassOnClientSpawn(index);
|
||||||
WeaponsOnClientSpawn(index);
|
WeaponsOnClientSpawn(index);
|
||||||
|
RoundStartOnClientSpawn(index);
|
||||||
SEffectsOnClientSpawn(index);
|
SEffectsOnClientSpawn(index);
|
||||||
SpawnProtectOnClientSpawn(index);
|
SpawnProtectOnClientSpawn(index);
|
||||||
RespawnOnClientSpawn(index);
|
RespawnOnClientSpawn(index);
|
||||||
@ -191,16 +192,6 @@ public Action:EventPlayerSpawn(Handle:event, const String:name[], bool:dontBroad
|
|||||||
ZHPOnClientSpawn(index);
|
ZHPOnClientSpawn(index);
|
||||||
VolOnPlayerSpawn(index);
|
VolOnPlayerSpawn(index);
|
||||||
|
|
||||||
// Get public chat trigger prefix.
|
|
||||||
decl String:publictrigger[4];
|
|
||||||
SayHooksGetPublicChatTrigger(publictrigger, sizeof(publictrigger));
|
|
||||||
|
|
||||||
// If public chat trigger is disabled, then don't print message.
|
|
||||||
if (!StrEqual(publictrigger, "N/A", false))
|
|
||||||
{
|
|
||||||
TranslationPrintToChat(index, "General zmenu reminder", publictrigger, SAYHOOKS_KEYWORD_ZMENU);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fire post player_spawn event.
|
// Fire post player_spawn event.
|
||||||
CreateTimer(0.0, EventPlayerSpawnPost, index);
|
CreateTimer(0.0, EventPlayerSpawnPost, index);
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,33 @@
|
|||||||
*/
|
*/
|
||||||
#define ROUNDSTART_OBJECTIVE_ENTITIES "func_bomb_target|func_hostage_rescue|c4|hostage_entity"
|
#define ROUNDSTART_OBJECTIVE_ENTITIES "func_bomb_target|func_hostage_rescue|c4|hostage_entity"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Client is spawning into the game.
|
||||||
|
*
|
||||||
|
* @param client The client index.
|
||||||
|
*/
|
||||||
|
RoundStartOnClientSpawn(client)
|
||||||
|
{
|
||||||
|
// If client hasn't spawned yet, then stop.
|
||||||
|
if (!IsPlayerAlive(client))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get public chat trigger prefix.
|
||||||
|
decl String:publictrigger[4];
|
||||||
|
SayHooksGetPublicChatTrigger(publictrigger, sizeof(publictrigger));
|
||||||
|
|
||||||
|
// If public chat trigger is disabled, then don't print message.
|
||||||
|
if (StrEqual(publictrigger, "N/A", false))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Print to client, how to access ZMenu.
|
||||||
|
TranslationPrintToChat(client, "General zmenu reminder", publictrigger, SAYHOOKS_KEYWORD_ZMENU);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The round is starting.
|
* The round is starting.
|
||||||
*/
|
*/
|
||||||
|
@ -161,6 +161,12 @@ ZMarketOnClientSpawnPost(client)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If client is a zombie, then stop.
|
||||||
|
if (InfectIsClientInfected(client))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// If auto-rebuy is enabled, then force client to rebuy weapons.
|
// If auto-rebuy is enabled, then force client to rebuy weapons.
|
||||||
if (CookiesGetClientCookieBool(client, g_hZMarketAutoRebuyCookie))
|
if (CookiesGetClientCookieBool(client, g_hZMarketAutoRebuyCookie))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user