From c8b34337001dcb72ee366eb7fae7a8c79861f415 Mon Sep 17 00:00:00 2001 From: zaCade Date: Mon, 23 Jul 2018 17:06:03 +0200 Subject: [PATCH] Spring break cleanup. Cleaning up all useless tabs, spaces, indents, you name it. --- AntiBhopCheat/scripting/AntiBhopCheat.sp | 38 +- ConnectAnnounce/scripting/ConnectAnnounce.sp | 38 +- .../scripting/CrowdSpawnWarning.sp | 2 +- Discord_Unloze/scripting/Discord_Unloze.sp | 10 +- .../scripting/InfectionExploitFix.sp | 10 +- InfoMessage/scripting/InfoMessage.sp | 2 +- KillStreaks/scripting/KillStreaks.sp | 34 +- MVP_Stars/scripting/MVP_Stars.sp | 114 +- MakoVote/scripting/MakoVote.sp | 110 +- Spectate/scripting/Spectate.sp | 10 +- TopDefenders/scripting/TopDefenders.sp | 10 +- TriggerRewards/scripting/TriggerRewards.sp | 50 +- VIP_Test/scripting/VIP_Test.sp | 10 +- .../scripting/hlstatsx_difficulty.sp | 123 ++- includes/loghelper.inc | 40 +- xmas/scripting/xmas.sp | 298 +++--- .../scripting/ze_boatescape6_remix_fix2.sp | 988 +++++++++--------- 17 files changed, 925 insertions(+), 962 deletions(-) diff --git a/AntiBhopCheat/scripting/AntiBhopCheat.sp b/AntiBhopCheat/scripting/AntiBhopCheat.sp index 8de82c81..d026b46e 100644 --- a/AntiBhopCheat/scripting/AntiBhopCheat.sp +++ b/AntiBhopCheat/scripting/AntiBhopCheat.sp @@ -27,11 +27,11 @@ char g_sStats[4096]; public Plugin myinfo = { - name = "AntiBhopCheat", - author = "BotoX", - description = "Detect all kinds of bhop cheats", - version = "0.0", - url = "" + name = "AntiBhopCheat", + autho = "BotoX", + description = "Detect all kinds of bhop cheats", + version = "0.0", + url = "" }; @@ -51,7 +51,7 @@ public void OnPluginStart() OnClientPutInServer(client); } } - + // Api g_hOnClientDetected = CreateGlobalForward("AntiBhopCheat_OnClientDetected", ET_Ignore, Param_Cell, Param_String, Param_String); } @@ -364,7 +364,7 @@ NotifyAdmins(int client, const char[] sReason) PrintStreak(i, client, -1, true); } } - + Forward_OnDetected(client, sReason, g_sStats) } @@ -421,7 +421,7 @@ void PrintStats(int client, int iTarget) PrintToConsole(client, "Global jumps: %d | Hyper?: %.1f%% | Hack?: %.1f%%", iGlobalJumps, HyperRatio * 100.0, HackRatio * 100.0); - + int aGlobalJumps[3]; Player.GetJumps(aGlobalJumps); @@ -430,7 +430,7 @@ void PrintStats(int client, int iTarget) (aGlobalJumps[1] / float(iGlobalJumps)) * 100.0, (aGlobalJumps[2] / float(iGlobalJumps)) * 100.0); - + PrintToConsole(client, "more to come..."); } @@ -475,9 +475,9 @@ public Action Command_Streak(int client, int argc) void PrintStreak(int client, int iTarget, int iStreak, bool bDetected=false) { g_sStats = ""; - + PrintToConsole(client, "[SM] Bunnyhop streak %d for %L", iStreak, iTarget); - + if (bDetected) Format(g_sStats, sizeof(g_sStats), "%sBunnyhop streak %d for %L\n", g_sStats, iStreak, iTarget); @@ -517,7 +517,7 @@ void PrintStreak(int client, int iTarget, int iStreak, bool bDetected=false) PrintToConsole(client, "Streak jumps: %d | Hyper?: %.1f%% | Hack?: %.1f%%", iStreakJumps, HyperRatio * 100.0, HackRatio * 100.0); - + if (bDetected) Format(g_sStats, sizeof(g_sStats), "%sStreak jumps: %d | Hyper?: %.1f%% | Hack?: %.1f%%\n", g_sStats, iStreakJumps, HyperRatio * 100.0, HackRatio * 100.0); @@ -529,17 +529,17 @@ void PrintStreak(int client, int iTarget, int iStreak, bool bDetected=false) (aStreakJumps[0] / float(iStreakJumps)) * 100.0, (aStreakJumps[1] / float(iStreakJumps)) * 100.0, (aStreakJumps[2] / float(iStreakJumps)) * 100.0); - + if (bDetected) Format(g_sStats, sizeof(g_sStats), "%sStreak jumps perf group (1 2 +): %1.f%% %1.f%% %1.f%%\n", - g_sStats, + g_sStats, (aStreakJumps[0] / float(iStreakJumps)) * 100.0, (aStreakJumps[1] / float(iStreakJumps)) * 100.0, (aStreakJumps[2] / float(iStreakJumps)) * 100.0); - + PrintToConsole(client, "#%2s %5s %7s %7s %5s %5s %8s %4s %6s %s", "id", " diff", " invel", " outvel", " gain", " comb", " avgdist", " num", " avg+-", "pattern"); - + if (bDetected) Format(g_sStats, sizeof(g_sStats), "%s#%2s %5s %7s %7s %5s %5s %8s %4s %6s %s\n", g_sStats, "id", " diff", " invel", " outvel", " gain", " comb", " avgdist", " num", " avg+-", "pattern"); @@ -624,10 +624,10 @@ void PrintStreak(int client, int iTarget, int iStreak, bool bDetected=false) iPresses, fAvgDownUp, sPattern); - + if (bDetected) Format(g_sStats, sizeof(g_sStats), "%s#%2d %4d%% %7.1f %7.1f %4d%% %4d%% %8.2f %4d %6.2f %s\n", - g_sStats, + g_sStats, i, fPrevVel == 0.0 ? 100 : RoundFloat((fInVel / fPrevVel) * 100.0 - 100.0), fInVel, @@ -651,6 +651,6 @@ bool Forward_OnDetected(int client, const char[] reason, const char[] stats) Call_PushString(reason); Call_PushString(stats); Call_Finish(); - + g_sStats = ""; } \ No newline at end of file diff --git a/ConnectAnnounce/scripting/ConnectAnnounce.sp b/ConnectAnnounce/scripting/ConnectAnnounce.sp index 114f2254..cc5c725f 100644 --- a/ConnectAnnounce/scripting/ConnectAnnounce.sp +++ b/ConnectAnnounce/scripting/ConnectAnnounce.sp @@ -22,11 +22,11 @@ Handle g_hCustomMessageFile2; // Purpose: //---------------------------------------------------------------------------------------------------- public Plugin myinfo = { - name = "Connect Announce", - author = "Neon + Botox", + name = "Connect Announce", + author = "Neon + Botox", description = "Connect Announcer", - version = "2.0", - url = "" + version = "2.0", + url = "" } //---------------------------------------------------------------------------------------------------- @@ -150,16 +150,16 @@ public Action Command_ResetJoinMsg(int client, int args) SetFailState("[ConnectAnnounce] Config file missing!"); return Plugin_Handled; } - + KvRewind(g_hCustomMessageFile); - + if (KvJumpToKey(g_hCustomMessageFile, sAuth, true)) KvSetString(g_hCustomMessageFile, "message", "reset"); - + KvRewind(g_hCustomMessageFile); - + KeyValuesToFile(g_hCustomMessageFile, g_sCustomMessageFile); - + CPrintToChat(client, "[ConnectAnnounce] Your Join Message got reset."); return Plugin_Handled; @@ -272,9 +272,9 @@ public void TQueryCB(Handle owner, Handle rs, const char[] error, any data) else ReplaceString(sRawMsg, sizeof(sRawMsg), "{COUNTRY}", ""); } - + //////////////////////////////////////////////////////////////////////////////////////////////////////////// - + if (g_hCustomMessageFile2 != null) CloseHandle(g_hCustomMessageFile2); @@ -287,27 +287,27 @@ public void TQueryCB(Handle owner, Handle rs, const char[] error, any data) } KvRewind(g_hCustomMessageFile2); - + char sFinalMessage[512]; char sCustomMessage[256]; - - + + if (KvJumpToKey(g_hCustomMessageFile2, sAuth)) - { + { KvGetString(g_hCustomMessageFile2, "message", sCustomMessage, sizeof(sCustomMessage), ""); if (StrEqual(sCustomMessage, "reset")) CPrintToChatAll(sRawMsg); else - { + { Format(sFinalMessage, sizeof(sFinalMessage), "%s %s", sRawMsg, sCustomMessage); CPrintToChatAll(sFinalMessage); } } else CPrintToChatAll(sRawMsg); - - + + } //---------------------------------------------------------------------------------------------------- // Purpose: @@ -321,7 +321,7 @@ public void OnClientPostAdminCheck(int client) GetClientAuthId(client, AuthId_Steam2, sAuth, sizeof(sAuth)); strcopy(sAuth, sizeof(sAuth), sAuth[8]); - + char sQuery[512]; Format(sQuery, sizeof(sQuery), "SELECT COUNT(*) AS rank FROM hlstats_Players WHERE hlstats_Players.game = 'css-ze' AND hideranking = 0 AND skill > (SELECT skill from hlstats_Players JOIN hlstats_PlayerUniqueIds ON hlstats_Players.playerId = hlstats_PlayerUniqueIds.playerId WHERE uniqueId = '%s' AND hlstats_PlayerUniqueIds.game = 'css-ze')", sAuth); SQL_TQuery(g_hDatabase, TQueryCB, sQuery, GetClientUserId(client)); diff --git a/CrowdSpawnWarning/scripting/CrowdSpawnWarning.sp b/CrowdSpawnWarning/scripting/CrowdSpawnWarning.sp index 6333765f..1578a8d8 100644 --- a/CrowdSpawnWarning/scripting/CrowdSpawnWarning.sp +++ b/CrowdSpawnWarning/scripting/CrowdSpawnWarning.sp @@ -16,7 +16,7 @@ public Plugin myinfo = author = "Neon", description = "", version = "1.0.0", - url = "https://steamcommunity.com/id/n3ontm" + url = "https://steamcommunity.com/id/n3ontm" }; //---------------------------------------------------------------------------------------------------- diff --git a/Discord_Unloze/scripting/Discord_Unloze.sp b/Discord_Unloze/scripting/Discord_Unloze.sp index b269b340..ffd45b3f 100644 --- a/Discord_Unloze/scripting/Discord_Unloze.sp +++ b/Discord_Unloze/scripting/Discord_Unloze.sp @@ -49,11 +49,11 @@ int g_iLastReportID; public Plugin myinfo = { - name = "Discord core", - author = "Obus and Neon", + name = "Discord core", + author = "Obus and Neon", description = "Chat- & Rcon-Support", - version = "1.2.0", - url = "" + version = "1.2.0", + url = "" } public APLRes AskPluginLoad2(Handle hThis, bool bLate, char[] sError, int err_max) @@ -530,7 +530,7 @@ stock void Discord_POST(const char[] sURL, char[] sText, bool bUsingUsername=fal { Format(sSafeText, sizeof(sSafeText), "%s", sText); } - + if (bTimestamp) { int iTime = GetTime(); diff --git a/InfectionExploitFix/scripting/InfectionExploitFix.sp b/InfectionExploitFix/scripting/InfectionExploitFix.sp index 9f049397..ecaf03f0 100644 --- a/InfectionExploitFix/scripting/InfectionExploitFix.sp +++ b/InfectionExploitFix/scripting/InfectionExploitFix.sp @@ -2,13 +2,13 @@ #include #include -public Plugin myinfo = +public Plugin myinfo = { - name = "InfectionExploitFix", - author = "zaCade & Neon", + name = "InfectionExploitFix", + author = "zaCade & Neon", description = "Fixes Infection Dodge Exploit", - version = "1.0", - url = "" + version = "1.0", + url = "" } #pragma semicolon 1 diff --git a/InfoMessage/scripting/InfoMessage.sp b/InfoMessage/scripting/InfoMessage.sp index fa78d259..f5ccc2b1 100644 --- a/InfoMessage/scripting/InfoMessage.sp +++ b/InfoMessage/scripting/InfoMessage.sp @@ -19,7 +19,7 @@ public Plugin myinfo = author = "Neon", description = "", version = "1.0.0", - url = "https://steamcommunity.com/id/n3ontm" + url = "https://steamcommunity.com/id/n3ontm" }; //---------------------------------------------------------------------------------------------------- diff --git a/KillStreaks/scripting/KillStreaks.sp b/KillStreaks/scripting/KillStreaks.sp index d52c4b17..4fd8aa3c 100644 --- a/KillStreaks/scripting/KillStreaks.sp +++ b/KillStreaks/scripting/KillStreaks.sp @@ -12,27 +12,27 @@ ConVar g_cvarMaximumStreak = null; bool g_bIsMotherZM[MAXPLAYERS+1] = false; int g_iKillStreak[MAXPLAYERS+1] = 0; -public Plugin myinfo = +public Plugin myinfo = { - name = "KillStreaks", - author = "Neon", + name = "KillStreaks", + author = "Neon", description = "Recreation of the original HLSTATS Killstreaks for Zombies only + new MotherZM-Win event", - version = "1.1", - url = "https://steamcommunity.com/id/n3ontm" + version = "1.1", + url = "https://steamcommunity.com/id/n3ontm" }; public void OnPluginStart() -{ +{ g_cvarMinimumStreak = CreateConVar("sm_killstreaks_min", "2", "amount of kills required for the lowest killstreak", 0, true, 0.0); g_cvarMaximumStreak = CreateConVar("sm_killstreaks_max", "12", "amount of kills required for the highest killstreak", 0, true, 0.0); - + HookEvent("round_end", OnRoundEnding, EventHookMode_Pre); HookEvent("player_spawn", OnClientSpawn); HookEvent("player_death", OnClientDeath, EventHookMode_Pre); } public void OnMapStart() -{ +{ GetTeams(); } @@ -40,7 +40,7 @@ public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, boo { if (motherInfect) g_bIsMotherZM[client] = true; - + if (attacker > -1) g_iKillStreak[attacker] += 1; } @@ -65,7 +65,7 @@ public void OnClientDeath(Event hEvent, const char[] sEvent, bool bDontBroadcast public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast) { int iReason = hEvent.GetInt("reason"); - + if (iReason != view_as(CSRoundEnd_GameStart)) { for (int client = 1; client <= MaxClients; client++) @@ -74,9 +74,9 @@ public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast { if ((ZR_IsClientZombie(client)) && (g_bIsMotherZM[client])) LogPlayerEvent(client, "triggered", "ze_m_zombies_win"); - + EndKillStreak(client); - } + } } } } @@ -87,10 +87,10 @@ public void EndKillStreak(int client) { if (g_iKillStreak[client] > g_cvarMaximumStreak.IntValue) g_iKillStreak[client] = g_cvarMaximumStreak.IntValue; - - char StrEventName[32]; + + char StrEventName[32]; if(g_bIsMotherZM[client]) - { + { Format(StrEventName, sizeof(StrEventName), "ze_m_kill_streak_%d", g_iKillStreak[client]); LogPlayerEvent(client, "triggered", StrEventName); } @@ -98,9 +98,9 @@ public void EndKillStreak(int client) { Format(StrEventName, sizeof(StrEventName), "ze_kill_streak_%d", g_iKillStreak[client]); LogPlayerEvent(client, "triggered", StrEventName); - } + } ResetClient(client); - } + } } public void ResetClient(int client) diff --git a/MVP_Stars/scripting/MVP_Stars.sp b/MVP_Stars/scripting/MVP_Stars.sp index c8067d5f..101256da 100644 --- a/MVP_Stars/scripting/MVP_Stars.sp +++ b/MVP_Stars/scripting/MVP_Stars.sp @@ -2,110 +2,84 @@ #include #include -new bool:G_bIsHuman[66]; -new bool:G_bIsZombie[66]; +new bool:G_bIsHuman[MAXPLAYERS+1]; +new bool:G_bIsZombie[MAXPLAYERS+1]; +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- public Plugin myinfo = { - name = "MVP_Stars", - author = "zaCade", - description = "", - version = "1.0", - url = "" + name = "MVP_Stars", + author = "zaCade", + description = "", + version = "1.0", + url = "" }; -public void OnPluginStart() +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public OnPluginStart() { - HookEvent("round_start", Event_RoundStart, EventHookMode:1); - HookEvent("round_end", Event_RoundEnd, EventHookMode:1); + HookEvent("round_start", Event_RoundStart); + HookEvent("round_end", Event_RoundEnd); } -public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, bool respawnOverride, bool respawn) +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public ZR_OnClientInfected(client, attacker, bool:motherinfect, bool:respawnoverride, bool:respawn) { - G_bIsHuman[client] = 0; - G_bIsZombie[client] = 1; + G_bIsHuman[client] = false; + G_bIsZombie[client] = true; } +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- public ZR_OnClientHumanPost(client, bool:respawn, bool:protect) { - G_bIsHuman[client] = 1; - G_bIsZombie[client] = 0; + G_bIsHuman[client] = true; + G_bIsZombie[client] = false; } -public Action:Event_RoundStart(Handle:event, String:name[], bool:dontBroadcast) +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) { - new client = 1; - while (client <= MaxClients) + for (new client = 1; client <= MaxClients; client++) { - G_bIsHuman[client] = 1; - G_bIsZombie[client] = 0; - client++; + G_bIsHuman[client] = true; + G_bIsZombie[client] = false; } - return Action:0; } -public Action:Event_RoundEnd(Handle:event, String:name[], bool:dontBroadcast) +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public Action:Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast) { - switch (GetEventInt(event, "winner")) + switch(GetEventInt(event, "winner")) { - case 2: - { - CreateTimer(0.2, OnZombiesWin, any:0, 2); - } - case 3: - { - CreateTimer(0.2, OnHumansWin, any:0, 2); - } - default: - { - } + case(CS_TEAM_CT): CreateTimer(0.2, OnHumansWin, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE); } - return Action:0; } +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- public Action:OnHumansWin(Handle:timer) { - new client = 1; - while (client <= MaxClients) + for (new client = 1; client <= MaxClients; client++) { - new var1; if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client)) { - new var2; if (G_bIsHuman[client] && !G_bIsZombie[client]) { CS_SetMVPCount(client, CS_GetMVPCount(client) + 1); - new String:sAuthID[64]; - if (!GetClientAuthString(client, sAuthID, 64, true)) - { - Format(sAuthID, 64, "UNKNOWN"); - } } } - client++; } - return Action:0; -} - -public Action:OnZombiesWin(Handle:timer) -{ - new client = 1; - while (client <= MaxClients) - { - new var1; - if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client)) - { - new var2; - if (G_bIsZombie[client] && !G_bIsHuman[client]) - { - new String:sAuthID[64]; - if (!GetClientAuthString(client, sAuthID, 64, true)) - { - Format(sAuthID, 64, "UNKNOWN"); - } - } - } - client++; - } - return Action:0; } \ No newline at end of file diff --git a/MakoVote/scripting/MakoVote.sp b/MakoVote/scripting/MakoVote.sp index da24d892..43de8c74 100644 --- a/MakoVote/scripting/MakoVote.sp +++ b/MakoVote/scripting/MakoVote.sp @@ -9,11 +9,11 @@ public Plugin myinfo = { - name = "MakoVoteSystem", - author = "Neon", + name = "MakoVoteSystem", + author = "Neon", description = "MakoVoteSystem", - version = "1.0", - url = "https://steamcommunity.com/id/n3ontm" + version = "1.0", + url = "https://steamcommunity.com/id/n3ontm" } #define NUMBEROFSTAGES 6 @@ -39,14 +39,14 @@ public void OnPluginStart() public void OnMapStart() { VerifyMap(); - + PrecacheSound("#unloze/Pendulum - Witchcraft.mp3", true); AddFileToDownloadsTable("sound/unloze/Pendulum - Witchcraft.mp3"); - + bStartVoteNextRound = false; - + for (int i = 0; i <= (NUMBEROFSTAGES - 1); i++) - g_bOnCooldown[i] = false; + g_bOnCooldown[i] = false; } public Action VerifyMap() @@ -73,16 +73,16 @@ public void OnEntitySpawned(int iEntity) { if (g_bVoteFinished) return; - + char sTargetname[128]; GetEntPropString(iEntity, Prop_Data, "m_iName", sTargetname, sizeof(sTargetname)); char sClassname[128]; GetEdictClassname(iEntity, sClassname, sizeof(sClassname)); - + if ((strcmp(sTargetname, "espad") != 0) && (strcmp(sTargetname, "ss_slow") != 0) && (strcmp(sClassname, "ambient_generic") == 0)) { AcceptEntityInput(iEntity, "Kill"); - } + } } public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) @@ -92,87 +92,87 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) g_CountdownTimer = CreateTimer(1.0, StartVote, INVALID_HANDLE, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE); bStartVoteNextRound = false; } - + if (!(g_bVoteFinished)) - { - int iStrip = FindEntityByTargetname(INVALID_ENT_REFERENCE, "race_game_zone", "game_zone_player"); + { + int iStrip = FindEntityByTargetname(INVALID_ENT_REFERENCE, "race_game_zone", "game_zone_player"); if (iStrip != INVALID_ENT_REFERENCE) AcceptEntityInput(iStrip, "FireUser1"); - - int iCounter = FindEntityByTargetname(INVALID_ENT_REFERENCE, "Level_Counter", "math_counter"); + + int iCounter = FindEntityByTargetname(INVALID_ENT_REFERENCE, "Level_Counter", "math_counter"); if (iCounter != INVALID_ENT_REFERENCE) AcceptEntityInput(iCounter, "Kill"); - + int iDestination = FindEntityByTargetname(INVALID_ENT_REFERENCE, "arriba2ex", "info_teleport_destination"); if (iDestination != INVALID_ENT_REFERENCE) { - + SetVariantString("origin -9350 4550 100"); AcceptEntityInput(iDestination, "AddOutput"); - + SetVariantString("angles 0 -90 0"); - AcceptEntityInput(iDestination, "AddOutput"); + AcceptEntityInput(iDestination, "AddOutput"); } - + int iTeleport = FindEntityByTargetname(INVALID_ENT_REFERENCE, "teleporte_extreme", "trigger_teleport"); if (iTeleport != INVALID_ENT_REFERENCE) AcceptEntityInput(iTeleport, "Enable"); - + int iBarrerasfinal2 = FindEntityByTargetname(INVALID_ENT_REFERENCE, "barrerasfinal2", "func_breakable"); if (iBarrerasfinal2 != INVALID_ENT_REFERENCE) AcceptEntityInput(iBarrerasfinal2, "Break"); - + int iBarrerasfinal = FindEntityByTargetname(INVALID_ENT_REFERENCE, "barrerasfinal", "prop_dynamic"); if (iBarrerasfinal != INVALID_ENT_REFERENCE) AcceptEntityInput(iBarrerasfinal, "Kill"); - + int iPush = FindEntityByTargetname(INVALID_ENT_REFERENCE, "race_push", "trigger_push"); if (iPush != INVALID_ENT_REFERENCE) AcceptEntityInput(iPush, "Kill"); - + int iFilter = FindEntityByTargetname(INVALID_ENT_REFERENCE, "humanos", "filter_activator_team"); if (iFilter != INVALID_ENT_REFERENCE) AcceptEntityInput(iFilter, "Kill"); - + int iTemp1 = FindEntityByTargetname(INVALID_ENT_REFERENCE, "ex2_laser_1_temp", "point_template"); if (iTemp1 != INVALID_ENT_REFERENCE) { DispatchKeyValue(iTemp1, "OnEntitySpawned", "ex2_laser_1_hurt,SetDamage,0,0,-1"); DispatchKeyValue(iTemp1, "OnEntitySpawned", "ex2_laser_1_hurt,AddOutput,OnStartTouch !activator:AddOutput:origin -7000 -1000 100:0:-1,0,-1"); } - + int iTemp2 = FindEntityByTargetname(INVALID_ENT_REFERENCE, "ex2_laser_2_temp", "point_template"); if (iTemp2 != INVALID_ENT_REFERENCE) { DispatchKeyValue(iTemp2, "OnEntitySpawned", "ex2_laser_2_hurt,SetDamage,0,0,-1"); DispatchKeyValue(iTemp2, "OnEntitySpawned", "ex2_laser_2_hurt,AddOutput,OnStartTouch !activator:AddOutput:origin -7000 -1000 100:0:-1,0,-1"); } - + int iTemp3 = FindEntityByTargetname(INVALID_ENT_REFERENCE, "ex2_laser_3_temp", "point_template"); if (iTemp3 != INVALID_ENT_REFERENCE) { DispatchKeyValue(iTemp3, "OnEntitySpawned", "ex2_laser_3_hurt,SetDamage,0,0,-1"); DispatchKeyValue(iTemp3, "OnEntitySpawned", "ex2_laser_3_hurt,AddOutput,OnStartTouch !activator:AddOutput:origin -7000 -1000 100:0:-1,0,-1"); } - + int iTemp4 = FindEntityByTargetname(INVALID_ENT_REFERENCE, "ex2_laser_4_temp", "point_template"); if (iTemp4 != INVALID_ENT_REFERENCE) { DispatchKeyValue(iTemp4, "OnEntitySpawned", "ex2_laser_4_hurt,SetDamage,0,0,-1"); DispatchKeyValue(iTemp4, "OnEntitySpawned", "ex2_laser_4_hurt,AddOutput,OnStartTouch !activator:AddOutput:origin -7000 -1000 100:0:-1,0,-1"); - } - + } + int iLaserTimer = FindEntityByTargetname(INVALID_ENT_REFERENCE, "cortes2", "logic_timer"); if (iLaserTimer != INVALID_ENT_REFERENCE) AcceptEntityInput(iLaserTimer, "Enable"); - + int iGameText = FindEntityByTargetname(INVALID_ENT_REFERENCE, "Level_Text", "game_text"); if (iGameText != INVALID_ENT_REFERENCE) AcceptEntityInput(iGameText, "Kill"); - + int iNewGameText; - iNewGameText = CreateEntityByName("game_text"); + iNewGameText = CreateEntityByName("game_text"); DispatchKeyValue(iNewGameText, "targetname", "intermission_game_text"); DispatchKeyValue(iNewGameText, "channel", "4"); DispatchKeyValue(iNewGameText, "spawnflags", "1"); @@ -189,7 +189,7 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) DispatchSpawn(iNewGameText); SetVariantString("!activator"); AcceptEntityInput(iNewGameText, "FireUser1"); - + int iMusic = FindEntityByTargetname(INVALID_ENT_REFERENCE, "ss_slow", "ambient_generic"); if (iMusic != INVALID_ENT_REFERENCE) { @@ -204,7 +204,7 @@ public void GenerateArray() { int iBlockSize = ByteCountToCells(PLATFORM_MAX_PATH); g_StageList = CreateArray(iBlockSize); - + for (int i = 0; i <= (NUMBEROFSTAGES - 1); i++) PushArrayString(g_StageList, g_sStageName[i]); @@ -225,27 +225,27 @@ public void GenerateArray() public Action Command_StartVote(int args) { int iCurrentStage = GetCurrentStage(); - + if (iCurrentStage > -1) g_bOnCooldown[iCurrentStage] = true; - + int iOnCD = 0; for (int i = 0; i <= (NUMBEROFSTAGES - 1); i++) { if (g_bOnCooldown[i]) iOnCD += 1; } - + if (iOnCD >= 3) { for (int i = 0; i <= (NUMBEROFSTAGES - 1); i++) g_bOnCooldown[i] = false; - } - + } + g_bVoteFinished = false; GenerateArray(); bStartVoteNextRound = true; - + return Plugin_Handled; } @@ -280,7 +280,7 @@ public void InitiateVote() { char sBuffer[128]; GetArrayString(g_StageList, i, sBuffer, sizeof(sBuffer)); - + for (int i = 0; i <= (NUMBEROFSTAGES - 1); i++) { if (strcmp(sBuffer, g_sStageName[i]) == 0) @@ -289,8 +289,8 @@ public void InitiateVote() AddMenuItem(g_VoteMenu, sBuffer, sBuffer, ITEMDRAW_DISABLED); else AddMenuItem(g_VoteMenu, sBuffer, sBuffer); - } - } + } + } } SetMenuOptionFlags(g_VoteMenu, MENUFLAG_BUTTON_NOVOTE); @@ -306,12 +306,12 @@ public int Handler_MakoVoteMenu(Handle menu, MenuAction action, int param1, int case MenuAction_End: { CloseHandle(menu); - + if (param1 != -1) { g_bVoteFinished = true; float fDelay = 3.0; - CS_TerminateRound(fDelay, CSRoundEnd_GameStart, false); + CS_TerminateRound(fDelay, CSRoundEnd_GameStart, false); } } } @@ -328,7 +328,7 @@ public int MenuHandler_NotifyPanel(Menu hMenu, MenuAction iAction, int iParam1, } public void Handler_SettingsVoteFinished(Handle menu, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) -{ +{ int highest_votes = item_info[0][VOTEINFO_ITEM_VOTES]; int required_percent = 60; int required_votes = RoundToCeil(float(num_votes) * float(required_percent) / 100); @@ -362,15 +362,15 @@ public void Handler_VoteFinishedGeneric(Handle menu, int num_votes, int num_clie float fPercentage = float(item_info[0][VOTEINFO_ITEM_VOTES] * 100) / float(num_votes); CPrintToChatAll("{green}[MakoVote] {white}Vote Finished! Winner: {red}%s{white} with %d%% of %d votes!", sWinner, RoundToFloor(fPercentage), num_votes); - + for (int i = 0; i <= (NUMBEROFSTAGES - 1); i++) { if (strcmp(sWinner, g_sStageName[i]) == 0) g_Winnerstage = i; } - + ServerCommand("sm_stage %d", (g_Winnerstage + 4)); - + float fDelay = 3.0; CS_TerminateRound(fDelay, CSRoundEnd_GameStart, false); } @@ -378,10 +378,10 @@ public void Handler_VoteFinishedGeneric(Handle menu, int num_votes, int num_clie public int GetCurrentStage() { int iLevelCounterEnt = FindEntityByTargetname(INVALID_ENT_REFERENCE, "Level_Counter", "math_counter"); - + int offset = FindDataMapInfo(iLevelCounterEnt, "m_OutValue"); int iCounterVal = RoundFloat(GetEntDataFloat(iLevelCounterEnt, offset)); - + int iCurrentStage; if (iCounterVal == 5) iCurrentStage = 0; @@ -395,9 +395,9 @@ public int GetCurrentStage() iCurrentStage = 2; else if (iCounterVal == 11) iCurrentStage = 4; - else + else iCurrentStage = 0; - + return iCurrentStage; } diff --git a/Spectate/scripting/Spectate.sp b/Spectate/scripting/Spectate.sp index e48f5107..d8bae6db 100644 --- a/Spectate/scripting/Spectate.sp +++ b/Spectate/scripting/Spectate.sp @@ -144,13 +144,13 @@ public Action Command_Spectate(int client, int argc) return Plugin_Handled; } -public Action Command_SpectateViaConsole(int client, char[] command, int args) +public Action Command_SpectateViaConsole(int client, char[] command, int args) { if ((IsPlayerAlive(client) && ZR_IsClientHuman(client)) && GetTeamClientCount(CS_TEAM_T) > 0 && GetTeamAliveClientCount(CS_TEAM_T) > 0) LogPlayerEvent(client, "triggered", "switch_to_spec"); - return Plugin_Continue; -} + return Plugin_Continue; +} // Fix spec_goto crash exploit public Action Command_GoTo(int client, const char[] command, int argc) @@ -177,7 +177,7 @@ public Action Command_GoTo(int client, const char[] command, int argc) stock int GetTeamAliveClientCount(int iTeam) { int ret = 0; - + for (int i = 1; i <= MaxClients; i++) { if (!IsClientInGame(i) || GetClientTeam(i) != iTeam) @@ -188,6 +188,6 @@ stock int GetTeamAliveClientCount(int iTeam) ret++; } - + return ret; } \ No newline at end of file diff --git a/TopDefenders/scripting/TopDefenders.sp b/TopDefenders/scripting/TopDefenders.sp index b7090d73..2d6f09f5 100644 --- a/TopDefenders/scripting/TopDefenders.sp +++ b/TopDefenders/scripting/TopDefenders.sp @@ -239,7 +239,7 @@ public void OnMapStart() AddFileToDownloadsTable("materials/models/unloze/crown/crown_bump.vtf"); AddFileToDownloadsTable("materials/models/unloze/crown/crown_detail.vtf"); AddFileToDownloadsTable("materials/models/unloze/crown/crown_lightwarp.vtf"); - + GetTeams(); } @@ -421,7 +421,7 @@ public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast { Format(sBuffer, sizeof(sBuffer), "%s\n1. %N - %d DMG", sBuffer, iSortedList[0][0], iSortedList[0][1]); LogPlayerEvent(iSortedList[0][0], "triggered", "top_defender"); - + g_iPlayerWinner[0] = GetSteamAccountID(iSortedList[0][0]); } @@ -429,7 +429,7 @@ public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast { Format(sBuffer, sizeof(sBuffer), "%s\n2. %N - %d DMG", sBuffer, iSortedList[1][0], iSortedList[1][1]); LogPlayerEvent(iSortedList[1][0], "triggered", "second_defender"); - + g_iPlayerWinner[1] = GetSteamAccountID(iSortedList[1][0]); } @@ -437,7 +437,7 @@ public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast { Format(sBuffer, sizeof(sBuffer), "%s\n3. %N - %d DMG", sBuffer, iSortedList[2][0], iSortedList[2][1]); LogPlayerEvent(iSortedList[2][0], "triggered", "third_defender"); - + g_iPlayerWinner[2] = GetSteamAccountID(iSortedList[2][0]); } @@ -498,7 +498,7 @@ public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast } else PrintToChatAll(sBuffer); - + TopDefenders_OnRoundEnd(iPlayers, iDamage); } } diff --git a/TriggerRewards/scripting/TriggerRewards.sp b/TriggerRewards/scripting/TriggerRewards.sp index 5914270c..2f4d823c 100644 --- a/TriggerRewards/scripting/TriggerRewards.sp +++ b/TriggerRewards/scripting/TriggerRewards.sp @@ -18,11 +18,11 @@ ConVar g_cCD; //---------------------------------------------------------------------------------------------------- public Plugin myinfo = { - name = "Trigger Rewards", - author = "Neon", + name = "Trigger Rewards", + author = "Neon", description = "HLSTATS Trigger Rewards", - version = "1.0", - url = "https://steamcommunity.com/id/n3ontm" + version = "1.0", + url = "https://steamcommunity.com/id/n3ontm" }; //---------------------------------------------------------------------------------------------------- @@ -30,12 +30,12 @@ public Plugin myinfo = //---------------------------------------------------------------------------------------------------- public void OnPluginStart() { - g_cCD = CreateConVar("sm_trigger_reward_cd", "10.0", "Cooldown between HLSTATS Trigger rewards", 0, true, 0.1); - AutoExecConfig(true, "plugin.TriggerRewards"); - - HookEvent("round_start", OnRoundStart); - HookEntityOutput("trigger_once", "OnStartTouch", OnStartTouch); - HookEntityOutput("func_button", "OnPressed", OnPressed); + g_cCD = CreateConVar("sm_trigger_reward_cd", "10.0", "Cooldown between HLSTATS Trigger rewards", 0, true, 0.1); + AutoExecConfig(true, "plugin.TriggerRewards"); + + HookEvent("round_start", OnRoundStart); + HookEntityOutput("trigger_once", "OnStartTouch", OnStartTouch); + HookEntityOutput("func_button", "OnPressed", OnPressed); } //---------------------------------------------------------------------------------------------------- @@ -51,7 +51,7 @@ public void OnMapStart() //---------------------------------------------------------------------------------------------------- public Action OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) { - for(int i = 0; i <= 2047; i++) + for(int i = 0; i < 2048; i++) g_bDisabled[i] = false; } @@ -60,13 +60,10 @@ public Action OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcas //---------------------------------------------------------------------------------------------------- public void OnStartTouch(const char[] sOutput, int iCaller, int iActivator, float fDelay) { - if (g_bDisabled[iCaller]) + if (!IsValidClient(iActivator)) return; - if (g_bOnCD) - return; - - if(!(1<=iActivator<= MaxClients ) || (iCaller == -1) || (!IsClientInGame(iActivator)) || !IsPlayerAlive(iActivator) || !IsPlayerAlive(iActivator)) + if (g_bDisabled[iCaller] || g_bOnCD) return; if (!(ZR_IsClientHuman(iActivator))) @@ -88,26 +85,20 @@ public void OnPressed(const char[] sOutput, int iCaller, int iActivator, float f if(!IsValidClient(iActivator)) return; - if (g_bDisabled[iCaller]) - return; - - if (g_bOnCD) + if (g_bDisabled[iCaller] || g_bOnCD) return; if (!(ZR_IsClientHuman(iActivator))) return; - int iParent = -1; - iParent = GetEntPropEnt(iCaller, Prop_Data, "m_hMoveParent"); - - if (iParent != -1) + int iParent = INVALID_ENT_REFERENCE; + if ((iParent = GetEntPropEnt(iCaller, Prop_Data, "m_hMoveParent")) != INVALID_ENT_REFERENCE) { char sClassname[64]; GetEdictClassname(iParent, sClassname, sizeof(sClassname)); - if ((StrContains(sClassname, "weapon", false) != -1)) + if (strncmp(sClassname, "weapon_", 7, false) == 0) return; - } g_bDisabled[iCaller] = true; @@ -116,7 +107,6 @@ public void OnPressed(const char[] sOutput, int iCaller, int iActivator, float f CreateTimer(g_cCD.FloatValue, ResetCD); LogPlayerEvent(iActivator, "triggered", "trigger"); - } //---------------------------------------------------------------------------------------------------- @@ -132,8 +122,8 @@ public Action ResetCD(Handle timer) //---------------------------------------------------------------------------------------------------- public bool IsValidClient(int iClient) { - if ( !( 1 <= iClient <= MaxClients ) || !IsClientInGame(iClient) || !IsPlayerAlive(iClient)) - return false; + if ( !( 1 <= iClient <= MaxClients ) || !IsClientInGame(iClient) || !IsPlayerAlive(iClient)) + return false; - return true; + return true; } \ No newline at end of file diff --git a/VIP_Test/scripting/VIP_Test.sp b/VIP_Test/scripting/VIP_Test.sp index 8af1b037..fb662bc0 100644 --- a/VIP_Test/scripting/VIP_Test.sp +++ b/VIP_Test/scripting/VIP_Test.sp @@ -9,11 +9,11 @@ ConVar g_cvFreeVIPDuration; //---------------------------------------------------------------------------------------------------- public Plugin myinfo = { - name = "Unloze_VIP_Test", - author = "Neon", + name = "Unloze_VIP_Test", + author = "Neon", description = "", - version = "1.0", - url = "https://steamcommunity.com/id/n3ontm" + version = "1.0", + url = "https://steamcommunity.com/id/n3ontm" } //---------------------------------------------------------------------------------------------------- @@ -127,7 +127,7 @@ bool CheckMYSQL(int client, bool add = false) { Format(sQuery, sizeof(sQuery), "INSERT INTO testvip_table (steam_auth, activated) VALUES ('%s', '%d')", sSID, iTimestamp); SQL_FastQuery(db, sQuery); - + ApplyGroupFlags(client); PrintToChat(client, "[Unloze] Your TEST VIP will expire in %d minutes!", g_cvFreeVIPDuration.IntValue - (iTimestamp - iTimestampActivated) / 60); PrintToChat(client, "[Unloze] You have now access to !zclass, !tag and !glow."); diff --git a/hlstatsx_difficulty/scripting/hlstatsx_difficulty.sp b/hlstatsx_difficulty/scripting/hlstatsx_difficulty.sp index 6938781f..aff76dea 100644 --- a/hlstatsx_difficulty/scripting/hlstatsx_difficulty.sp +++ b/hlstatsx_difficulty/scripting/hlstatsx_difficulty.sp @@ -2,119 +2,118 @@ #include #include -new bool:G_bIsHuman[66]; -new bool:G_bIsZombie[66]; +new bool:G_bIsHuman[MAXPLAYERS+1]; +new bool:G_bIsZombie[MAXPLAYERS+1]; + new Handle:G_hCvar_Difficulty_Humans; new Handle:G_hCvar_Difficulty_Zombies; +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- public Plugin:myinfo = { - name = "HLstatsX CE Difficulty", + name = "HLstatsX CE Difficulty", + author = "zaCade + Neon", description = "Grant points to the winning team. (zombies/humans)", - author = "zaCade + Neon", - version = "1.1", - url = "" + version = "1.1", + url = "" }; +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- public OnPluginStart() { G_hCvar_Difficulty_Humans = CreateConVar("hlx_difficulty_humans", "0", "", 0, true, 0.0, true, 3.0); G_hCvar_Difficulty_Zombies = CreateConVar("hlx_difficulty_zombies", "0", "", 0, true, 0.0, true, 3.0); - HookEvent("round_start", Event_RoundStart, EventHookMode:1); - HookEvent("round_end", Event_RoundEnd, EventHookMode:1); - + + HookEvent("round_start", Event_RoundStart); + HookEvent("round_end", Event_RoundEnd); + AutoExecConfig(true, "plugin.hlstatsx_difficulty"); } +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- public ZR_OnClientInfected(client, attacker, bool:motherinfect, bool:respawnoverride, bool:respawn) { - G_bIsHuman[client] = 0; - G_bIsZombie[client] = 1; + G_bIsHuman[client] = false; + G_bIsZombie[client] = true; } -public void ZR_OnClientHumanPost(int client, bool respawn, bool protect) +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public ZR_OnClientHumanPost(client, bool:respawn, bool:protect) { - G_bIsHuman[client] = 1; - G_bIsZombie[client] = 0; + G_bIsHuman[client] = true; + G_bIsZombie[client] = false; } -public Action:Event_RoundStart(Handle:event, String:name[], bool:dontBroadcast) +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) { - new client = 1; - while (client <= MaxClients) + for (new client = 1; client <= MaxClients; client++) { - G_bIsHuman[client] = 1; - G_bIsZombie[client] = 0; - client++; + G_bIsHuman[client] = true; + G_bIsZombie[client] = false; } - return Action:0; } -public Action:Event_RoundEnd(Handle:event, String:name[], bool:dontBroadcast) +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public Action:Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast) { - switch (GetEventInt(event, "winner")) + switch(GetEventInt(event, "winner")) { - case 2: - { - CreateTimer(0.2, OnZombiesWin, any:0, 2); - } - case 3: - { - CreateTimer(0.2, OnHumansWin, any:0, 2); - } - default: - { - } + case(CS_TEAM_CT): CreateTimer(0.2, OnHumansWin, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE); + case(CS_TEAM_T): CreateTimer(0.2, OnZombiesWin, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE); } - return Action:0; } +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- public Action:OnHumansWin(Handle:timer) { - new client = 1; - while (client <= MaxClients) + for (new client = 1; client <= MaxClients; client++) { - new var1; if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client)) { - new var2; if (G_bIsHuman[client] && !G_bIsZombie[client]) { - //CS_SetMVPCount(client, CS_GetMVPCount(client) + 1); - new String:sAuthID[64]; - if (!GetClientAuthString(client, sAuthID, 64, true)) - { - Format(sAuthID, 64, "UNKNOWN"); - } - LogToGame("\"%N<%d><%s><%s>\" triggered \"human_win_%i\"", client, GetClientUserId(client), sAuthID, "CT", GetConVarInt(G_hCvar_Difficulty_Humans)); + new String:sAuthid[64]; + if (!GetClientAuthString(client, sAuthid, sizeof(sAuthid))) + Format(sAuthid, sizeof(sAuthid), "UNKNOWN"); + + LogToGame("\"%N<%d><%s><%s>\" triggered \"human_win_%i\"", client, GetClientUserId(client), sAuthid, "CT", GetConVarInt(G_hCvar_Difficulty_Humans)); } } - client++; } - return Action:0; } +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- public Action:OnZombiesWin(Handle:timer) { - new client = 1; - while (client <= MaxClients) + for (new client = 1; client <= MaxClients; client++) { - new var1; if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client)) { - new var2; if (G_bIsZombie[client] && !G_bIsHuman[client]) { - new String:sAuthID[64]; - if (!GetClientAuthString(client, sAuthID, 64, true)) - { - Format(sAuthID, 64, "UNKNOWN"); - } - LogToGame("\"%N<%d><%s><%s>\" triggered \"zombie_win_%i\"", client, GetClientUserId(client), sAuthID, "TERRORIST", GetConVarInt(G_hCvar_Difficulty_Zombies)); + new String:sAuthid[64]; + if (!GetClientAuthString(client, sAuthid, sizeof(sAuthid))) + Format(sAuthid, sizeof(sAuthid), "UNKNOWN"); + + LogToGame("\"%N<%d><%s><%s>\" triggered \"zombie_win_%i\"", client, GetClientUserId(client), sAuthid, "TERRORIST", GetConVarInt(G_hCvar_Difficulty_Zombies)); } } - client++; } - return Action:0; -} - +} \ No newline at end of file diff --git a/includes/loghelper.inc b/includes/loghelper.inc index 170708e7..04f66993 100644 --- a/includes/loghelper.inc +++ b/includes/loghelper.inc @@ -57,11 +57,11 @@ stock void LogPlayerEvent(int client, const char[] verb, const char[] event, boo { float player_origin[3]; GetClientAbsOrigin(client, player_origin); - LogToGame("\"%N<%d><%s><%s>\" %s \"%s\"%s (position \"%d %d %d\")", client, GetClientUserId(client), player_authid, g_team_list[GetClientTeam(client)], verb, event, properties, RoundFloat(player_origin[0]), RoundFloat(player_origin[1]), RoundFloat(player_origin[2])); + LogToGame("\"%N<%d><%s><%s>\" %s \"%s\"%s (position \"%d %d %d\")", client, GetClientUserId(client), player_authid, g_team_list[GetClientTeam(client)], verb, event, properties, RoundFloat(player_origin[0]), RoundFloat(player_origin[1]), RoundFloat(player_origin[2])); } else { - LogToGame("\"%N<%d><%s><%s>\" %s \"%s\"%s", client, GetClientUserId(client), player_authid, g_team_list[GetClientTeam(client)], verb, event, properties); + LogToGame("\"%N<%d><%s><%s>\" %s \"%s\"%s", client, GetClientUserId(client), player_authid, g_team_list[GetClientTeam(client)], verb, event, properties); } } } @@ -80,20 +80,20 @@ stock void LogPlyrPlyrEvent(int client, int victim, const char[] verb, const cha { strcopy(victim_authid, sizeof(victim_authid), "UNKNOWN"); } - + if (display_location) { float player_origin[3]; GetClientAbsOrigin(client, player_origin); - + float victim_origin[3]; GetClientAbsOrigin(victim, victim_origin); - - LogToGame("\"%N<%d><%s><%s>\" %s \"%s\" against \"%N<%d><%s><%s>\"%s (position \"%d %d %d\") (victim_position \"%d %d %d\")", client, GetClientUserId(client), player_authid, g_team_list[GetClientTeam(client)], verb, event, victim, GetClientUserId(victim), victim_authid, g_team_list[GetClientTeam(victim)], properties, RoundFloat(player_origin[0]), RoundFloat(player_origin[1]), RoundFloat(player_origin[2]), RoundFloat(victim_origin[0]), RoundFloat(victim_origin[1]), RoundFloat(victim_origin[2])); + + LogToGame("\"%N<%d><%s><%s>\" %s \"%s\" against \"%N<%d><%s><%s>\"%s (position \"%d %d %d\") (victim_position \"%d %d %d\")", client, GetClientUserId(client), player_authid, g_team_list[GetClientTeam(client)], verb, event, victim, GetClientUserId(victim), victim_authid, g_team_list[GetClientTeam(victim)], properties, RoundFloat(player_origin[0]), RoundFloat(player_origin[1]), RoundFloat(player_origin[2]), RoundFloat(victim_origin[0]), RoundFloat(victim_origin[1]), RoundFloat(victim_origin[2])); } else { - LogToGame("\"%N<%d><%s><%s>\" %s \"%s\" against \"%N<%d><%s><%s>\"%s", client, GetClientUserId(client), player_authid, g_team_list[GetClientTeam(client)], verb, event, victim, GetClientUserId(victim), victim_authid, g_team_list[GetClientTeam(victim)], properties); + LogToGame("\"%N<%d><%s><%s>\" %s \"%s\" against \"%N<%d><%s><%s>\"%s", client, GetClientUserId(client), player_authid, g_team_list[GetClientTeam(client)], verb, event, victim, GetClientUserId(victim), victim_authid, g_team_list[GetClientTeam(victim)], properties); } } } @@ -112,19 +112,19 @@ stock void LogKill(int attacker, int victim, const char[] weapon, bool display_l { strcopy(victim_authid, sizeof(victim_authid), "UNKNOWN"); } - + if (display_location) { float attacker_origin[3]; GetClientAbsOrigin(attacker, attacker_origin); float victim_origin[3]; GetClientAbsOrigin(victim, victim_origin); - - LogToGame("\"%N<%d><%s><%s>\" killed \"%N<%d><%s><%s>\" with \"%s\"%s (attacker_position \"%d %d %d\") (victim_position \"%d %d %d\")", attacker, GetClientUserId(attacker), attacker_authid, g_team_list[GetClientTeam(attacker)], victim, GetClientUserId(victim), victim_authid, g_team_list[GetClientTeam(victim)], weapon, properties, RoundFloat(attacker_origin[0]), RoundFloat(attacker_origin[1]), RoundFloat(attacker_origin[2]), RoundFloat(victim_origin[0]), RoundFloat(victim_origin[1]), RoundFloat(victim_origin[2])); + + LogToGame("\"%N<%d><%s><%s>\" killed \"%N<%d><%s><%s>\" with \"%s\"%s (attacker_position \"%d %d %d\") (victim_position \"%d %d %d\")", attacker, GetClientUserId(attacker), attacker_authid, g_team_list[GetClientTeam(attacker)], victim, GetClientUserId(victim), victim_authid, g_team_list[GetClientTeam(victim)], weapon, properties, RoundFloat(attacker_origin[0]), RoundFloat(attacker_origin[1]), RoundFloat(attacker_origin[2]), RoundFloat(victim_origin[0]), RoundFloat(victim_origin[1]), RoundFloat(victim_origin[2])); } else { - LogToGame("\"%N<%d><%s><%s>\" killed \"%N<%d><%s><%s>\" with \"%s\"%s", attacker, GetClientUserId(attacker), attacker_authid, g_team_list[GetClientTeam(attacker)], victim, GetClientUserId(victim), victim_authid, g_team_list[GetClientTeam(victim)], weapon, properties); + LogToGame("\"%N<%d><%s><%s>\" killed \"%N<%d><%s><%s>\" with \"%s\"%s", attacker, GetClientUserId(attacker), attacker_authid, g_team_list[GetClientTeam(attacker)], victim, GetClientUserId(victim), victim_authid, g_team_list[GetClientTeam(victim)], weapon, properties); } } } @@ -138,17 +138,17 @@ stock void LogSuicide(int victim, const char[] weapon, bool display_location = f { strcopy(victim_authid, sizeof(victim_authid), "UNKNOWN"); } - + if (display_location) { float victim_origin[3]; GetClientAbsOrigin(victim, victim_origin); - - LogToGame("\"%N<%d><%s><%s>\" committed suicide with \"%s\"%s (victim_position \"%d %d %d\")", victim, GetClientUserId(victim), victim_authid, g_team_list[GetClientTeam(victim)], weapon, properties, RoundFloat(victim_origin[0]), RoundFloat(victim_origin[1]), RoundFloat(victim_origin[2])); + + LogToGame("\"%N<%d><%s><%s>\" committed suicide with \"%s\"%s (victim_position \"%d %d %d\")", victim, GetClientUserId(victim), victim_authid, g_team_list[GetClientTeam(victim)], weapon, properties, RoundFloat(victim_origin[0]), RoundFloat(victim_origin[1]), RoundFloat(victim_origin[2])); } else { - LogToGame("\"%N<%d><%s><%s>\" committed suicide with \"%s\"%s", victim, GetClientUserId(victim), victim_authid, g_team_list[GetClientTeam(victim)], weapon, properties); + LogToGame("\"%N<%d><%s><%s>\" committed suicide with \"%s\"%s", victim, GetClientUserId(victim), victim_authid, g_team_list[GetClientTeam(victim)], weapon, properties); } } } @@ -168,12 +168,12 @@ stock void LogPSKillTraj(int attacker, int victim, const char[] weapon) { strcopy(victim_authid, sizeof(victim_authid), "UNKNOWN"); } - + float attacker_origin[3]; GetClientAbsOrigin(attacker, attacker_origin); float victim_origin[3]; GetClientAbsOrigin(victim, victim_origin); - + LogToGame("[KTRAJ] \"%N<%d><%s><%s>\" killed \"%N<%d><%s><%s>\" with \"%s\" (attacker_position \"%d %d %d\") (victim_position \"%d %d %d\")", attacker, GetClientUserId(attacker), attacker_authid, g_team_list[GetClientTeam(attacker)], victim, GetClientUserId(victim), victim_authid, g_team_list[GetClientTeam(victim)], weapon, RoundFloat(attacker_origin[0]), RoundFloat(attacker_origin[1]), RoundFloat(attacker_origin[2]), RoundFloat(victim_origin[0]), RoundFloat(victim_origin[1]), RoundFloat(victim_origin[2])); } } @@ -195,7 +195,7 @@ stock void LogKillLoc(int attacker, int victim) GetClientAbsOrigin(attacker, attacker_origin); float victim_origin[3]; GetClientAbsOrigin(victim, victim_origin); - + LogToGame("World triggered \"killlocation\" (attacker_position \"%d %d %d\") (victim_position \"%d %d %d\")", RoundFloat(attacker_origin[0]), RoundFloat(attacker_origin[1]), RoundFloat(attacker_origin[2]), RoundFloat(victim_origin[0]), RoundFloat(victim_origin[1]), RoundFloat(victim_origin[2])); } } @@ -209,7 +209,7 @@ stock void LogTeamChange(int client, int newteam, const char[] properties = "") { strcopy(player_authid, sizeof(player_authid), "UNKNOWN"); } - + LogToGame("\"%N<%d><%s><%s>\" joined team \"%s\"%s", client, GetClientUserId(client), player_authid, g_team_list[GetClientTeam(client)], g_team_list[newteam], properties); } } @@ -223,7 +223,7 @@ stock void LogRoleChange(int client, const char[] role, const char[] properties { strcopy(player_authid, sizeof(player_authid), "UNKNOWN"); } - + LogToGame("\"%N<%d><%s><%s>\" changed role to \"%s\"%s", client, GetClientUserId(client), player_authid, g_team_list[GetClientTeam(client)], role, properties); } } diff --git a/xmas/scripting/xmas.sp b/xmas/scripting/xmas.sp index 8a5b7767..92907195 100644 --- a/xmas/scripting/xmas.sp +++ b/xmas/scripting/xmas.sp @@ -22,17 +22,17 @@ Handle g_hCVar_EntityLimit = INVALID_HANDLE; bool g_bEnabled = true; float g_fPropOrigin[3]; -public Plugin myinfo = +public Plugin myinfo = { - name = "Unloze Season Event", - author = "Neon", + name = "Unloze Season Event", + author = "Neon", description = "Unloze Season Event", - version = "1.1", - url = "https://steamcommunity.com/id/n3ontm" + version = "1.1", + url = "https://steamcommunity.com/id/n3ontm" }; public void OnPluginStart() -{ +{ g_hCVar_CollectablesEnabled = CreateConVar("sm_unloze_season_collectables_enabled", "1", "Spawn Collectables.", 0, true, 0.0, true, 1.0); g_hCVar_RandomIntervalMin = CreateConVar("sm_unloze_season_random_interval_min", "60", "Minimum Interval between spawning Collectables.", 0, true, 0.0); g_hCVar_RandomIntervalMax = CreateConVar("sm_unloze_season_random_interval_max", "120", "Maximum Interval between spawning Collectables.", 0, true, 0.0); @@ -43,39 +43,39 @@ public void OnPluginStart() g_hCVar_HighscoreDisplay = CreateConVar("sm_unloze_season_highscore_display", "5", "Amount of Players to display via sm_highscore", 0, true, 0.0); g_hCVar_PlayerRequirement = CreateConVar("sm_unloze_season_player_requirement", "10", "Amount of Players needed to spawn Collectables.", 0, true, 0.0); g_hCVar_EntityLimit = CreateConVar("sm_unloze_season_entity_limit", "2000", "Entity Safety Limit.", 0, true, 0.0); - + for(int client = 1; client <= MaxClients; client++) { if(IsClientInGame(client) && !IsFakeClient(client) && IsClientAuthorized(client)) OnClientPostAdminFilter(client); } - HookEvent("round_start", OnRoundStart, EventHookMode_Post); + HookEvent("round_start", OnRoundStart, EventHookMode_Post); RegConsoleCmd("sm_presents", Command_Collected, "Shows the total amount of presents you have collected so far"); RegConsoleCmd("sm_highscore", Command_HighScore, "Shows the HighScore"); RegAdminCmd("sm_reload_season", Command_ReloadFlags, ADMFLAG_ROOT); } public void OnMapStart() -{ +{ AddFileToDownloadsTable("models/player/stenli/smite/fenrir.phy"); AddFileToDownloadsTable("models/player/stenli/smite/fenrir.sw.vtx"); AddFileToDownloadsTable("models/player/stenli/smite/fenrir.vvd"); AddFileToDownloadsTable("models/player/stenli/smite/fenrir.dx80.vtx"); AddFileToDownloadsTable("models/player/stenli/smite/fenrir.dx90.vtx"); - AddFileToDownloadsTable("models/player/stenli/smite/fenrir.mdl"); + AddFileToDownloadsTable("models/player/stenli/smite/fenrir.mdl"); AddFileToDownloadsTable("materials/models/player/stenli/smite/fenrir/body.vmt"); AddFileToDownloadsTable("materials/models/player/stenli/smite/fenrir/body.vtf"); AddFileToDownloadsTable("materials/models/player/stenli/smite/fenrir/body_n.vtf"); AddFileToDownloadsTable("materials/models/player/stenli/smite/fenrir/body_s.vtf"); AddFileToDownloadsTable("materials/models/player/stenli/smite/fenrir/lights.vmt"); PrecacheModel("models/player/stenli/smite/fenrir.mdl"); - + AddFileToDownloadsTable("models/player/vad36lollipop/lolli_new.vvd"); AddFileToDownloadsTable("models/player/vad36lollipop/lolli_new.dx80.vtx"); AddFileToDownloadsTable("models/player/vad36lollipop/lolli_new.dx90.vtx"); AddFileToDownloadsTable("models/player/vad36lollipop/lolli_new.mdl"); AddFileToDownloadsTable("models/player/vad36lollipop/lolli_new.phy"); - AddFileToDownloadsTable("models/player/vad36lollipop/lolli_new.sw.vtx"); + AddFileToDownloadsTable("models/player/vad36lollipop/lolli_new.sw.vtx"); AddFileToDownloadsTable("materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_d_cos11.vtf"); AddFileToDownloadsTable("materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_n_cos11.vtf"); AddFileToDownloadsTable("materials/models/player/vad36lollipop/hat.vmt"); @@ -89,20 +89,20 @@ public void OnMapStart() AddFileToDownloadsTable("materials/models/player/vad36lollipop/tx_ch_main_juliet_hair_n_cos11.vtf"); AddFileToDownloadsTable("materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_d_cos11.vmt"); PrecacheModel("models/player/vad36lollipop/lolli_new.mdl"); - + AddFileToDownloadsTable("models/player/vad36santa/red.dx80.vtx"); AddFileToDownloadsTable("models/player/vad36santa/red.dx90.vtx"); AddFileToDownloadsTable("models/player/vad36santa/red.mdl"); AddFileToDownloadsTable("models/player/vad36santa/red.phy"); AddFileToDownloadsTable("models/player/vad36santa/red.sw.vtx"); - AddFileToDownloadsTable("models/player/vad36santa/red.vvd"); + AddFileToDownloadsTable("models/player/vad36santa/red.vvd"); AddFileToDownloadsTable("materials/models/player/vad36santa/Santa_N.vtf"); AddFileToDownloadsTable("materials/models/player/vad36santa/Santa_D.vmt"); AddFileToDownloadsTable("materials/models/player/vad36santa/Santa_D.vtf"); AddFileToDownloadsTable("materials/models/player/vad36santa/Santa_D_B.vmt"); AddFileToDownloadsTable("materials/models/player/vad36santa/Santa_D_B.vtf"); PrecacheModel("models/player/vad36santa/red.mdl"); - + AddFileToDownloadsTable("models/zombieden/xmas/giftbox.dx80.vtx"); AddFileToDownloadsTable("models/zombieden/xmas/giftbox.dx90.vtx"); AddFileToDownloadsTable("models/zombieden/xmas/giftbox.mdl"); @@ -115,7 +115,7 @@ public void OnMapStart() AddFileToDownloadsTable("materials/models/zombieden/xmas/gift_2.vtf"); AddFileToDownloadsTable("materials/models/zombieden/xmas/gift_lightwarp.vtf"); PrecacheModel("models/zombieden/xmas/giftbox.mdl"); - + AddFileToDownloadsTable("models/models_kit/xmas/xmastree_mini.dx80.vtx"); AddFileToDownloadsTable("models/models_kit/xmas/xmastree_mini.dx90.vtx"); AddFileToDownloadsTable("models/models_kit/xmas/xmastree_mini.mdl"); @@ -132,7 +132,7 @@ public void OnMapStart() AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_miscb_skin2.vtf"); AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_miscb_spec.vtf"); PrecacheModel("models/models_kit/xmas/xmastree_mini.mdl"); - + AddFileToDownloadsTable("models/models_kit/xmas/xmas_teddybear.dx80.vtx"); AddFileToDownloadsTable("models/models_kit/xmas/xmas_teddybear.dx90.vtx"); AddFileToDownloadsTable("models/models_kit/xmas/xmas_teddybear.mdl"); @@ -157,9 +157,9 @@ public void OnMapStart() AddFileToDownloadsTable("models/weapons/w_revenge_xmas_candy.sw.vtx"); AddFileToDownloadsTable("models/weapons/w_revenge_xmas_candy.vvd"); AddFileToDownloadsTable("materials/models/weapons/v_models/xmas_candy/cane.vmt"); - AddFileToDownloadsTable("materials/models/weapons/v_models/xmas_candy/cane.vtf"); + AddFileToDownloadsTable("materials/models/weapons/v_models/xmas_candy/cane.vtf"); PrecacheModel("models/weapons/w_revenge_xmas_candy.mdl"); - + AddFileToDownloadsTable("models/johny-srka/snowman.dx80.vtx"); AddFileToDownloadsTable("models/johny-srka/snowman.dx90.vtx"); AddFileToDownloadsTable("models/johny-srka/snowman.mdl"); @@ -174,8 +174,8 @@ public void OnMapStart() AddFileToDownloadsTable("materials/models/johny-srka/snowfloor002a.vtf"); AddFileToDownloadsTable("materials/models/johny-srka/wood_old.vmt"); AddFileToDownloadsTable("materials/models/johny-srka/wood_old.vtf"); - PrecacheModel("models/johny-srka/snowman.mdl"); - + PrecacheModel("models/johny-srka/snowman.mdl"); + AddFileToDownloadsTable("models/weapons/w_snowball_thrown.dx80.vtx"); AddFileToDownloadsTable("models/weapons/w_snowball_thrown.dx90.vtx"); AddFileToDownloadsTable("models/weapons/w_snowball_thrown.mdl"); @@ -184,33 +184,33 @@ public void OnMapStart() AddFileToDownloadsTable("models/weapons/w_snowball_thrown.vvd"); AddFileToDownloadsTable("materials/models/weapons/v_models/snooball/s.vmt"); AddFileToDownloadsTable("materials/models/weapons/v_models/snooball/s.vtf"); - AddFileToDownloadsTable("materials/models/weapons/v_models/snooball/s_norm.vtf"); + AddFileToDownloadsTable("materials/models/weapons/v_models/snooball/s_norm.vtf"); PrecacheModel("models/weapons/w_snowball_thrown.mdl"); - + AddFileToDownloadsTable("models/weapons/w_ornament_thrown.dx80.vtx"); AddFileToDownloadsTable("models/weapons/w_ornament_thrown.dx90.vtx"); AddFileToDownloadsTable("models/weapons/w_ornament_thrown.mdl"); AddFileToDownloadsTable("models/weapons/w_ornament_thrown.phy"); AddFileToDownloadsTable("models/weapons/w_ornament_thrown.sw.vtx"); - AddFileToDownloadsTable("models/weapons/w_ornament_thrown.vvd"); + AddFileToDownloadsTable("models/weapons/w_ornament_thrown.vvd"); AddFileToDownloadsTable("materials/models/weapons/v_models/ornament/ornament.vmt"); AddFileToDownloadsTable("materials/models/weapons/v_models/ornament/ornament.vtf"); AddFileToDownloadsTable("materials/models/weapons/v_models/ornament/reflect.vtf"); - PrecacheModel("models/weapons/w_ornament_thrown.mdl"); - + PrecacheModel("models/weapons/w_ornament_thrown.mdl"); + AddFileToDownloadsTable("models/weapons/w_santa_hat_thrown.dx80.vtx"); AddFileToDownloadsTable("models/weapons/w_santa_hat_thrown.dx90.vtx"); AddFileToDownloadsTable("models/weapons/w_santa_hat_thrown.mdl"); AddFileToDownloadsTable("models/weapons/w_santa_hat_thrown.phy"); AddFileToDownloadsTable("models/weapons/w_santa_hat_thrown.sw.vtx"); - AddFileToDownloadsTable("models/weapons/w_santa_hat_thrown.vvd"); + AddFileToDownloadsTable("models/weapons/w_santa_hat_thrown.vvd"); AddFileToDownloadsTable("materials/models/weapons/v_models/eq_fraggrenade/bonnet.vmt"); AddFileToDownloadsTable("materials/models/weapons/v_models/eq_fraggrenade/bonnet.vtf"); - PrecacheModel("models/weapons/w_santa_hat_thrown.mdl"); - + PrecacheModel("models/weapons/w_santa_hat_thrown.mdl"); + AddFileToDownloadsTable("sound/unl1/season/hohohoho.wav"); - PrecacheSound("sound/unl1/season/hohohoho.wav"); - + PrecacheSound("sound/unl1/season/hohohoho.wav"); + float fRandomInterval = GetRandomFloat(GetConVarFloat(g_hCVar_RandomIntervalMin), GetConVarFloat(g_hCVar_RandomIntervalMax)); CreateTimer(fRandomInterval, SpawnCollectable, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE); } @@ -221,7 +221,7 @@ public void OnClientPostAdminFilter(int client) } public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) -{ +{ CreateTimer(10.0, CheckPlayerCount, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE); } @@ -236,7 +236,7 @@ public Action CheckPlayerCount(Handle timer) } public Action Command_ReloadFlags(int client, int args) -{ +{ for(int i = 1; i <= MaxClients; i++) { if(IsClientInGame(i) && !IsFakeClient(i) && IsClientAuthorized(i)) @@ -249,35 +249,35 @@ public Action Command_ReloadFlags(int client, int args) public Action Command_HighScore(int client, int args) { char error[255]; - Database db; + Database db; if (SQL_CheckConfig("season")) { db = SQL_Connect("season", true, error, sizeof(error)); - } + } if (db == null) { LogError("Could not connect to database: %s", error); delete db; return Plugin_Handled; } - - char sName[MAX_NAME_LENGTH]; + + char sName[MAX_NAME_LENGTH]; char sQuery[255]; char sBuffer[2048] = "{green}[Unloze XMAS] {white}TOP COLLECTORS:\n"; char sTempBuffer[1024] = ""; int iCollected; int iField; - - Format(sQuery, sizeof(sQuery), "SELECT * from season_table order by collected desc limit %d", GetConVarInt(g_hCVar_HighscoreDisplay)); + + Format(sQuery, sizeof(sQuery), "SELECT * from season_table order by collected desc limit %d", GetConVarInt(g_hCVar_HighscoreDisplay)); DBResultSet rs; if ((rs = SQL_Query(db, sQuery)) == null) { - CPrintToChat(client, "{green}[Unloze XMAS] {white}Error! Could not connect to MYSQL-DB!"); + CPrintToChat(client, "{green}[Unloze XMAS] {white}Error! Could not connect to MYSQL-DB!"); delete db; delete rs; - return Plugin_Handled; + return Plugin_Handled; } - + for(int i = 1; i <= GetConVarInt(g_hCVar_HighscoreDisplay); i++) { rs.FetchRow(); @@ -286,8 +286,8 @@ public Action Command_HighScore(int client, int args) rs.FieldNameToNum("collected", iField); iCollected = rs.FetchInt(iField); Format(sTempBuffer, sizeof(sTempBuffer), "{green}%d: %s - {red}%d \n", i, sName, iCollected); - StrCat(sBuffer, sizeof(sBuffer), sTempBuffer); - } + StrCat(sBuffer, sizeof(sBuffer), sTempBuffer); + } CPrintToChat(client, sBuffer); delete db; delete rs; @@ -298,9 +298,9 @@ public Action Command_Collected(int client, int args) { int iCollected = CheckMYSQL(client); CPrintToChat(client, "{green}[Unloze XMAS] {white}You have collected {green}%d {white}presents so far.", iCollected); - + if ((iCollected > GetConVarInt(g_hCVar_MilestoneInfection)) && (iCollected > GetConVarInt(g_hCVar_MilestoneSkin))) - CPrintToChat(client, "{green}[Unloze XMAS] {white}You have unlocked {red}all rewards{white} already."); + CPrintToChat(client, "{green}[Unloze XMAS] {white}You have unlocked {red}all rewards{white} already."); if (iCollected < GetConVarInt(g_hCVar_MilestoneInfection)) CPrintToChat(client, "{green}[Unloze XMAS] {white}You need to collect {green}%d {white}more presents to unlock {red}INFECTION EFFECTS{white}.", GetConVarInt(g_hCVar_MilestoneInfection) - iCollected); if (iCollected < GetConVarInt(g_hCVar_MilestoneGrenade)) @@ -314,32 +314,32 @@ public Action Command_Collected(int client, int args) public int CheckMYSQL(int client) { if (client == -1) - return -1; - + return -1; + char error[255]; - Database db; + Database db; if (SQL_CheckConfig("season")) { db = SQL_Connect("season", true, error, sizeof(error)); - } + } if (db == null) { - CPrintToChat(client, "{green}[Unloze XMAS] {white}Error! Could not connect to MYSQL-DB!"); + CPrintToChat(client, "{green}[Unloze XMAS] {white}Error! Could not connect to MYSQL-DB!"); delete db; return -1; } - + char sSID[64]; GetClientAuthId(client, AuthId_Steam2, sSID, sizeof(sSID)); char sQuery[255]; - Format(sQuery, sizeof(sQuery), "SELECT collected FROM season_table WHERE steam_auth = '%s'", sSID); + Format(sQuery, sizeof(sQuery), "SELECT collected FROM season_table WHERE steam_auth = '%s'", sSID); DBResultSet rs; if ((rs = SQL_Query(db, sQuery)) == null) { delete db; delete rs; return -1; - + } int iCollected; if (!(rs.RowCount > 0)) @@ -356,7 +356,7 @@ public int CheckMYSQL(int client) delete rs; delete db; CheckAndAddFlag(client, iCollected); - return iCollected; + return iCollected; } public Action SpawnCollectable(Handle timer) @@ -367,37 +367,37 @@ public Action SpawnCollectable(Handle timer) if (!GetConVarBool(g_hCVar_CollectablesEnabled) || !(g_bEnabled)) return; - + int target = GetTargetClient(); GetClientAbsOrigin(target, g_fPropOrigin); int iRotating = SpawnRotating(); int iParticle = SpawnParticle(); int iProp = SpawnProp(); int iHitbox = SpawnHitbox(iRotating, iParticle); - int iTrigger = SpawnTrigger(iHitbox); - int iAmbient = SpawnAmbientHohohoho(); + int iTrigger = SpawnTrigger(iHitbox); + int iAmbient = SpawnAmbientHohohoho(); SetVariantString("!activator"); - AcceptEntityInput(iProp, "SetParent", iRotating); + AcceptEntityInput(iProp, "SetParent", iRotating); SetVariantString("!activator"); AcceptEntityInput(iHitbox, "SetParent", iRotating); SetVariantString("!activator"); AcceptEntityInput(iTrigger, "SetParent", iRotating); - + AcceptEntityInput(iTrigger, "Enable"); - + int iEntityLimit = GetConVarInt(g_hCVar_EntityLimit); - + if ((iRotating > iEntityLimit) || (iParticle > iEntityLimit) || (iProp > iEntityLimit) || (iHitbox > iEntityLimit) || (iTrigger > iEntityLimit) || (iAmbient > iEntityLimit)) { AcceptEntityInput(iHitbox, "FireUser2"); CPrintToChatAll("{green}[Unloze XMAS] {white}Present removed due to {red}critical amount of entities{white}!"); - } + } } public int GetTargetClient() -{ +{ int[] iEligibleClients = new int[MaxClients]; - int iClientCount = 0; + int iClientCount = 0; for(int i = 1; i <= MaxClients; i++) { if(IsClientInGame(i) && IsPlayerAlive(i) && (ZR_IsClientHuman(i))) @@ -405,37 +405,37 @@ public int GetTargetClient() iEligibleClients[iClientCount] = i; iClientCount += 1; } - } + } if (iClientCount == 0) - return -1; + return -1; int randomIndex = GetRandomInt(0, iClientCount - 1); return iEligibleClients[randomIndex]; } public void HookCallbackTrigger(const char[] output, int caller, int activator, float delay) -{ +{ if (!ZR_IsClientHuman(activator)) { UnhookSingleEntityOutput(caller, "OnStartTouch", HookCallbackTrigger); AcceptEntityInput(caller, "FireUser1"); CPrintToChatAll("{green}[Unloze XMAS] {white}Zombies {red}destroyed{white} a present!"); - + } } public void HookCallback(const char[] output, int caller, int activator, float delay) -{ - UpdateMYSQL(); +{ + UpdateMYSQL(); } public bool UpdateMYSQL() { char error[255]; - Database db; + Database db; if (SQL_CheckConfig("season")) { db = SQL_Connect("season", true, error, sizeof(error)); - } + } if (db == null) { LogError("Could not connect to database: %s", error); @@ -450,23 +450,23 @@ public bool UpdateMYSQL() char sName[MAX_NAME_LENGTH]; GetClientAuthId(client, AuthId_Steam2, sSID, sizeof(sSID)); GetClientName(client, sName, sizeof(sName)); - + char sQuery[255]; - Format(sQuery, sizeof(sQuery), "SELECT collected FROM season_table WHERE steam_auth = '%s'", sSID); + Format(sQuery, sizeof(sQuery), "SELECT collected FROM season_table WHERE steam_auth = '%s'", sSID); DBResultSet rs; if ((rs = SQL_Query(db, sQuery)) == null) { delete db; delete rs; return false; - + } int iCollected; if (!(rs.RowCount > 0)) { iCollected = 0; Format(sQuery, sizeof(sQuery), "INSERT INTO season_table (steam_auth, name, collected) VALUES ('%s', '%s', '%d')", sSID, sName, iCollected); - SQL_FastQuery(db, sQuery); + SQL_FastQuery(db, sQuery); } else { @@ -483,13 +483,13 @@ public bool UpdateMYSQL() CPrintToChat(client, "{green}[Unloze XMAS] {white}Your Team opened a present! You have collected {green}%d {white}presents so far.", iCollected); if (iCollected == GetConVarInt(g_hCVar_MilestoneInfection)) CPrintToChat(client, "{green}[Unloze XMAS] {white}Congratulations! You have unlocked {red}INFECTION EFFECTS{white}!"); - + if (iCollected == GetConVarInt(g_hCVar_MilestoneGrenade)) CPrintToChat(client, "{green}[Unloze XMAS] {white}Congratulations! You have unlocked {red}GRENADE SKINS{white}!"); if (iCollected == GetConVarInt(g_hCVar_MilestoneSkin)) CPrintToChat(client, "{green}[Unloze XMAS] {white}Congratulations! You have unlocked {red}XMAS SKINS{white}!"); - } + } } delete db; return true; @@ -499,32 +499,32 @@ public void CheckAndAddFlag(int client, int iCollected) { if (iCollected >= GetConVarInt(g_hCVar_MilestoneSkin)) { - AddUserFlags(client, Admin_Custom4); + AddUserFlags(client, Admin_Custom4); } } public int SpawnTrigger(int iHitbox) { - char StrOutput1[128]; + char StrOutput1[128]; Format(StrOutput1, sizeof(StrOutput1), "season_hitbox_%i,FireUser2,,0,1", iHitbox); - - int Entity; + + int Entity; // Spawn dynamic prop entity if ((Entity = CreateEntityByName("trigger_multiple")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity - char StrEntityName[64]; + char StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_multiple_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", StrEntityName); DispatchKeyValue(Entity, "spawnflags", "1"); DispatchKeyValue(Entity, "startdisabled", "1"); - DispatchKeyValueVector(Entity, "origin", g_fPropOrigin); + DispatchKeyValueVector(Entity, "origin", g_fPropOrigin); DispatchKeyValue(Entity, "OnUser1", StrOutput1); DispatchSpawn(Entity); - ActivateEntity(Entity); + ActivateEntity(Entity); SetEntityModel(Entity, "models/zombieden/xmas/giftbox.mdl"); float fMinbounds[3] = {-16.0, -16.0, -1.0}; @@ -541,23 +541,23 @@ public int SpawnTrigger(int iHitbox) public int SpawnRotating() { - int Entity; + int Entity; // Spawn dynamic prop entity if ((Entity = CreateEntityByName("func_rotating")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity - char StrEntityName[64]; + char StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "season_rotating_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", StrEntityName); DispatchKeyValue(Entity, "maxspeed", "20"); DispatchKeyValue(Entity, "spawnflags", "65"); - DispatchKeyValueVector(Entity, "origin", g_fPropOrigin); + DispatchKeyValueVector(Entity, "origin", g_fPropOrigin); DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + SetEntityModel(Entity, "models/zombieden/xmas/giftbox.mdl"); float fMinbounds[3] = {-1.00, -1.00, -1.00}; float fMaxbounds[3] = {1.00, 1.00, 1.00}; @@ -576,7 +576,7 @@ public int SpawnProp() // Spawn dynamic prop entity if ((Entity = CreateEntityByName("prop_dynamic_override")) == INVALID_ENT_REFERENCE) return -1; - + // Setup entity DispatchKeyValue(Entity, "targetname", "season_prop"); DispatchKeyValue(Entity, "model", "models/zombieden/xmas/giftbox.mdl"); @@ -585,15 +585,15 @@ public int SpawnProp() DispatchKeyValue(Entity, "disablereceiveshadows", "1"); DispatchKeyValue(Entity, "DisableBoneFollowers", "1"); DispatchKeyValueVector(Entity, "origin", g_fPropOrigin); - + DispatchSpawn(Entity); ActivateEntity(Entity); - - int iRandomSkin = GetRandomInt(0, 1); + + int iRandomSkin = GetRandomInt(0, 1); if (iRandomSkin == 0) { SetVariantString("0"); - } + } else if (iRandomSkin == 1) { SetVariantString("1"); @@ -608,49 +608,49 @@ public int SpawnParticle() // Spawn dynamic prop entity if ((Entity = CreateEntityByName("info_particle_system")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity - char StrEntityName[64]; + char StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "season_particle_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", StrEntityName); DispatchKeyValue(Entity, "effect_name", "achieved"); DispatchKeyValueVector(Entity, "origin", g_fPropOrigin); DispatchSpawn(Entity); - ActivateEntity(Entity); + ActivateEntity(Entity); return Entity; } public int SpawnHitbox(int iRotatingParent, int iParticleParent) { - char StrOutput1[128]; + char StrOutput1[128]; Format(StrOutput1, sizeof(StrOutput1), "season_rotating_%i,KillHierarchy,,2.5,1", iRotatingParent); - - char StrOutput2[128]; + + char StrOutput2[128]; Format(StrOutput2, sizeof(StrOutput2), "season_particle_%i,Start,,0,1", iParticleParent); - - char StrOutput3[128]; + + char StrOutput3[128]; Format(StrOutput3, sizeof(StrOutput3), "season_rotating_%i,KillHierarchy,,59.0,1", iRotatingParent); - - char StrOutput4[128]; + + char StrOutput4[128]; Format(StrOutput4, sizeof(StrOutput4), "season_sound_hohohoho,Kill,,59.0,1"); - - char StrOutput5[128]; + + char StrOutput5[128]; Format(StrOutput5, sizeof(StrOutput5), "season_rotating_%i,KillHierarchy,,0,1", iRotatingParent); - - char StrOutput6[128]; + + char StrOutput6[128]; Format(StrOutput6, sizeof(StrOutput6), "season_sound_hohohoho,Kill,,0,1"); - + int Entity; // Spawn dynamic prop entity if ((Entity = CreateEntityByName("func_physbox_multiplayer")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity - char StrEntityName[64]; + char StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "season_hitbox_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", StrEntityName); DispatchKeyValue(Entity, "model", "models/zombieden/xmas/giftbox.mdl"); @@ -681,11 +681,11 @@ public int SpawnHitbox(int iRotatingParent, int iParticleParent) public int SpawnAmbientHohohoho() { - int Entity; + int Entity; // Spawn dynamic prop entity if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) return -1; - + // Setup entity DispatchKeyValue(Entity, "targetname", "season_sound_hohohoho"); DispatchKeyValueVector(Entity, "origin", g_fPropOrigin); @@ -695,9 +695,9 @@ public int SpawnAmbientHohohoho() DispatchKeyValue(Entity, "volume", "10"); DispatchKeyValue(Entity, "health", "10"); DispatchKeyValue(Entity, "pitch", "100"); - DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); DispatchSpawn(Entity); - ActivateEntity(Entity); + ActivateEntity(Entity); return Entity; } @@ -707,30 +707,30 @@ public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, boo { float fInfectionOrigin[3]; GetClientAbsOrigin(client, fInfectionOrigin); - + int EntityProp; - EntityProp = CreateEntityByName("prop_dynamic_override"); + EntityProp = CreateEntityByName("prop_dynamic_override"); DispatchKeyValue(EntityProp, "targetname", "season_infection_prop"); - - int iRandomSkin = GetRandomInt(0, 4); + + int iRandomSkin = GetRandomInt(0, 4); if (iRandomSkin == 0) { DispatchKeyValue(EntityProp, "model", "models/models_kit/xmas/xmastree_mini.mdl"); DispatchKeyValue(EntityProp, "modelscale", "0.35"); DispatchKeyValue(EntityProp, "angles", "0 0 0"); - } + } else if (iRandomSkin == 1) { DispatchKeyValue(EntityProp, "model", "models/weapons/w_revenge_xmas_candy.mdl"); DispatchKeyValue(EntityProp, "modelscale", "1.2"); DispatchKeyValue(EntityProp, "angles", "-27 0 0"); - } + } else if (iRandomSkin == 2) { DispatchKeyValue(EntityProp, "model", "models/johny-srka/snowman.mdl"); DispatchKeyValue(EntityProp, "modelscale", "0.45"); DispatchKeyValue(EntityProp, "angles", "0 0 0"); - } + } else if (iRandomSkin == 3) { DispatchKeyValue(EntityProp, "model", "models/weapons/w_santa_hat_thrown.mdl"); @@ -742,17 +742,17 @@ public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, boo { DispatchKeyValue(EntityProp, "model", "models/models_kit/xmas/xmas_teddybear.mdl"); DispatchKeyValue(EntityProp, "modelscale", "0.7"); - } - + } + DispatchKeyValue(EntityProp, "disableshadows", "1"); DispatchKeyValue(EntityProp, "disablereceiveshadows", "1"); DispatchKeyValue(EntityProp, "DisableBoneFollowers", "1"); DispatchKeyValueVector(EntityProp, "origin", fInfectionOrigin); DispatchSpawn(EntityProp); - ActivateEntity(EntityProp); - + ActivateEntity(EntityProp); + int EntityRotating; - EntityRotating = CreateEntityByName("func_rotating"); + EntityRotating = CreateEntityByName("func_rotating"); DispatchKeyValue(EntityRotating, "targetname", "season_infection_rotating"); DispatchKeyValue(EntityRotating, "maxspeed", "13"); DispatchKeyValue(EntityRotating, "spawnflags", "65"); @@ -760,8 +760,8 @@ public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, boo DispatchKeyValue(EntityRotating, "OnUser1", "!self,KillHierarchy,,45,1"); DispatchKeyValue(EntityRotating, "OnUser2", "!self,KillHierarchy,,0,1"); DispatchSpawn(EntityRotating); - ActivateEntity(EntityRotating); - + ActivateEntity(EntityRotating); + SetEntityModel(EntityRotating, "models/models_kit/xmas/xmastree_mini.mdl"); float fMinbounds[3] = {-1.00, -1.00, -1.00}; float fMaxbounds[3] = {1.00, 1.00, 1.00}; @@ -771,17 +771,17 @@ public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, boo int enteffects = GetEntProp(EntityRotating, Prop_Send, "m_fEffects"); enteffects |= 32; SetEntProp(EntityRotating, Prop_Send, "m_fEffects", enteffects); - + SetVariantString("!activator"); AcceptEntityInput(EntityProp, "SetParent", EntityRotating); AcceptEntityInput(EntityRotating, "FireUser1"); - - int iEntityLimit = GetConVarInt(g_hCVar_EntityLimit); + + int iEntityLimit = GetConVarInt(g_hCVar_EntityLimit); if ((EntityRotating > iEntityLimit) || (EntityProp > iEntityLimit)) { AcceptEntityInput(EntityRotating, "FireUser2"); CPrintToChatAll("{green}[Unloze XMAS] {white}Infection Effect removed due to {red}critical amount of entities{white}!"); - } + } } } @@ -794,33 +794,33 @@ public void OnEntityCreated(int entity, const char[] classname) public void ProjectileSpawned(int Entity) { - int iOwner = GetEntPropEnt(Entity, Prop_Data, "m_hOwnerEntity"); + int iOwner = GetEntPropEnt(Entity, Prop_Data, "m_hOwnerEntity"); if(0 < iOwner <= MaxClients && IsClientInGame(iOwner)) { if (CheckMYSQL(iOwner) >= GetConVarInt(g_hCVar_MilestoneGrenade)) - { - int iRandomSkin = GetRandomInt(0, 3); + { + int iRandomSkin = GetRandomInt(0, 3); if (iRandomSkin == 0) { SetEntityModel(Entity, "models/weapons/w_snowball_thrown.mdl"); SetVariantString("modelscale 3.0"); AcceptEntityInput(Entity, "AddOutput"); - } + } else if (iRandomSkin == 1) { SetEntityModel(Entity, "models/zombieden/xmas/giftbox.mdl"); SetVariantString("modelscale 0.6"); AcceptEntityInput(Entity, "AddOutput"); - iRandomSkin = GetRandomInt(0, 1); + iRandomSkin = GetRandomInt(0, 1); if (iRandomSkin == 0) { SetVariantString("0"); - } + } else if (iRandomSkin == 1) { SetVariantString("1"); } - AcceptEntityInput(Entity, "Skin"); + AcceptEntityInput(Entity, "Skin"); } else if (iRandomSkin == 2) { @@ -835,7 +835,7 @@ public void ProjectileSpawned(int Entity) AcceptEntityInput(Entity, "AddOutput"); } } - } + } } int IsValidClient(int client, bool nobots = true) diff --git a/ze_boatescape6_remix_fix2/scripting/ze_boatescape6_remix_fix2.sp b/ze_boatescape6_remix_fix2/scripting/ze_boatescape6_remix_fix2.sp index 6c3223fe..f0ef4e3c 100644 --- a/ze_boatescape6_remix_fix2/scripting/ze_boatescape6_remix_fix2.sp +++ b/ze_boatescape6_remix_fix2/scripting/ze_boatescape6_remix_fix2.sp @@ -2,13 +2,13 @@ #include #include -public Plugin myinfo = +public Plugin myinfo = { - name = "ze_boatescape6_remix_fix2 Secret", - author = "Neon", + name = "ze_boatescape6_remix_fix2 Secret", + author = "Neon", description = "Seagull + 2 different Endings", - version = "2.0", - url = "https://steamcommunity.com/id/n3ontm" + version = "2.0", + url = "https://steamcommunity.com/id/n3ontm" } new float:g_fOrigin_Button5[3]; @@ -27,47 +27,47 @@ public Action VerifyMap() } public void OnPluginStart() -{ +{ VerifyMap(); HookEvent("round_start", OnRoundStart, EventHookMode_Post); - HookEvent("round_end", OnRoundEnd, EventHookMode_Post); + HookEvent("round_end", OnRoundEnd, EventHookMode_Post); } public void OnMapStart() -{ +{ VerifyMap(); - + AddFileToDownloadsTable("models/zombieden/xmode/youmu/laser.dx80.vtx"); AddFileToDownloadsTable("models/zombieden/xmode/youmu/laser.dx90.vtx"); AddFileToDownloadsTable("models/zombieden/xmode/youmu/laser.mdl"); AddFileToDownloadsTable("models/zombieden/xmode/youmu/laser.phy"); AddFileToDownloadsTable("models/zombieden/xmode/youmu/laser.sw.vtx"); AddFileToDownloadsTable("models/zombieden/xmode/youmu/laser.vvd"); - + AddFileToDownloadsTable("materials/zombieden/xmode/youmu/laser/laser1.vmt"); AddFileToDownloadsTable("materials/zombieden/xmode/youmu/laser/laser1.vtf"); AddFileToDownloadsTable("materials/zombieden/xmode/youmu/laser/laser2.vmt"); AddFileToDownloadsTable("materials/zombieden/xmode/youmu/laser/laser2.vtf"); AddFileToDownloadsTable("materials/zombieden/xmode/youmu/laser/white.vmt"); AddFileToDownloadsTable("materials/zombieden/xmode/youmu/laser/white.vtf"); - + AddFileToDownloadsTable("models/3d/bossguard/bossguard.dx80.vtx"); AddFileToDownloadsTable("models/3d/bossguard/bossguard.dx90.vtx"); AddFileToDownloadsTable("models/3d/bossguard/bossguard.mdl"); AddFileToDownloadsTable("models/3d/bossguard/bossguard.phy"); AddFileToDownloadsTable("models/3d/bossguard/bossguard.sw.vtx"); AddFileToDownloadsTable("models/3d/bossguard/bossguard.vvd"); - + AddFileToDownloadsTable("materials/3d/bossguard/diss_00.vmt"); AddFileToDownloadsTable("materials/3d/bossguard/diss_00.vtf"); AddFileToDownloadsTable("materials/3d/bossguard/diss_01.vmt"); AddFileToDownloadsTable("materials/3d/bossguard/diss_01.vtf"); - + AddFileToDownloadsTable("sound/unl1/boatescape/starwars.wav"); AddFileToDownloadsTable("sound/unl1/boatescape/evil_laugh.wav"); AddFileToDownloadsTable("sound/unl1/boatescape/Brain Power V2.mp3"); AddFileToDownloadsTable("sound/unl1/boatescape/Isengard.mp3"); - + PrecacheModel("models/seagull.mdl"); PrecacheModel("models/props_lab/blastdoor001c.mdl"); PrecacheModel("models/props_trainstation/trainstation_clock001.mdl"); @@ -79,7 +79,7 @@ public void OnMapStart() PrecacheModel("models/props/cs_italy/bananna.mdl"); PrecacheModel("models/props/cs_italy/orange.mdl"); PrecacheModel("models/props_junk/watermelon01.mdl"); - + } public void OnRoundEnd(Event hEvent, const char[] sEvent, bool bDontBroadcast) @@ -89,21 +89,21 @@ public void OnRoundEnd(Event hEvent, const char[] sEvent, bool bDontBroadcast) public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) { - + ClearTimer(g_hSparkTimer); SpawnSparkTimer(); SpawnSeagullRelay(); SpawnMathCounter1(); SpawnMathCounter2(); - + SpawnTriggerTeleport(); SpawnTeleportDestination(); - + SpawnSeagull(); SpawnAmbientSeagull(); SpawnSeagullClock(); SpawnSeagullMove(); - + SpawnPlatform1(); SpawnPlatform2(); SpawnPlatform3(); @@ -141,7 +141,7 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) SpawnTeleportFinal(); SpawnTriggerTeleportFinal(); SpawnTeleportDestinationFinal(); - + SpawnRotating(); SpawnRotatingMelon(); SpawnRotatingOrange(); @@ -150,10 +150,10 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) SpawnFilterEnding(); SpawnBadEndingTrigger(); - + SpawnScore1(); SpawnScore2(); - + SpawnBossProp(); SpawnBossParticle(); SpawnBossMove(); @@ -163,33 +163,33 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) SpawnBossHP(); SpawnAmbientBoss1(); SpawnAmbientBoss2(); - + SpawnButton1(); - SpawnParticle1(); + SpawnParticle1(); SpawnFilter1(); SpawnGameText1(); - + SpawnButton2(); - SpawnParticle2(); + SpawnParticle2(); SpawnFilter2(); SpawnGameText2(); - + SpawnButton3(); - SpawnParticle3(); + SpawnParticle3(); SpawnFilter3(); SpawnGameText3(); - + SpawnButton4(); - SpawnParticle4(); + SpawnParticle4(); SpawnFilter4(); SpawnGameText4(); - + int random = GetRandomInt(1, 5); - + if (random == 1) { g_fOrigin_Button5 = {993.05, 3072.5, 208.55}; - } + } else if (random == 2) { g_fOrigin_Button5 = {458.25, 3851.08, 227.18}; @@ -208,14 +208,14 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) } SpawnButton5(); - SpawnParticle5(); + SpawnParticle5(); SpawnFilter5(); SpawnGameText5(); - + SpawnOrange(); SpawnBanana(); - SpawnMelon(); - + SpawnMelon(); + SpawnFilterZM(); SpawnNameResetZM1(); SpawnNameResetZM2(); @@ -231,16 +231,16 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) int iBanana = SpawnItemRotatingBanana(); int iOrange = SpawnItemRotatingOrange(); int iMelon = SpawnItemRotatingMelon(); - int iMelonBeam = SpawnItemRotatingMelonBeam(); - + int iMelonBeam = SpawnItemRotatingMelonBeam(); + SetVariantString("!activator"); - AcceptEntityInput(iRotating, "SetParent", iElite); + AcceptEntityInput(iRotating, "SetParent", iElite); SetVariantString("!activator"); - AcceptEntityInput(iBanana, "SetParent", iRotating); + AcceptEntityInput(iBanana, "SetParent", iRotating); SetVariantString("!activator"); - AcceptEntityInput(iOrange, "SetParent", iRotating); + AcceptEntityInput(iOrange, "SetParent", iRotating); SetVariantString("!activator"); - AcceptEntityInput(iMelon, "SetParent", iRotating); + AcceptEntityInput(iMelon, "SetParent", iRotating); SetVariantString("!activator"); AcceptEntityInput(iMelonBeam, "SetParent", iRotating); } @@ -253,7 +253,7 @@ public Action SpawnScore1() // Spawn dynamic prop entity if ((Entity = CreateEntityByName("game_score")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "game_score_%i", Entity); @@ -261,9 +261,9 @@ public Action SpawnScore1() DispatchKeyValue(Entity, "targetname", "secret_score_good"); DispatchKeyValue(Entity, "points", "250"); DispatchKeyValue(Entity, "spawnflags", "0") - + DispatchSpawn(Entity); - return Entity; + return Entity; } public Action SpawnScore2() @@ -272,7 +272,7 @@ public Action SpawnScore2() // Spawn dynamic prop entity if ((Entity = CreateEntityByName("game_score")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "game_score_%i", Entity); @@ -280,19 +280,19 @@ public Action SpawnScore2() DispatchKeyValue(Entity, "targetname", "secret_score_bad"); DispatchKeyValue(Entity, "points", "100"); DispatchKeyValue(Entity, "spawnflags", "0") - + DispatchSpawn(Entity); - return Entity; + return Entity; } public Action SpawnBadEndingTrigger() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("trigger_once")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_once_%i", Entity); @@ -305,7 +305,7 @@ public Action SpawnBadEndingTrigger() DispatchKeyValue(Entity, "model", "*1"); DispatchKeyValue(Entity, "OnStartTouch", "point_servercommand,Command,say The God of the Fruits is not pleased with your sacrifice!,0,1"); DispatchKeyValue(Entity, "OnStartTouch", "point_servercommand,Command,say He is sending is one of his loyal henchmen to kill you!,1,1"); - + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_particle,SetParent,secret_boss_movelinear,0,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_physbox,SetParent,secret_boss_movelinear,0,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,SetParent,secret_boss_movelinear,0,1"); @@ -317,23 +317,23 @@ public Action SpawnBadEndingTrigger() DispatchKeyValue(Entity, "OnStartTouch", "secret_final_button*,Kill,,0,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_explosion_1,Explode,,1,1"); DispatchKeyValue(Entity, "OnStartTouch", "explosion_sound_1,PlaySound,,1,1"); - DispatchKeyValue(Entity, "OnStartTouch", "secret_banana_final,Kill,,1,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_banana_final,Kill,,1,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_explosion_2,Explode,,2,1"); DispatchKeyValue(Entity, "OnStartTouch", "explosion_sound_2,PlaySound,,2,1"); - DispatchKeyValue(Entity, "OnStartTouch", "secret_orange_final,Kill,,2,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_orange_final,Kill,,2,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_explosion_3,Explode,,3,1"); DispatchKeyValue(Entity, "OnStartTouch", "explosion_sound_3,PlaySound,,3,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_melon_final,Kill,,3,1"); - + DispatchKeyValue(Entity, "OnStartTouch", "explosion_sound_3,PlaySound,,4,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_explosion*,Explode,,4,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_pillar*,Kill,,4.3,1"); - - DispatchKeyValue(Entity, "OnTrigger", "secret_seagull,Kill,,5,-1"); - + + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull,Kill,,5,-1"); + DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } @@ -353,41 +353,41 @@ public Action SpawnBossMove() DispatchKeyValue(Entity, "speed", "100"); DispatchKeyValue(Entity, "movedistance", "564"); DispatchKeyValue(Entity, "spawnflags", "8") - DispatchKeyValue(Entity, "OnFullyOpen", "secret_boss_prop,SetAnimation,entrance2,0,1"); + DispatchKeyValue(Entity, "OnFullyOpen", "secret_boss_prop,SetAnimation,entrance2,0,1"); DispatchKeyValue(Entity, "OnFullyOpen", "secret_boss_particle,Stop,,0,-1"); - DispatchKeyValue(Entity, "OnFullyOpen", "secret_boss_particle,Kill,,0,-1"); + DispatchKeyValue(Entity, "OnFullyOpen", "secret_boss_particle,Kill,,0,-1"); DispatchKeyValue(Entity, "OnFullyOpen", "secret_boss_laser_timer,Enable,,0,1"); DispatchKeyValue(Entity, "OnFullyOpen", "secret_boss_hp,SetValue,150,0,1"); - + DispatchSpawn(Entity); - return Entity; + return Entity; } public Action SpawnBossParticle() { - + new Entity; // Spawn dynamic prop entity if ((Entity = CreateEntityByName("info_particle_system")) == INVALID_ENT_REFERENCE) return -1; - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_boss_particle"); DispatchKeyValue(Entity, "effect_name", "fire_large_01"); - DispatchKeyValue(Entity, "origin", "512 9600 1350"); - + DispatchKeyValue(Entity, "origin", "512 9600 1350"); + DispatchSpawn(Entity); ActivateEntity(Entity); - + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("info_particle_system")) == INVALID_ENT_REFERENCE) return -1; - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_boss_particle"); DispatchKeyValue(Entity, "effect_name", "fire_large_01"); - DispatchKeyValue(Entity, "origin", "512 9600 1500"); - + DispatchKeyValue(Entity, "origin", "512 9600 1500"); + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; @@ -415,10 +415,10 @@ public Action SpawnBossProp() DispatchKeyValue(Entity, "rendermode", "1"); DispatchKeyValue(Entity, "DefaultAnim", "idle"); DispatchKeyValue(Entity, "StartDisabled", "0"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnBossPhysbox() @@ -442,12 +442,12 @@ public Action SpawnBossPhysbox() DispatchKeyValue(Entity, "model", "*13"); DispatchKeyValue(Entity, "rendermode", "10"); DispatchKeyValue(Entity, "OnHealthChanged", "secret_boss_hp,Subtract,1,0,-1"); - + DispatchSpawn(Entity); ActivateEntity(Entity); - + return Entity; - + } public Action SpawnBossHP() @@ -475,10 +475,10 @@ public Action SpawnBossHP() DispatchKeyValue(Entity, "OnHitMin", "secret_boss_laser_movelinear,KillHierarchy,,0,1"); DispatchKeyValue(Entity, "OnHitMin", "point_servercommand,Command,say You killed the Henchman!,0,-1"); DispatchKeyValue(Entity, "OnHitMin", "point_servercommand,Command,say Maybe try to not to anger the God of the Fruits next time...,1,-1"); - + DispatchSpawn(Entity); ActivateEntity(Entity); - return Entity; + return Entity; } public Action SpawnLaserTimer() @@ -500,26 +500,26 @@ public Action SpawnLaserTimer() DispatchKeyValue(Entity, "StartDisabled", "1"); DispatchKeyValue(Entity, "OnTimer", "secret_boss_laser_sound,PlaySound,,0,-1"); DispatchKeyValue(Entity, "OnTimer", "secret_boss_prop,SetAnimation,attack1,0,-1"); - + DispatchSpawn(Entity); - ActivateEntity(Entity); + ActivateEntity(Entity); HookSingleEntityOutput(Entity, "OnTimer", BadEndingCallback, false); - + return Entity; - + } public Action SpawnAmbientBoss1() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_boss_entrance_sound"); DispatchKeyValue(Entity, "spawnflags", "49"); @@ -528,24 +528,24 @@ public Action SpawnAmbientBoss1() DispatchKeyValue(Entity, "volume", "10"); DispatchKeyValue(Entity, "health", "10"); DispatchKeyValue(Entity, "pitch", "100"); - DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); DispatchSpawn(Entity); ActivateEntity(Entity); - + return Entity; } public Action SpawnAmbientBoss2() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_boss_loss_sound"); DispatchKeyValue(Entity, "spawnflags", "49"); @@ -554,24 +554,24 @@ public Action SpawnAmbientBoss2() DispatchKeyValue(Entity, "volume", "10"); DispatchKeyValue(Entity, "health", "10"); DispatchKeyValue(Entity, "pitch", "100"); - DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); DispatchSpawn(Entity); ActivateEntity(Entity); - + return Entity; } public Action SpawnLaserSound() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_boss_laser_sound"); DispatchKeyValue(Entity, "spawnflags", "49"); @@ -580,10 +580,10 @@ public Action SpawnLaserSound() DispatchKeyValue(Entity, "volume", "10"); DispatchKeyValue(Entity, "health", "10"); DispatchKeyValue(Entity, "pitch", "100"); - DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); DispatchSpawn(Entity); ActivateEntity(Entity); - + return Entity; } @@ -593,7 +593,7 @@ public Action SpawnBossLaserMove() // Spawn dynamic prop entity if ((Entity = CreateEntityByName("func_movelinear")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_movelinear_%i", Entity); @@ -605,22 +605,22 @@ public Action SpawnBossLaserMove() DispatchKeyValue(Entity, "movedistance", "1000"); DispatchKeyValue(Entity, "spawnflags", "8") DispatchKeyValue(Entity, "OnFullyOpen", "!self,KillHierarchy,,0,1"); - + DispatchSpawn(Entity); - return Entity; + return Entity; } public Action SpawnBossLaserProp(int random) { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) - return -1; - + return -1; + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_boss_laser_prop"); DispatchKeyValue(Entity, "angles", "0 -90 0"); @@ -632,48 +632,48 @@ public Action SpawnBossLaserProp(int random) DispatchKeyValue(Entity, "modelscale", "1.0"); DispatchKeyValue(Entity, "rendercolor", "0 255 0"); DispatchKeyValue(Entity, "rendermode", "0"); - + if (random == 1) { - DispatchKeyValue(Entity, "origin", "512 9600 900"); + DispatchKeyValue(Entity, "origin", "512 9600 900"); } else if (random == 2) { - DispatchKeyValue(Entity, "origin", "512 9600 943"); + DispatchKeyValue(Entity, "origin", "512 9600 943"); } else if (random == 3) { - DispatchKeyValue(Entity, "origin", "512 9600 928"); - } + DispatchKeyValue(Entity, "origin", "512 9600 928"); + } + + DispatchSpawn(Entity); - DispatchSpawn(Entity); - return Entity; } public Action SpawnTriggerHurt(int random) { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("trigger_hurt")) == INVALID_ENT_REFERENCE) - return -1; - + return -1; + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_hurt_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_boss_laser_hurt"); DispatchKeyValue(Entity, "spawnflags", "1"); DispatchKeyValue(Entity, "StartDisabled", "0"); DispatchKeyValue(Entity, "nodmgforce", "0"); - DispatchKeyValue(Entity, "damage", "999999"); - DispatchKeyValue(Entity, "damagecap", "20"); + DispatchKeyValue(Entity, "damage", "999999"); + DispatchKeyValue(Entity, "damagecap", "20"); DispatchKeyValue(Entity, "damagemodel", "0"); DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_laser_timer,Kill,,0,-1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_hp,Kill,,0,-1"); DispatchKeyValue(Entity, "OnStartTouch", "point_servercommand,Command,say Maybe try to not to anger the God of the Fruits next time...,1,1"); - DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_loss_sound,PlaySound,,1,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_loss_sound,PlaySound,,1,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 000 0:1.00:-1,0,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 165 0:2.00:-1,0,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 255 0:3.00:-1,0,1"); @@ -683,61 +683,61 @@ public Action SpawnTriggerHurt(int random) DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,AddOutput,OnUser1 !self:AddOutput:rendercolor 128 0 128:7.00:-1,0,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,AddOutput,OnUser1 !self:FireUser1::7.00:-1,0,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,FireUser1,,1,1"); - + if (random == 1) { - DispatchKeyValue(Entity, "origin", "512 9600 898"); + DispatchKeyValue(Entity, "origin", "512 9600 898"); } else if (random == 2) { - DispatchKeyValue(Entity, "origin", "512 9600 958"); + DispatchKeyValue(Entity, "origin", "512 9600 958"); } else if (random == 3) { - DispatchKeyValue(Entity, "origin", "512 9600 928"); - } - + DispatchKeyValue(Entity, "origin", "512 9600 928"); + } + DispatchSpawn(Entity); ActivateEntity(Entity); - + SetEntityModel(Entity, "models/zombieden/xmode/youmu/laser.mdl"); - + new Float:minbounds[3] = {-100.25, -100.25, -1.25}; new Float:maxbounds[3] = {100.25, -10.00, 1.25}; SetEntPropVector(Entity, Prop_Send, "m_vecMins", minbounds); SetEntPropVector(Entity, Prop_Send, "m_vecMaxs", maxbounds); - + SetEntProp(Entity, Prop_Send, "m_nSolidType", 2); - + new enteffects = GetEntProp(Entity, Prop_Send, "m_fEffects"); enteffects |= 32; - SetEntProp(Entity, Prop_Send, "m_fEffects", enteffects); - + SetEntProp(Entity, Prop_Send, "m_fEffects", enteffects); + return Entity; } public BadEndingCallback(const char[] output, int caller, int activator, float delay) { - int random = GetRandomInt(1, 3); + int random = GetRandomInt(1, 3); int move = SpawnBossLaserMove(); int prop = SpawnBossLaserProp(random); int hurt = SpawnTriggerHurt(random); SetVariantString("!activator"); AcceptEntityInput(prop, "SetParent", move); SetVariantString("!activator"); - AcceptEntityInput(hurt, "SetParent", move); + AcceptEntityInput(hurt, "SetParent", move); AcceptEntityInput(move, "Open"); } public GoodEndingCallback(const char[] output, int caller, int activator, float delay) { g_hSparkTimer = CreateTimer(0.1, Sparks, INVALID_HANDLE, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE); - + int autism1 = SpawnAmbientAutism1(); int autism2 = SpawnAmbientAutism2(); - + int random = GetRandomInt(1, 2); - + if (random == 1) { AcceptEntityInput(autism1, "PlaySound"); @@ -745,36 +745,36 @@ public GoodEndingCallback(const char[] output, int caller, int activator, float else if (random == 2) { AcceptEntityInput(autism2, "PlaySound"); - } + } } public Action Sparks(Handle timer) -{ - new float:sparksOrigin[3]; +{ + new float:sparksOrigin[3]; sparksOrigin[0] = GetRandomFloat(-1200.0, 2400.0); sparksOrigin[1] = GetRandomFloat(11000.0, 13000.0); sparksOrigin[2] = GetRandomFloat(270.0, 800.0); - + new Entity; // Spawn dynamic prop entity if ((Entity = CreateEntityByName("info_particle_system")) == INVALID_ENT_REFERENCE) - return -1; + return -1; // Setup entity DispatchKeyValue(Entity, "targetname", "sparks"); DispatchKeyValue(Entity, "effect_name", "achieved"); DispatchKeyValueVector(Entity, "origin", sparksOrigin); DispatchKeyValue(Entity, "OnUser1", "!self,Kill,,3,-1"); - + DispatchSpawn(Entity); - ActivateEntity(Entity); + ActivateEntity(Entity); AcceptEntityInput(Entity, "start"); AcceptEntityInput(Entity, "FireUser1"); - + if (Entity > 1800) ClearTimer(g_hSparkTimer); - - return Plugin_Continue; + + return Plugin_Continue; } stock ClearTimer(&Handle:timer) @@ -783,7 +783,7 @@ stock ClearTimer(&Handle:timer) { CloseHandle(timer); timer = INVALID_HANDLE; - } + } } public Action SpawnSeagullRelay() @@ -799,9 +799,9 @@ public Action SpawnSeagullRelay() DispatchKeyValue(Entity, "targetname", "secret_logic_relay"); //DispatchKeyValue(Entity, "spawnflags", "1"); DispatchKeyValue(Entity, "OnTrigger", "secret_button*,Kill,,0,-1"); - DispatchKeyValue(Entity, "OnTrigger", "secret_seagull,Enable,,0,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull,Enable,,0,-1"); DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_clock,Enable,,0,-1"); - DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_clock,SetParent,secret_seagull_movelinear,0.1,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_clock,SetParent,secret_seagull_movelinear,0.1,-1"); DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_door*,Enable,,0,-1"); DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_door*,SetParent,secret_seagull_movelinear,0.1,-1"); DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_box,Enable,,0,-1"); @@ -810,7 +810,7 @@ public Action SpawnSeagullRelay() DispatchKeyValue(Entity, "OnTrigger", "secret_winner,AddOutput,origin 2200 12865 927,0,-1"); DispatchKeyValue(Entity, "OnTrigger", "secret_winner,AddOutput,basevelocity 0 0 -200,0.1,-1"); DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_movelinear,Open,,3,-1"); - DispatchKeyValue(Entity, "OnTrigger", "seagull_sound,PlaySound,,3,-1"); + DispatchKeyValue(Entity, "OnTrigger", "seagull_sound,PlaySound,,3,-1"); DispatchKeyValue(Entity, "OnTrigger", "secret_seagull,SetAnimation,Land,45,-1"); DispatchKeyValue(Entity, "OnTrigger", "secret_seagull,SetAnimation,Idle01,46,-1"); DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_movelinear,SetSpeed,0,46,-1"); @@ -823,11 +823,11 @@ public Action SpawnSeagullRelay() DispatchKeyValue(Entity, "OnUser2", "secret_pillar_light_2,Enable,,0,1"); DispatchKeyValue(Entity, "OnUser2", "secret_orange_final,Enable,,0,1"); DispatchKeyValue(Entity, "OnUser3", "secret_pillar_light_3,Enable,,0,1"); - DispatchKeyValue(Entity, "OnUser3", "secret_melon_final,Enable,,0,1"); + DispatchKeyValue(Entity, "OnUser3", "secret_melon_final,Enable,,0,1"); DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnMathCounter1() @@ -845,11 +845,11 @@ public Action SpawnMathCounter1() DispatchKeyValue(Entity, "min", "0"); DispatchKeyValue(Entity, "max", "3"); DispatchKeyValue(Entity, "OutValue", "point_servercommand,Command,say The God of the Fruits acknowledges your sacrifice...,0,-1"); - DispatchKeyValue(Entity, "OnHitMax", "secret_final_button*,Unlock,,0,1"); - DispatchKeyValue(Entity, "OnHitMax", "secret_bad_ending_trigger,Kill,,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_final_button*,Unlock,,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_bad_ending_trigger,Kill,,0,1"); DispatchSpawn(Entity); ActivateEntity(Entity); - return Entity; + return Entity; } public Action SpawnMathCounter2() @@ -867,15 +867,15 @@ public Action SpawnMathCounter2() DispatchKeyValue(Entity, "min", "0"); DispatchKeyValue(Entity, "max", "3"); DispatchKeyValue(Entity, "StartDisabled", "0"); - + DispatchKeyValue(Entity, "OnHitMax", "point_servercommand,Command,say The God of the Fruits is satisfied with your Sacrifice!,0,1"); DispatchKeyValue(Entity, "OnHitMax", "point_servercommand,Command,say He rewards you with some autism!,1,1"); - - + + DispatchKeyValue(Entity, "OnHitMax", "secret_melon_rotating,Enable,,2,1") DispatchKeyValue(Entity, "OnHitMax", "secret_orange_rotating,Enable,,2,1") DispatchKeyValue(Entity, "OnHitMax", "secret_banana_rotating,Enable,,2,1") - DispatchKeyValue(Entity, "OnHitMax", "secret_melon_rotating_beam,Enable,,2,1") + DispatchKeyValue(Entity, "OnHitMax", "secret_melon_rotating_beam,Enable,,2,1") DispatchKeyValue(Entity, "OnHitMax", "secret_melon_rotating,SetParent,secret_rotating,2,1") DispatchKeyValue(Entity, "OnHitMax", "secret_orange_rotating,SetParent,secret_rotating,2,1") DispatchKeyValue(Entity, "OnHitMax", "secret_banana_rotating,SetParent,secret_rotating,2,1"); @@ -887,15 +887,15 @@ public Action SpawnMathCounter2() DispatchKeyValue(Entity, "OnHitMax", "secret_beam_3,Kill,,2,1"); DispatchKeyValue(Entity, "OnHitMax", "secret_orange_final,Kill,,2,1"); DispatchKeyValue(Entity, "OnHitMax", "secret_banana_final,Kill,,2,1"); - DispatchKeyValue(Entity, "OnHitMax", "secret_melon_final,Kill,,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_melon_final,Kill,,2,1"); DispatchKeyValue(Entity, "OnHitMax", "secret_rotating,Open,,2,1"); DispatchKeyValue(Entity, "OnHitMax", "secret_teleport_prop,Enable,,2,1"); DispatchKeyValue(Entity, "OnHitMax", "secret_teleport_final,AddOutput,OnStartTouch secret_score_good:ApplyScore::0:-1,0,1"); - DispatchKeyValue(Entity, "OnHitMax", "secret_teleport_final,Enable,,2,1"); - + DispatchKeyValue(Entity, "OnHitMax", "secret_teleport_final,Enable,,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_seagull,SetAnimation,TakeOff,2,1"); DispatchKeyValue(Entity, "OnHitMax", "secret_seagull_movelinear,SetSpeed,150.0,2.1,1"); - + DispatchKeyValue(Entity, "OnHitMax", "secret_beam_*,TurnOn,,5,1"); DispatchKeyValue(Entity, "OnHitMax", "secret_beam*,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 000 0:1.00:-1,0,1"); DispatchKeyValue(Entity, "OnHitMax", "secret_beam*,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 165 0:2.00:-1,0,1"); @@ -916,7 +916,7 @@ public Action SpawnMathCounter2() DispatchKeyValue(Entity, "OnHitMax", "chinook,AddOutput,OnUser1 !self:AddOutput:rendercolor 128 0 128:7.00:-1,0,1"); DispatchKeyValue(Entity, "OnHitMax", "chinook,AddOutput,OnUser1 !self:FireUser1::7.00:-1,0,1"); DispatchKeyValue(Entity, "OnHitMax", "chinook,FireUser1,,5,1"); - + DispatchKeyValue(Entity, "OnHitMax", "boat_3,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 000 0:1.00:-1,0,1"); DispatchKeyValue(Entity, "OnHitMax", "boat_3,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 165 0:2.00:-1,0,1"); DispatchKeyValue(Entity, "OnHitMax", "boat_3,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 255 0:3.00:-1,0,1"); @@ -926,7 +926,7 @@ public Action SpawnMathCounter2() DispatchKeyValue(Entity, "OnHitMax", "boat_3,AddOutput,OnUser1 !self:AddOutput:rendercolor 128 0 128:7.00:-1,0,1"); DispatchKeyValue(Entity, "OnHitMax", "boat_3,AddOutput,OnUser1 !self:FireUser1::7.00:-1,0,1"); DispatchKeyValue(Entity, "OnHitMax", "boat_3,FireUser1,,5,1"); - + DispatchKeyValue(Entity, "OnHitMax", "boat_4,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 000 0:1.00:-1,0,1"); DispatchKeyValue(Entity, "OnHitMax", "boat_4,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 165 0:2.00:-1,0,1"); DispatchKeyValue(Entity, "OnHitMax", "boat_4,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 255 0:3.00:-1,0,1"); @@ -936,26 +936,26 @@ public Action SpawnMathCounter2() DispatchKeyValue(Entity, "OnHitMax", "boat_4,AddOutput,OnUser1 !self:AddOutput:rendercolor 128 0 128:7.00:-1,0,1"); DispatchKeyValue(Entity, "OnHitMax", "boat_4,AddOutput,OnUser1 !self:FireUser1::7.00:-1,0,1"); DispatchKeyValue(Entity, "OnHitMax", "boat_4,FireUser1,,5,1"); - + DispatchSpawn(Entity); ActivateEntity(Entity); - + HookSingleEntityOutput(Entity, "OnHitMax", GoodEndingCallback, true); - - return Entity; + + return Entity; } public Action SpawnAmbientAutism1() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_autism_sound_1"); DispatchKeyValue(Entity, "spawnflags", "49"); @@ -964,24 +964,24 @@ public Action SpawnAmbientAutism1() DispatchKeyValue(Entity, "volume", "10"); DispatchKeyValue(Entity, "health", "10"); DispatchKeyValue(Entity, "pitch", "100"); - DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); DispatchSpawn(Entity); ActivateEntity(Entity); - + return Entity; } public Action SpawnAmbientAutism2() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_autism_sound_2"); DispatchKeyValue(Entity, "spawnflags", "49"); @@ -990,10 +990,10 @@ public Action SpawnAmbientAutism2() DispatchKeyValue(Entity, "volume", "10"); DispatchKeyValue(Entity, "health", "10"); DispatchKeyValue(Entity, "pitch", "100"); - DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); DispatchSpawn(Entity); ActivateEntity(Entity); - + return Entity; } @@ -1009,37 +1009,37 @@ public Action SpawnSparkTimer() // Setup entity DispatchKeyValue(Entity, "targetname", "secret_button_timer"); DispatchKeyValue(Entity, "RefireTime", "3"); - DispatchKeyValue(Entity, "OnTimer", "secret_button_sparks_*,SparkOnce,,0,-1"); - + DispatchKeyValue(Entity, "OnTimer", "secret_button_sparks_*,SparkOnce,,0,-1"); + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnButton1() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); new float:origin[3] = {-1367.45, -13184.5, 595.76}; - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_button_1"); DispatchKeyValue(Entity, "spawnflags", "1537");//1025 DispatchKeyValue(Entity, "model", "*65"); DispatchKeyValueVector(Entity, "origin", origin); - DispatchKeyValue(Entity, "wait", "0.01"); - DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_1,TestActivator,,0,-1"); + DispatchKeyValue(Entity, "wait", "0.01"); + DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_1,TestActivator,,0,-1"); DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } @@ -1061,7 +1061,7 @@ public Action SpawnFilter1() DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnParticle1() @@ -1078,11 +1078,11 @@ public Action SpawnParticle1() new float:origin[3] = {-1367.45, -13184.5, 595.76}; DispatchKeyValueVector(Entity, "origin", origin); DispatchKeyValue(Entity, "spawnflags", "128"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnGameText1() @@ -1105,36 +1105,36 @@ public Action SpawnGameText1() DispatchKeyValue(Entity, "x", "-1"); DispatchKeyValue(Entity, "y", "0.6"); DispatchKeyValue(Entity, "message", "Secret: 1 out of 5"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnButton2() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); new float:origin[3] = {2164.52, -9216.5, 461.22}; - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_button_2"); DispatchKeyValue(Entity, "spawnflags", "1537");//1025 DispatchKeyValue(Entity, "model", "*65"); DispatchKeyValueVector(Entity, "origin", origin); - DispatchKeyValue(Entity, "wait", "0.01"); - DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_2,TestActivator,,0,-1"); + DispatchKeyValue(Entity, "wait", "0.01"); + DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_2,TestActivator,,0,-1"); DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } @@ -1153,11 +1153,11 @@ public Action SpawnFilter2() DispatchKeyValue(Entity, "filtername", "pressed_1"); DispatchKeyValue(Entity, "OnPass", "secret_button_game_text_2,Display,,0,-1"); DispatchKeyValue(Entity, "OnPass", "!activator,AddOutput,targetname pressed_2,0,-1"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnParticle2() @@ -1174,11 +1174,11 @@ public Action SpawnParticle2() new float:origin[3] = {2164.52, -9216.5, 461.22}; DispatchKeyValueVector(Entity, "origin", origin); DispatchKeyValue(Entity, "spawnflags", "128"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnGameText2() @@ -1201,36 +1201,36 @@ public Action SpawnGameText2() DispatchKeyValue(Entity, "x", "-1"); DispatchKeyValue(Entity, "y", "0.6"); DispatchKeyValue(Entity, "message", "Secret: 2 out of 5"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnButton3() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); new float:origin[3] = {550.45, 1023.5, 96.29}; - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_button_3"); DispatchKeyValue(Entity, "spawnflags", "1537");//1025 DispatchKeyValue(Entity, "model", "*65"); DispatchKeyValueVector(Entity, "origin", origin); - DispatchKeyValue(Entity, "wait", "0.01"); - DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_3,TestActivator,,0,-1"); + DispatchKeyValue(Entity, "wait", "0.01"); + DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_3,TestActivator,,0,-1"); DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } @@ -1249,11 +1249,11 @@ public Action SpawnFilter3() DispatchKeyValue(Entity, "filtername", "pressed_2"); DispatchKeyValue(Entity, "OnPass", "secret_button_game_text_3,Display,,0,-1"); DispatchKeyValue(Entity, "OnPass", "!activator,AddOutput,targetname pressed_3,0,-1"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnParticle3() @@ -1270,11 +1270,11 @@ public Action SpawnParticle3() new float:origin[3] = {550.45, 1023.5, 96.29}; DispatchKeyValueVector(Entity, "origin", origin); DispatchKeyValue(Entity, "spawnflags", "128"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnGameText3() @@ -1297,36 +1297,36 @@ public Action SpawnGameText3() DispatchKeyValue(Entity, "x", "-1"); DispatchKeyValue(Entity, "y", "0.6"); DispatchKeyValue(Entity, "message", "Secret: 3 out of 5"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnButton4() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); new float:origin[3] = {505.46, 1152.5, 473.15}; - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_button_4"); DispatchKeyValue(Entity, "spawnflags", "1537");//1025 DispatchKeyValue(Entity, "model", "*65"); DispatchKeyValueVector(Entity, "origin", origin); - DispatchKeyValue(Entity, "wait", "0.01"); - DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_4,TestActivator,,0,-1"); + DispatchKeyValue(Entity, "wait", "0.01"); + DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_4,TestActivator,,0,-1"); DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } @@ -1345,11 +1345,11 @@ public Action SpawnFilter4() DispatchKeyValue(Entity, "filtername", "pressed_3"); DispatchKeyValue(Entity, "OnPass", "secret_button_game_text_4,Display,,0,-1"); DispatchKeyValue(Entity, "OnPass", "!activator,AddOutput,targetname pressed_4,0,-1"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnParticle4() @@ -1366,11 +1366,11 @@ public Action SpawnParticle4() new float:origin[3] = {505.46, 1152.5, 473.15}; DispatchKeyValueVector(Entity, "origin", origin); DispatchKeyValue(Entity, "spawnflags", "128"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnGameText4() @@ -1393,21 +1393,21 @@ public Action SpawnGameText4() DispatchKeyValue(Entity, "x", "-1"); DispatchKeyValue(Entity, "y", "0.6"); DispatchKeyValue(Entity, "message", "Secret: 4 out of 5 \n \nHint: Last One is random"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnButton5() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); @@ -1416,11 +1416,11 @@ public Action SpawnButton5() DispatchKeyValue(Entity, "spawnflags", "1537");//1025 DispatchKeyValue(Entity, "model", "*65"); DispatchKeyValueVector(Entity, "origin", g_fOrigin_Button5); - DispatchKeyValue(Entity, "wait", "0.01"); - DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_5,TestActivator,,0,-1"); + DispatchKeyValue(Entity, "wait", "0.01"); + DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_5,TestActivator,,0,-1"); DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } @@ -1440,11 +1440,11 @@ public Action SpawnFilter5() DispatchKeyValue(Entity, "OnPass", "secret_button_game_text_5,Display,,0,-1"); DispatchKeyValue(Entity, "OnPass", "!activator,AddOutput,targetname secret_winner,0,-1"); DispatchKeyValue(Entity, "OnPass", "secret_logic_relay,Trigger,,0,-1"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnParticle5() @@ -1460,11 +1460,11 @@ public Action SpawnParticle5() DispatchKeyValue(Entity, "targetname", "secret_button_sparks_5"); DispatchKeyValueVector(Entity, "origin", g_fOrigin_Button5); DispatchKeyValue(Entity, "spawnflags", "128"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnGameText5() @@ -1487,55 +1487,55 @@ public Action SpawnGameText5() DispatchKeyValue(Entity, "x", "-1"); DispatchKeyValue(Entity, "y", "0.6"); DispatchKeyValue(Entity, "message", "Secret: 5 out of 5 \n \n........."); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnTriggerTeleport() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("trigger_teleport")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_teleport_%i", Entity); // Setup entity DispatchKeyValue(Entity, "targetname", "secret_teleport"); - DispatchKeyValue(Entity, "model", "*29"); - DispatchKeyValue(Entity, "origin", "2200 12865 927"); //2205 2672 -13 + DispatchKeyValue(Entity, "model", "*29"); + DispatchKeyValue(Entity, "origin", "2200 12865 927"); //2205 2672 -13 DispatchKeyValue(Entity, "spawnflags", "1"); DispatchKeyValue(Entity, "target", "secret_teleport_destination"); - DispatchKeyValue(Entity, "OnStartTouch", "!self,Kill,,5,-1"); + DispatchKeyValue(Entity, "OnStartTouch", "!self,Kill,,5,-1"); DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } public Action SpawnTeleportDestination() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("info_teleport_destination")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "info_teleport_destination_%i", Entity); // Setup entity DispatchKeyValue(Entity, "targetname", "secret_teleport_destination"); DispatchKeyValue(Entity, "angles", "0 90 0") - DispatchKeyValue(Entity, "origin", "512 2350 930"); + DispatchKeyValue(Entity, "origin", "512 2350 930"); DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } @@ -1559,23 +1559,23 @@ public Action SpawnSeagull() DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "DefaultAnim", "SOAR"); DispatchKeyValue(Entity, "StartDisabled", "1"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnAmbientSeagull() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", "seagull_sound"); DispatchKeyValue(Entity, "spawnflags", "49"); @@ -1584,10 +1584,10 @@ public Action SpawnAmbientSeagull() DispatchKeyValue(Entity, "health", "10"); DispatchKeyValue(Entity, "preset", "0"); DispatchKeyValue(Entity, "pitch", "100"); - DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); DispatchSpawn(Entity); ActivateEntity(Entity); - + return Entity; } @@ -1612,10 +1612,10 @@ public Action SpawnSeagullClock() DispatchKeyValue(Entity, "solid", "6"); DispatchKeyValue(Entity, "rendermode", "10"); DispatchKeyValue(Entity, "StartDisabled", "1"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnSeagullMove() @@ -1634,10 +1634,10 @@ public Action SpawnSeagullMove() DispatchKeyValue(Entity, "speed", "150"); DispatchKeyValue(Entity, "movedistance", "20000"); DispatchKeyValue(Entity, "spawnflags", "8"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnFilterEnding() @@ -1656,7 +1656,7 @@ public Action SpawnFilterEnding() DispatchSpawn(Entity); ActivateEntity(Entity); - return Entity; + return Entity; } public Action SpawnPlatform1() @@ -1678,12 +1678,12 @@ public Action SpawnPlatform1() DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "solid", "6"); DispatchKeyValue(Entity, "rendermode", "10"); - DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchKeyValue(Entity, "StartDisabled", "0"); DispatchSpawn(Entity); //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); return Entity; - + } public Action SpawnPlatform2() @@ -1705,12 +1705,12 @@ public Action SpawnPlatform2() DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "solid", "6"); DispatchKeyValue(Entity, "rendermode", "10"); - DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchKeyValue(Entity, "StartDisabled", "0"); DispatchSpawn(Entity); //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); return Entity; - + } public Action SpawnPlatform3() @@ -1732,12 +1732,12 @@ public Action SpawnPlatform3() DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "solid", "6"); DispatchKeyValue(Entity, "rendermode", "10"); - DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchKeyValue(Entity, "StartDisabled", "0"); DispatchSpawn(Entity); //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); return Entity; - + } public Action SpawnPlatform4() @@ -1759,12 +1759,12 @@ public Action SpawnPlatform4() DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "solid", "6"); DispatchKeyValue(Entity, "rendermode", "10"); - DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchKeyValue(Entity, "StartDisabled", "0"); DispatchSpawn(Entity); //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); return Entity; - + } public Action SpawnPlatform5() @@ -1786,12 +1786,12 @@ public Action SpawnPlatform5() DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "solid", "6"); DispatchKeyValue(Entity, "rendermode", "10"); - DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchKeyValue(Entity, "StartDisabled", "0"); DispatchSpawn(Entity); //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); return Entity; - + } public Action SpawnPlatform6() @@ -1813,12 +1813,12 @@ public Action SpawnPlatform6() DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "solid", "6"); DispatchKeyValue(Entity, "rendermode", "10"); - DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchKeyValue(Entity, "StartDisabled", "0"); DispatchSpawn(Entity); //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); return Entity; - + } public Action SpawnPillar1() @@ -1845,7 +1845,7 @@ public Action SpawnPillar1() //SetEdictFlags(Entity, FL_EDICT_ALWAYS | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_ALWAYS); return Entity; - + } @@ -1868,12 +1868,12 @@ public Action SpawnPillarLight1() DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "rendermode", "1"); - DispatchKeyValue(Entity, "StartDisabled", "1"); + DispatchKeyValue(Entity, "StartDisabled", "1"); DispatchSpawn(Entity); //SetEdictFlags(Entity, FL_EDICT_ALWAYS | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_ALWAYS); return Entity; - + } public Action SpawnPillarParticle1() @@ -1889,11 +1889,11 @@ public Action SpawnPillarParticle1() DispatchKeyValue(Entity, "targetname", "secret_pillar_particle_1"); DispatchKeyValue(Entity, "origin", "603 8940 930"); DispatchKeyValue(Entity, "effect_name", "achieved"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnPillar2() @@ -1920,7 +1920,7 @@ public Action SpawnPillar2() //SetEdictFlags(Entity, FL_EDICT_ALWAYS | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_ALWAYS); return Entity; - + } public Action SpawnPillarLight2() @@ -1942,12 +1942,12 @@ public Action SpawnPillarLight2() DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "rendermode", "1"); - DispatchKeyValue(Entity, "StartDisabled", "1"); + DispatchKeyValue(Entity, "StartDisabled", "1"); DispatchSpawn(Entity); //SetEdictFlags(Entity, FL_EDICT_ALWAYS | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_ALWAYS); return Entity; - + } public Action SpawnPillarParticle2() @@ -1963,11 +1963,11 @@ public Action SpawnPillarParticle2() DispatchKeyValue(Entity, "targetname", "secret_pillar_particle_2"); DispatchKeyValue(Entity, "origin", "420 8940 930"); DispatchKeyValue(Entity, "effect_name", "achieved"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnPillar3() @@ -1994,7 +1994,7 @@ public Action SpawnPillar3() //SetEdictFlags(Entity, FL_EDICT_ALWAYS | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_ALWAYS); return Entity; - + } public Action SpawnPillarLight3() @@ -2016,12 +2016,12 @@ public Action SpawnPillarLight3() DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "rendermode", "1"); - DispatchKeyValue(Entity, "StartDisabled", "1"); + DispatchKeyValue(Entity, "StartDisabled", "1"); DispatchSpawn(Entity); //SetEdictFlags(Entity, FL_EDICT_ALWAYS | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_ALWAYS); return Entity; - + } public Action SpawnPillarParticle3() @@ -2037,11 +2037,11 @@ public Action SpawnPillarParticle3() DispatchKeyValue(Entity, "targetname", "secret_pillar_particle_3"); DispatchKeyValue(Entity, "origin", "512 9032 930"); DispatchKeyValue(Entity, "effect_name", "achieved"); - + DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnExplosion1() @@ -2050,10 +2050,10 @@ public Action SpawnExplosion1() // Spawn dynamic prop entity if ((Entity = CreateEntityByName("env_explosion")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_explosion_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_explosion_1"); DispatchKeyValue(Entity, "origin", "603 8940 960"); @@ -2063,9 +2063,9 @@ public Action SpawnExplosion1() DispatchKeyValue(Entity, "iRadiusOverride", "70"); DispatchKeyValue(Entity, "spawnflags", "3"); DispatchSpawn(Entity); - - return Entity; - + + return Entity; + } public Action SpawnExplosion2() @@ -2074,10 +2074,10 @@ public Action SpawnExplosion2() // Spawn dynamic prop entity if ((Entity = CreateEntityByName("env_explosion")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_explosion_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_explosion_2"); DispatchKeyValue(Entity, "origin", "420 8940 960"); @@ -2087,9 +2087,9 @@ public Action SpawnExplosion2() DispatchKeyValue(Entity, "iRadiusOverride", "70"); DispatchKeyValue(Entity, "spawnflags", "3"); DispatchSpawn(Entity); - - return Entity; - + + return Entity; + } public Action SpawnExplosion3() @@ -2098,10 +2098,10 @@ public Action SpawnExplosion3() // Spawn dynamic prop entity if ((Entity = CreateEntityByName("env_explosion")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_explosion_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", "secret_explosion_3"); DispatchKeyValue(Entity, "origin", "512 9032 960"); @@ -2111,22 +2111,22 @@ public Action SpawnExplosion3() DispatchKeyValue(Entity, "iRadiusOverride", "70"); DispatchKeyValue(Entity, "spawnflags", "3"); DispatchSpawn(Entity); - - return Entity; - + + return Entity; + } public Action SpawnAmbientGenericExplosion1() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", "explosion_sound_1"); DispatchKeyValue(Entity, "spawnflags", "49"); @@ -2137,24 +2137,24 @@ public Action SpawnAmbientGenericExplosion1() DispatchKeyValue(Entity, "health", "10"); DispatchKeyValue(Entity, "preset", "0"); DispatchKeyValue(Entity, "pitch", "100"); - DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); DispatchSpawn(Entity); ActivateEntity(Entity); - + return Entity; } public Action SpawnAmbientGenericExplosion2() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", "explosion_sound_2"); DispatchKeyValue(Entity, "spawnflags", "49"); @@ -2165,24 +2165,24 @@ public Action SpawnAmbientGenericExplosion2() DispatchKeyValue(Entity, "health", "10"); DispatchKeyValue(Entity, "preset", "0"); DispatchKeyValue(Entity, "pitch", "100"); - DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); DispatchSpawn(Entity); ActivateEntity(Entity); - + return Entity; } public Action SpawnAmbientGenericExplosion3() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); - + // Setup entity DispatchKeyValue(Entity, "targetname", "explosion_sound_3"); DispatchKeyValue(Entity, "spawnflags", "49"); @@ -2193,10 +2193,10 @@ public Action SpawnAmbientGenericExplosion3() DispatchKeyValue(Entity, "health", "10"); DispatchKeyValue(Entity, "preset", "0"); DispatchKeyValue(Entity, "pitch", "100"); - DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); DispatchSpawn(Entity); ActivateEntity(Entity); - + return Entity; } @@ -2220,10 +2220,10 @@ public Action SpawnOrangeFinal() DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "rendermode", "1"); DispatchKeyValue(Entity, "StartDisabled", "1"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnBananaFinal() @@ -2246,10 +2246,10 @@ public Action SpawnBananaFinal() DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "rendermode", "1"); DispatchKeyValue(Entity, "StartDisabled", "1"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnMelonFinal() @@ -2272,10 +2272,10 @@ public Action SpawnMelonFinal() DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "rendermode", "1"); DispatchKeyValue(Entity, "StartDisabled", "1"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnTeleportFinal() @@ -2289,8 +2289,8 @@ public Action SpawnTeleportFinal() // Setup entity DispatchKeyValue(Entity, "targetname", "secret_teleport_prop"); - DispatchKeyValue(Entity, "angles", "0 90 0"); - DispatchKeyValue(Entity, "origin", "512 9032 886"); + DispatchKeyValue(Entity, "angles", "0 90 0"); + DispatchKeyValue(Entity, "origin", "512 9032 886"); DispatchKeyValue(Entity, "model", "models/props_combine/combine_teleportplatform.mdl"); DispatchKeyValue(Entity, "modelscale", "1.0"); DispatchKeyValue(Entity, "disablereceiveshadows", "1"); @@ -2301,7 +2301,7 @@ public Action SpawnTeleportFinal() DispatchSpawn(Entity); return Entity; - + } public Action SpawnBeam1() @@ -2321,12 +2321,12 @@ public Action SpawnBeam1() DispatchKeyValue(Entity, "framestart", "0"); DispatchKeyValue(Entity, "life", "1"); DispatchKeyValue(Entity, "LightningStart", "secret_banana_final"); - DispatchKeyValue(Entity, "LightningEnd", "secret_orange_final"); + DispatchKeyValue(Entity, "LightningEnd", "secret_orange_final"); DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnBeam2() @@ -2348,10 +2348,10 @@ public Action SpawnBeam2() DispatchKeyValue(Entity, "LightningStart", "secret_orange_final"); DispatchKeyValue(Entity, "LightningEnd", "secret_melon_final"); DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnBeam3() @@ -2373,10 +2373,10 @@ public Action SpawnBeam3() DispatchKeyValue(Entity, "LightningStart", "secret_melon_final"); DispatchKeyValue(Entity, "LightningEnd", "secret_banana_final"); DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnBeam4() @@ -2399,10 +2399,10 @@ public Action SpawnBeam4() DispatchKeyValue(Entity, "LightningStart", "secret_melon_rotating"); DispatchKeyValue(Entity, "LightningEnd", "secret_melon_rotating_beam"); DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnBeam5() @@ -2416,7 +2416,7 @@ public Action SpawnBeam5() // Setup entity DispatchKeyValue(Entity, "targetname", "secret_beam_5"); - DispatchKeyValue(Entity, "BoltWidth", "10"); + DispatchKeyValue(Entity, "BoltWidth", "10"); DispatchKeyValue(Entity, "decalname", "Bigshot"); DispatchKeyValue(Entity, "framerate", "0"); DispatchKeyValue(Entity, "framestart", "0"); @@ -2425,10 +2425,10 @@ public Action SpawnBeam5() DispatchKeyValue(Entity, "LightningStart", "secret_banana_rotating"); DispatchKeyValue(Entity, "LightningEnd", "chinookrotor1"); DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnBeam6() @@ -2451,10 +2451,10 @@ public Action SpawnBeam6() DispatchKeyValue(Entity, "LightningStart", "secret_orange_rotating"); DispatchKeyValue(Entity, "LightningEnd", "boat_3"); DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnBeam7() @@ -2477,20 +2477,20 @@ public Action SpawnBeam7() DispatchKeyValue(Entity, "LightningStart", "secret_melon_rotating"); DispatchKeyValue(Entity, "LightningEnd", "boat_4"); DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnButtonFinal1() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); @@ -2499,25 +2499,25 @@ public Action SpawnButtonFinal1() DispatchKeyValue(Entity, "spawnflags", "3073");//1025 DispatchKeyValue(Entity, "model", "*65"); DispatchKeyValue(Entity, "origin", "603 8940 960"); - DispatchKeyValue(Entity, "OnPressed", "secret_beam_1,TurnOn,,0,1"); + DispatchKeyValue(Entity, "OnPressed", "secret_beam_1,TurnOn,,0,1"); DispatchKeyValue(Entity, "OnPressed", "secret_pillar_light_1,Kill,,0,1"); DispatchKeyValue(Entity, "OnPressed", "secret_math_counter_2,Add,1,0,1"); - DispatchKeyValue(Entity, "OnPressed", "secret_pillar_particle_1,Start,,0,1"); + DispatchKeyValue(Entity, "OnPressed", "secret_pillar_particle_1,Start,,0,1"); DispatchKeyValue(Entity, "OnPressed", "!self,Kill,,0.1,1"); DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } public Action SpawnButtonFinal2() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); @@ -2532,19 +2532,19 @@ public Action SpawnButtonFinal2() DispatchKeyValue(Entity, "OnPressed", "secret_pillar_particle_2,Start,,0,1"); DispatchKeyValue(Entity, "OnPressed", "!self,Kill,,0.1,1"); DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } public Action SpawnButtonFinal3() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); @@ -2557,11 +2557,11 @@ public Action SpawnButtonFinal3() DispatchKeyValue(Entity, "OnPressed", "secret_pillar_light_3,Kill,,0,1"); DispatchKeyValue(Entity, "OnPressed", "secret_math_counter_2,Add,1,0,1"); DispatchKeyValue(Entity, "OnPressed", "secret_pillar_particle_3,Start,,0,1"); - DispatchKeyValue(Entity, "OnPressed", "!self,Kill,,0.1,1"); - + DispatchKeyValue(Entity, "OnPressed", "!self,Kill,,0.1,1"); + DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } @@ -2583,15 +2583,15 @@ public Action SpawnOrange() DispatchKeyValue(Entity, "disablereceiveshadows", "1"); DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "spawnflags", "289"); - DispatchKeyValue(Entity, "damagetoenablemotion", "10"); - DispatchKeyValue(Entity, "OnTakeDamage", "secret_logic_relay,FireUser2,,0,-1"); - DispatchKeyValue(Entity, "OnPlayerUse", "secret_logic_relay,FireUser2,,0,-1"); + DispatchKeyValue(Entity, "damagetoenablemotion", "10"); + DispatchKeyValue(Entity, "OnTakeDamage", "secret_logic_relay,FireUser2,,0,-1"); + DispatchKeyValue(Entity, "OnPlayerUse", "secret_logic_relay,FireUser2,,0,-1"); DispatchKeyValue(Entity, "OnTakeDamage", "!self,Kill,,0.1,-1"); DispatchKeyValue(Entity, "OnPlayerUse", "!self,Kill,,0.1,-1"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnBanana() @@ -2612,15 +2612,15 @@ public Action SpawnBanana() DispatchKeyValue(Entity, "disablereceiveshadows", "1"); DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "spawnflags", "289"); - DispatchKeyValue(Entity, "damagetoenablemotion", "10"); - DispatchKeyValue(Entity, "OnTakeDamage", "secret_logic_relay,FireUser1,,0,-1"); - DispatchKeyValue(Entity, "OnPlayerUse", "secret_logic_relay,FireUser1,,0,-1"); + DispatchKeyValue(Entity, "damagetoenablemotion", "10"); + DispatchKeyValue(Entity, "OnTakeDamage", "secret_logic_relay,FireUser1,,0,-1"); + DispatchKeyValue(Entity, "OnPlayerUse", "secret_logic_relay,FireUser1,,0,-1"); DispatchKeyValue(Entity, "OnTakeDamage", "!self,Kill,,0.1,-1"); DispatchKeyValue(Entity, "OnPlayerUse", "!self,Kill,,0.1,-1"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnMelon() @@ -2641,25 +2641,25 @@ public Action SpawnMelon() DispatchKeyValue(Entity, "disablereceiveshadows", "1"); DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "spawnflags", "289"); - DispatchKeyValue(Entity, "damagetoenablemotion", "10"); - DispatchKeyValue(Entity, "OnTakeDamage", "secret_logic_relay,FireUser3,,0,-1"); - DispatchKeyValue(Entity, "OnPlayerUse", "secret_logic_relay,FireUser3,,0,-1"); + DispatchKeyValue(Entity, "damagetoenablemotion", "10"); + DispatchKeyValue(Entity, "OnTakeDamage", "secret_logic_relay,FireUser3,,0,-1"); + DispatchKeyValue(Entity, "OnPlayerUse", "secret_logic_relay,FireUser3,,0,-1"); DispatchKeyValue(Entity, "OnTakeDamage", "!self,Kill,,0.1,-1"); DispatchKeyValue(Entity, "OnPlayerUse", "!self,Kill,,0.1,-1"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnRotating() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("func_rotating")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_rotating_%i", Entity); @@ -2668,19 +2668,19 @@ public Action SpawnRotating() DispatchKeyValue(Entity, "origin", "512 9032 100"); DispatchKeyValue(Entity, "maxspeed", "10"); DispatchKeyValue(Entity, "spawnflags", "65"); - + DispatchSpawn(Entity); - ActivateEntity(Entity); - - SetEntityModel(Entity, "models/effects/vol_light64x256.mdl"); + ActivateEntity(Entity); + + SetEntityModel(Entity, "models/effects/vol_light64x256.mdl"); new Float:minbounds[3] = {-100.25, -100.25, -10.0}; new Float:maxbounds[3] = {100.25, 100.25, 10.0}; SetEntPropVector(Entity, Prop_Send, "m_vecMins", minbounds); - SetEntPropVector(Entity, Prop_Send, "m_vecMaxs", maxbounds); - SetEntProp(Entity, Prop_Send, "m_nSolidType", 2); + SetEntPropVector(Entity, Prop_Send, "m_vecMaxs", maxbounds); + SetEntProp(Entity, Prop_Send, "m_nSolidType", 2); new enteffects = GetEntProp(Entity, Prop_Send, "m_fEffects"); enteffects |= 32; - SetEntProp(Entity, Prop_Send, "m_fEffects", enteffects); + SetEntProp(Entity, Prop_Send, "m_fEffects", enteffects); return Entity; } @@ -2704,10 +2704,10 @@ public Action SpawnRotatingOrange() DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "rendermode", "1"); DispatchKeyValue(Entity, "StartDisabled", "1"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnRotatingBanana() @@ -2730,10 +2730,10 @@ public Action SpawnRotatingBanana() DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "rendermode", "1"); DispatchKeyValue(Entity, "StartDisabled", "1"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnRotatingMelon() @@ -2756,10 +2756,10 @@ public Action SpawnRotatingMelon() DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "rendermode", "1"); DispatchKeyValue(Entity, "StartDisabled", "1"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnRotatingMelonBeam() @@ -2782,20 +2782,20 @@ public Action SpawnRotatingMelonBeam() DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "rendermode", "10"); DispatchKeyValue(Entity, "StartDisabled", "1"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnTriggerTeleportFinal() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("trigger_teleport")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_teleport_%i", Entity); @@ -2807,44 +2807,44 @@ public Action SpawnTriggerTeleportFinal() DispatchKeyValue(Entity, "StartDisabled", "1"); DispatchKeyValue(Entity, "target", "secret_teleport_destination_final"); DispatchKeyValue(Entity, "OnStartTouch", "!activator,AddOutput,targetname carrier,0,1"); - DispatchKeyValue(Entity, "OnStartTouch", "secret_teleport_prop,Kill,,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_teleport_prop,Kill,,0,1"); DispatchKeyValue(Entity, "OnStartTouch", "!self,Kill,,0,-1"); - + DispatchSpawn(Entity); - ActivateEntity(Entity); + ActivateEntity(Entity); return Entity; } public Action SpawnTeleportDestinationFinal() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("info_teleport_destination")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "info_teleport_destination_%i", Entity); // Setup entity DispatchKeyValue(Entity, "targetname", "secret_teleport_destination_final"); DispatchKeyValue(Entity, "angles", "0 90 0") - DispatchKeyValue(Entity, "origin", "634.9 11304.2 436.72"); + DispatchKeyValue(Entity, "origin", "634.9 11304.2 436.72"); DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } public Action SpawnItemTrigger1() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("trigger_once")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_once_%i", Entity); @@ -2857,21 +2857,21 @@ public Action SpawnItemTrigger1() DispatchKeyValue(Entity, "OnStartTouch", "!activator,AddOutput,origin -7820 -14000 860,0,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_item_deagle,AddOutput,OnPlayerPickUp !activator:AddOutput:origin -6856.84 -13314.8 576:0:1,0,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_item_trigger*,Kill,,0,1"); - + DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } public Action SpawnItemTrigger2() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("trigger_once")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_once_%i", Entity); @@ -2884,22 +2884,22 @@ public Action SpawnItemTrigger2() DispatchKeyValue(Entity, "OnStartTouch", "!activator,AddOutput,origin -7820 -14000 860,0,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_item_deagle,AddOutput,OnPlayerPickUp !activator:AddOutput:origin -4750.68 -14327.8 576:0:1,0,1"); DispatchKeyValue(Entity, "OnStartTouch", "secret_item_trigger*,Kill,,0,1"); - + DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } public Action SpawnNameReset() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("trigger_multiple")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_multiple_%i", Entity); @@ -2909,21 +2909,21 @@ public Action SpawnNameReset() DispatchKeyValue(Entity, "origin", "-2168 -13824 608"); DispatchKeyValue(Entity, "model", "*49"); DispatchKeyValue(Entity, "OnStartTouch", "!activator,AddOutput,targetname plebnemesisfag,0,-1"); - + DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } public Action SpawnNameResetZM1() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("trigger_multiple")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_multiple_%i", Entity); @@ -2932,23 +2932,23 @@ public Action SpawnNameResetZM1() DispatchKeyValue(Entity, "spawnflags", "1") DispatchKeyValue(Entity, "origin", "-5285.69 -14386.9 928"); DispatchKeyValue(Entity, "model", "*49"); - DispatchKeyValue(Entity, "filtername", "secret_filter_zm"); + DispatchKeyValue(Entity, "filtername", "secret_filter_zm"); DispatchKeyValue(Entity, "OnStartTouch", "!activator,AddOutput,targetname plebnemesisfag,0,-1"); - + DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } public Action SpawnNameResetZM2() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("trigger_multiple")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_multiple_%i", Entity); @@ -2957,12 +2957,12 @@ public Action SpawnNameResetZM2() DispatchKeyValue(Entity, "spawnflags", "1") DispatchKeyValue(Entity, "origin", "-7335.97 -13298.3 928"); DispatchKeyValue(Entity, "model", "*49"); - DispatchKeyValue(Entity, "filtername", "secret_filter_zm"); + DispatchKeyValue(Entity, "filtername", "secret_filter_zm"); DispatchKeyValue(Entity, "OnStartTouch", "!activator,AddOutput,targetname plebnemesisfag,0,-1"); - + DispatchSpawn(Entity); - ActivateEntity(Entity); - + ActivateEntity(Entity); + return Entity; } @@ -2982,7 +2982,7 @@ public Action SpawnFilterZM() DispatchSpawn(Entity); ActivateEntity(Entity); return Entity; - + } public Action SpawnItemFilter() @@ -3001,7 +3001,7 @@ public Action SpawnItemFilter() DispatchSpawn(Entity); ActivateEntity(Entity); - return Entity; + return Entity; } public Action SpawnItemPlatform1() @@ -3023,12 +3023,12 @@ public Action SpawnItemPlatform1() DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "solid", "6"); DispatchKeyValue(Entity, "rendermode", "10"); - DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchKeyValue(Entity, "StartDisabled", "0"); DispatchSpawn(Entity); //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); return Entity; - + } public Action SpawnItemPlatform2() @@ -3050,12 +3050,12 @@ public Action SpawnItemPlatform2() DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "solid", "6"); DispatchKeyValue(Entity, "rendermode", "10"); - DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchKeyValue(Entity, "StartDisabled", "0"); DispatchSpawn(Entity); //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); return Entity; - + } public Action SpawnItemElite() @@ -3075,20 +3075,20 @@ public Action SpawnItemElite() DispatchKeyValue(Entity, "origin", "-7600 -13990 872.46"); DispatchKeyValue(Entity, "spawnflags", "1"); DispatchKeyValue(Entity, "OnPlayerPickUp", "!activator,AddOutput,targetname plebnemesisfag,0,1"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnItemRotating() { - new Entity; - + new Entity; + // Spawn dynamic prop entity if ((Entity = CreateEntityByName("func_rotating")) == INVALID_ENT_REFERENCE) return -1; - + // Generate unique id for the entity new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_rotating_%i", Entity); @@ -3098,19 +3098,19 @@ public Action SpawnItemRotating() DispatchKeyValue(Entity, "maxspeed", "40"); DispatchKeyValue(Entity, "spawnflags", "65"); DispatchKeyValue(Entity, "parentname", "secret_item_deagle"); - + DispatchSpawn(Entity); - ActivateEntity(Entity); - - SetEntityModel(Entity, "models/effects/vol_light64x256.mdl"); + ActivateEntity(Entity); + + SetEntityModel(Entity, "models/effects/vol_light64x256.mdl"); new Float:minbounds[3] = {-100.25, -100.25, -10.0}; new Float:maxbounds[3] = {100.25, 100.25, 10.0}; SetEntPropVector(Entity, Prop_Send, "m_vecMins", minbounds); - SetEntPropVector(Entity, Prop_Send, "m_vecMaxs", maxbounds); - SetEntProp(Entity, Prop_Send, "m_nSolidType", 2); + SetEntPropVector(Entity, Prop_Send, "m_vecMaxs", maxbounds); + SetEntProp(Entity, Prop_Send, "m_nSolidType", 2); new enteffects = GetEntProp(Entity, Prop_Send, "m_fEffects"); enteffects |= 32; - SetEntProp(Entity, Prop_Send, "m_fEffects", enteffects); + SetEntProp(Entity, Prop_Send, "m_fEffects", enteffects); return Entity; } @@ -3134,10 +3134,10 @@ public Action SpawnItemRotatingOrange() DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "rendermode", "1"); DispatchKeyValue(Entity, "StartDisabled", "0"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnItemRotatingBanana() @@ -3160,10 +3160,10 @@ public Action SpawnItemRotatingBanana() DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "rendermode", "1"); DispatchKeyValue(Entity, "StartDisabled", "0"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnItemRotatingMelon() @@ -3186,10 +3186,10 @@ public Action SpawnItemRotatingMelon() DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "rendermode", "1"); DispatchKeyValue(Entity, "StartDisabled", "0"); - + DispatchSpawn(Entity); return Entity; - + } public Action SpawnItemRotatingMelonBeam() @@ -3211,12 +3211,12 @@ public Action SpawnItemRotatingMelonBeam() DispatchKeyValue(Entity, "disableshadows", "1"); DispatchKeyValue(Entity, "solid", "0"); DispatchKeyValue(Entity, "rendermode", "10"); - DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchKeyValue(Entity, "StartDisabled", "0"); DispatchSpawn(Entity); //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); return Entity; - + } public Action SpawnItemBeam() @@ -3239,8 +3239,8 @@ public Action SpawnItemBeam() DispatchKeyValue(Entity, "LightningStart", "secret_item_melon_rotating"); DispatchKeyValue(Entity, "LightningEnd", "secret_item_melon_rotating_beam"); DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); - + DispatchSpawn(Entity); return Entity; - + } \ No newline at end of file