inital commit

keep-around/7dac8a3ce4fd97d9de34a8da07c69e57557b426d
Giovanni Harting 7 years ago
parent 1a038457d4
commit 45b2c6cfff
  1. 4
      .gitignore
  2. 446
      ClientParticles.sp
  3. 29
      VMC.sp
  4. 125
      afk4ever.sp
  5. 2513
      antitk.sp
  6. 254
      antitk/keyvalues.sp
  7. 69
      ask4change.sp
  8. 42
      ask4connect.sp
  9. 75
      autoinvite.sp
  10. 152
      autorespawn_for_admins.sp
  11. 138
      autorespawn_for_admins_css.sp
  12. 115
      autoteambalance.sp
  13. 124
      basic_player_votes.sp
  14. 734
      beer.sp
  15. 27
      buffreloader.sp
  16. 194
      classrestrict.sp
  17. 33
      colortest.sp
  18. 63
      coop.sp
  19. 134
      crithit_system.sp
  20. 167
      ctf_bball2_arena.sp
  21. 142
      edit_flags.sp
  22. 38
      fakeclient.sp
  23. 209
      forceclass.sp
  24. 28
      gospec.sp
  25. 75
      health_regenerater.sp
  26. 646
      jumpmode.sp
  27. 296
      l4d2_dc.sp
  28. 825
      lp/offical/lp.sp
  29. 562
      lp/offical/lp_light.sp
  30. 2
      lp/sql/lp_update_v1_0-v1_1.sql
  31. 19
      lp/sql/lp_v1_0.sql
  32. 12
      lp/sql/lp_v1_1.sql
  33. 213
      mapend.sp
  34. 858
      maprate.sp
  35. 67
      maprate_rld.sp
  36. 298
      mvmsetaddmoney.sp
  37. 40
      opend.sp
  38. 796
      quakesounds_tf2.sp
  39. 53
      reflect_dmg.sp
  40. 123
      sentry_mod.sp
  41. 2264
      sourcebans.sp
  42. 82
      spamguard.sp
  43. 181
      spawn_protect.sp
  44. 180
      spawn_protect_css.sp
  45. 34
      specchat.sp
  46. 218
      speclist.sp
  47. 83
      tf2halloweenteamforcer.sp
  48. 212
      translations/maprate.phrases.txt
  49. 75
      update_notifier.sp

4
.gitignore vendored

@ -75,3 +75,7 @@ sounds.sp
spcomp
sql-admin-manager.sp
testsuite/
compile.exe
compiled/
spcomp.exe

@ -0,0 +1,446 @@
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
#include <tf2>
#include <tf2_stocks>
#include <sdkhooks>
new String:clientParticle[MAXPLAYERS+1][256];
new Handle:hProjectileArray[56];
new curSecCount=-1;
new Handle:hDb = INVALID_HANDLE;
public Plugin:myinfo =
{
name = "ClientParticles",
author = "Chefe",
description = "Set your own particle effect",
version = "1.0",
url = "oktoberfest-servers.net"
}
public OnPluginStart()
{
RegConsoleCmd("sm_particles", Command_Particles, "Set your own custom projectile particle effects");
HookEvent("player_changeclass", Event_PlayerChangeClass);
InitDB();
ProcessConfigFile("configs/clientparticles.cfg");
}
InitDB()
{
SQL_TConnect(InitDBHnld, "clientparticles");
}
public InitDBHnld(Handle:owner, Handle:hndl, const String:error[], any:data)
{
if (hndl == INVALID_HANDLE)
{
SetFailState("Database connection failed: %s", error);
}
else
{
hDb = hndl;
}
}
public Event_PlayerChangeClass(Handle:event,const String:name[],bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
PrintToServer("Class changed, update requested");
CreateTimer(0.5, Timer_Update, client);
}
public Action:Timer_Update(Handle:timer, any:client)
{
updateClientParticle(client);
}
stock ProcessConfigFile(const String:file[])
{
new String:sConfigFile[PLATFORM_MAX_PATH];
BuildPath(Path_SM, sConfigFile, sizeof(sConfigFile), file);
if (!FileExists(sConfigFile))
{
/**
Config file doesn't exists, stop the plugin
*/
LogError("[CP] Plugin startup failed! Could not find file %s", sConfigFile);
SetFailState("Could not find file %s", sConfigFile);
}
else if (!ParseConfigFile(sConfigFile))
{
/**
Couldn't parse the file, stop the plugin
*/
LogError("[SM] Plugin is not running! Failed to parse %s", sConfigFile);
SetFailState("Parse error on file %s", sConfigFile);
}
}
stock bool:ParseConfigFile(const String:file[])
{
new Handle:hParser = SMC_CreateParser();
new String:error[128];
new line = 0;
new col = 0;
/**
Define the parser functions
*/
SMC_SetReaders(hParser, Config_NewSection, Config_KeyValue, Config_EndSection);
SMC_SetParseEnd(hParser, Config_End);
/**
Parse the file and get the result
*/
new SMCError:result = SMC_ParseFile(hParser, file, line, col);
CloseHandle(hParser);
if (result != SMCError_Okay)
{
SMC_GetErrorString(result, error, sizeof(error));
LogError("%s on line %d, col %d of %s", error, line, col, file);
}
return (result == SMCError_Okay);
}
public SMCResult:Config_NewSection(Handle:parser, const String:section[], bool:quotes)
{
if (StrEqual(section, "projectiles"))
{
return SMCParse_Continue;
}
curSecCount++;
hProjectileArray[curSecCount] = CreateArray(32, 0);
PushArrayString(hProjectileArray[curSecCount], section);
return SMCParse_Continue;
}
public SMCResult:Config_KeyValue(Handle:parser, const String:key[], const String:value[], bool:key_quotes, bool:value_quotes)
{
if(StrEqual(key, "display", false))
{
PushArrayString(hProjectileArray[curSecCount], value);
PrintToServer("[PC_DEBUG] New value %s to key %s to array %i", value, key, curSecCount);
}
else if (StrEqual(key, "effect", false))
{
new index = PushArrayString(hProjectileArray[curSecCount], value);
PrintToServer("[PC_DEBUG] New value %s to key %s to array %i with index %i", value, key, curSecCount, index);
}
return SMCParse_Continue;
}
public SMCResult:Config_EndSection(Handle:parser)
{
return SMCParse_Continue;
}
public Config_End(Handle:parser, bool:halted, bool:failed)
{
if (failed)
{
SetFailState("Plugin configuration error");
}
}
public Action:Command_Particles(client, args)
{
new Handle:menu = CreateMenu(Menu_Particles);
SetMenuTitle(menu, "Choose the projectile");
for (new i=0; i<32; i++)
{
if (hProjectileArray[i] != INVALID_HANDLE && hProjectileArray[i])
{
new String:projectileName[256];
GetArrayString(hProjectileArray[i], 0, projectileName, sizeof(projectileName));
new String:displayName[256];
GetArrayString(hProjectileArray[i], 1, displayName, sizeof(displayName));
//new String:secNum[5];
//IntToString(i, secNum, sizeof(secNum));
AddMenuItem(menu, projectileName, displayName);
}
}
SetMenuExitButton(menu, true);
DisplayMenu(menu, client, MENU_TIME_FOREVER);
return Plugin_Handled;
}
public Menu_Particles(Handle:menu, MenuAction:action, param1, param2)
{
/* If an option was selected, tell the client about the item. */
if (action == MenuAction_Select)
{
new String:projectile[256];
GetMenuItem(menu, param2, projectile, sizeof(projectile));
new Handle:effectmenu = CreateMenu(Menu_Effect);
SetMenuTitle(effectmenu, "Choose your effect");
new client = param1;
for (new a=0; a<32; a++)
{
if (hProjectileArray[a] != INVALID_HANDLE && hProjectileArray[a])
{
new String:projectileName[256];
GetArrayString(hProjectileArray[a], 0, projectileName, sizeof(projectileName));
if (StrEqual(projectile, projectileName))
{
for (new g=1; g<=(GetArraySize(hProjectileArray[a])-2); g++)
{
new String:myNewItem[256];
GetArrayString(hProjectileArray[a], g+1, myNewItem, sizeof(myNewItem));
if (!StrEqual(myNewItem, NULL_STRING))
{
AddMenuItem(effectmenu, myNewItem, myNewItem);
}
}
break;
}
}
}
// Pass projetile to menu as item for next menu handler
AddMenuItem(effectmenu, projectile, "", ITEMDRAW_IGNORE);
SetMenuExitButton(effectmenu, true);
DisplayMenu(effectmenu, client, MENU_TIME_FOREVER);
}
/* If the menu was cancelled, print a message to the server about it. */
else if (action == MenuAction_Cancel)
{
}
/* If the menu has ended, destroy it */
else if (action == MenuAction_End)
{
CloseHandle(menu);
}
}
public Menu_Effect(Handle:menu, MenuAction:action, param1, param2)
{
/* If an option was selected, tell the client about the item. */
if (action == MenuAction_Select)
{
new String:effect[256];
GetMenuItem(menu, param2, effect, sizeof(effect));
new String:projectile[256];
GetMenuItem(menu, GetMenuItemCount(menu)-1, projectile, sizeof(projectile));
PrintToChat(param1, "[CP] Effect: %s", effect);
new String:steamid[256];
GetClientAuthString(param1, steamid, sizeof(steamid));
new String:sqlstr[1024];
Format(sqlstr, sizeof(sqlstr), "SELECT particle FROM clientParticles WHERE steamid='%s' AND proj='%s'", steamid, projectile);
new Handle:pck = CreateDataPack();
WritePackCell(pck, param1);
WritePackString(pck, steamid);
WritePackString(pck, projectile);
WritePackString(pck, effect);
SQL_TQuery(hDb, searchClassEffect, sqlstr, pck);
}
/* If the menu was cancelled, print a message to the server about it. */
else if (action == MenuAction_Cancel)
{
}
/* If the menu has ended, destroy it */
else if (action == MenuAction_End)
{
CloseHandle(menu);
}
}
public searchClassEffect(Handle:owner, Handle:hndl, const String:error[], any:data)
{
if (hndl == INVALID_HANDLE || strlen(error) > 0)
{
LogError("Query error: %s", error);
return;
}
ResetPack(data);
new client = ReadPackCell(data);
new String:steamid[256];
ReadPackString(data, steamid, sizeof(steamid));
new String:projectile[256];
ReadPackString(data, projectile, sizeof(projectile));
new String:effect[256];
ReadPackString(data, effect, sizeof(effect));
if (SQL_GetRowCount(hndl)) {
while (SQL_FetchRow(hndl))
{
new String:name[150];
SQL_FetchString(hndl, 0, name, sizeof(name))
if (strcmp(name, projectile) != 0)
{
PrintToServer("%s was foudn in db. Update!", name);
new String:sqlstr[1024];
Format(sqlstr, sizeof(sqlstr), "UPDATE clientParticles SET particle = '%s' WHERE steamid='%s' AND proj='%s'", effect, steamid, projectile);
SQL_TQuery(hDb, noRtnCllbck, sqlstr);
CreateTimer(0.5, Timer_Update, client);
}
}
}
else
{
PrintToServer("NOT foudn in db. Insert!");
new String:sqlstr[1024];
Format(sqlstr, sizeof(sqlstr), "INSERT INTO clientParticles (steamid,proj,particle) VALUES ('%s','%s','%s')", steamid, projectile, effect);
SQL_TQuery(hDb, noRtnCllbck, sqlstr);
CreateTimer(0.5, Timer_Update, client);
}
}
public noRtnCllbck(Handle:owner, Handle:hndl, const String:error[], any:data)
{
if (hndl == INVALID_HANDLE || strlen(error) > 0)
{
LogError("Query error: %s", error);
return;
}
}
stock updateClientParticle(client)
{
if (IsClientInGame(client))
{
new String:steamid[256];
GetClientAuthString(client, steamid, sizeof(steamid));
new TFClassType:class = TF2_GetPlayerClass(client);
new String:proj[256];
if (class == TFClass_Soldier)
{
proj = "tf_projectile_rocket";
} else if (class == TFClass_DemoMan)
{
proj = "tf_projectile_pipe_remote";
} else
{
clientParticle[client] = NULL_STRING;
return;
}
new String:sqlstr[1024];
Format(sqlstr, sizeof(sqlstr), "SELECT particle FROM clientParticles WHERE steamid='%s' AND proj='%s'", steamid, proj);
SQL_TQuery(hDb, updateClientParticleDbCallback, sqlstr, client);
}
}
public updateClientParticleDbCallback(Handle:owner, Handle:hndl, const String:error[], any:data)
{
if (hndl == INVALID_HANDLE || strlen(error) > 0)
{
LogError("Query error: %s", error);
return;
}
if (SQL_GetRowCount(hndl)) {
while (SQL_FetchRow(hndl))
{
new String:effect[256];
SQL_FetchString(hndl, 0, effect, sizeof(effect));
clientParticle[data] = effect;
PrintToServer("Effect for %N activated: %s", data, effect);
}
}
}
public OnEntityCreated(entity, const String:classname[])
{
if (StrEqual(classname, "tf_projectile_rocket") || StrEqual(classname, "tf_projectile_pipe_remote")) {
SDKHook(entity, SDKHook_Spawn, OnEntitySpawned);
}
}
public OnEntitySpawned(entity)
{
new client = GetEntPropEnt(entity, Prop_Data, "m_hOwnerEntity");
if (client > 0 && IsClientInGame(client) && !StrEqual(clientParticle[client], NULL_STRING))
{
AddParticle(client, entity);
}
SDKUnhook(entity, SDKHook_Spawn, OnEntitySpawned);
}
stock AddParticle(client, entity)
{
new iClusters = 5, iIndex = -1;
new String:sParticle[256];
sParticle = clientParticle[client];
decl String:sExtras[64];
for (new i = 0; i < iClusters; i++)
{
while ((iIndex = SplitString(sParticle, ",", sExtras, sizeof(sExtras))) > -1)
{
CreateParticle(entity, sExtras, true);
strcopy(sParticle, sizeof(sParticle), sParticle[iIndex]);
}
CreateParticle(entity, sParticle, true);
}
}
stock CreateParticle(iEntity, String:sParticle[], bool:bAttach = false)
{
new iParticle = CreateEntityByName("info_particle_system");
if (IsValidEdict(iParticle))
{
decl Float:fPosition[3];
GetEntPropVector(iEntity, Prop_Send, "m_vecOrigin", fPosition);
TeleportEntity(iParticle, fPosition, NULL_VECTOR, NULL_VECTOR);
DispatchKeyValue(iParticle, "effect_name", sParticle);
if (bAttach)
{
SetVariantString("!activator");
AcceptEntityInput(iParticle, "SetParent", iEntity, iParticle, 0);
}
DispatchSpawn(iParticle);
ActivateEntity(iParticle);
AcceptEntityInput(iParticle, "Start");
}
return iParticle;
}

@ -0,0 +1,29 @@
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
new Handle:hVisibleMaxPlayers;
new g_visibleMaxPlayersVal = 24;
public Plugin:myinfo =
{
name = "VMPChecker",
author = "Chefe",
description = "Checks that visiblemaxplayers is set correctly",
version = "1.0",
url = "oktoberfest-servers.net"
}
public OnPluginStart()
{
hVisibleMaxPlayers = FindConVar("sv_visiblemaxplayers");
HookConVarChange(hVisibleMaxPlayers, OnVisibleChange);
}
public OnVisibleChange(Handle:cvar, const String:oldVal[], const String:newVal[])
{
if (StringToInt(newVal) != g_visibleMaxPlayersVal) {
SetConVarInt(hVisibleMaxPlayers, g_visibleMaxPlayersVal);
PrintToServer("[VMC] Set visible maxplayers %i => %i", StringToInt(newVal), g_visibleMaxPlayersVal);
}
}

@ -0,0 +1,125 @@
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
#include <sdktools_functions>
new client_points[MAXPLAYERS];
new spec_points[MAXPLAYERS];
new Float:client_angels[MAXPLAYERS][3];
new Handle:cv_pointlimit, Handle:cv_speclimit;
public Plugin:myinfo =
{
name = "AFK4ever",
author = "Chefe",
description = "Simple AFK kicker",
version = "1.4",
url = "www.chefgaming.de"
}
public OnPluginStart()
{
CreateTimer(60.0, CheckClients, _, TIMER_REPEAT);
cv_pointlimit = CreateConVar("sm_afk_pointlimit", "50", "Set the maximum point limit a active player can have before he get kicked");
cv_speclimit = CreateConVar("sm_afk_speclimit", "100", "Set the maximum point limit a spectator can have before he get kicked");
HookEvent("player_activate", Event_PlayerConnect);
AutoExecConfig(true);
}
public Event_PlayerConnect(Handle:event, const String:name[], bool:dontBroadcast)
{
new uid = GetEventInt(event, "userid");
new client = GetClientOfUserId(uid);
client_points[client] = 0;
spec_points[client] = 0;
}
public Action:CheckClients(Handle:timer)
{
new i = 1;
while (i <= GetMaxClients())
{
if (IsClientInGame(i) && !IsClientBot(i) && !IsClientAdm(i) && !IsClientReplay(i))
{
if (IsClientActive(i) && IsPlayerAlive(i))
{
new Float:currentangels[3];
GetClientEyeAngles(i, currentangels);
if (currentangels[0] == client_angels[i][0] && currentangels[1] == client_angels[i][1] && currentangels[2] == client_angels[i][2])
{
client_points[i] = client_points[i]+10;
}
else if (client_points[i] > 0)
{
client_points[i] = client_points[i]-10;
}
spec_points[i] = 0;
client_angels[i] = currentangels;
if (client_points[i] >= GetConVarInt(cv_pointlimit))
{
PrintToChatAll("\x04%N\x01 kicked out of the game for been afk too long", i);
KickClient(i, "You have been kicked due beeing afk");
}
}
else if (!IsClientActive(i))
{
spec_points[i] = spec_points[i]+10;
if (spec_points[i] >= GetConVarInt(cv_speclimit))
{
PrintToChatAll("\x04%N\x01 kicked out of the game for been afk too long", i);
KickClient(i, "You have been kicked due beeing afk too long");
}
}
}
i++;
}
}
IsClientBot(client)
{
if (IsClientInGame(client))
{
new String:auth[255];
GetClientAuthString(client, auth, sizeof(auth));
if (strcmp(auth, "BOT", false) == 0)
{
return true;
}
else
{
return false;
}
}
return false;
}
IsClientActive(client)
{
new team = GetClientTeam(client);
if (team == 2 || team == 3)
{
return true;
}
return false;
}
IsClientAdm(client)
{
new AdminId:admid = GetUserAdmin(client);
if (admid != INVALID_ADMIN_ID)
{
return GetAdminFlag(admid, AdminFlag:Admin_Custom1);
}
else
{
return false;
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,254 @@
// Keyvalue Storage
//#define ANTITK_KV_FILE "AntiTK.txt"
new String:AntiTK_DataFile[PLATFORM_MAX_PATH];
new Handle:g_kv_AntiTK = INVALID_HANDLE;
new LastTKPurge = 0;
new String:arrayPlayerIDs[MAXPLAYERS + 1][MAX_NETWORKID_LENGTH];
// Create KeyValue Data Path.
BuildKeyValuePath()
{
// Build Data File Path
BuildPath(Path_SM, AntiTK_DataFile, sizeof(AntiTK_DataFile), "data/AntiTK.txt");
LogAction(0, -1, "[Anti-TK Manager] Data File: %s", AntiTK_DataFile);
}
// Read All TKer Information from Keyvalue file.
ReadTKers()
{
LogDebug(false, "ReadTKers - Reading all TK'ers from Keyvalue file: %s", AntiTK_DataFile);
if (g_kv_AntiTK == INVALID_HANDLE)
{
LogDebug(false, "ReadTKers - Keyvalues Handle is invalid (May not have been read yet)");
g_kv_AntiTK = CreateKeyValues("Anti-TK");
}
else
LogDebug(false, "ReadTKers - Keyvalues Handle is valid (File has probably already been read?)");
FileToKeyValues(g_kv_AntiTK, AntiTK_DataFile);
}
SaveTKFile(Handle:file_handle)
{
// Safety Precation?
KvRewind(file_handle);
KeyValuesToFile(file_handle, AntiTK_DataFile);
}
// Save All TKer data to Keyvalue file.
SaveTKers()
{
LogDebug(false, "SaveTKers - Saving all TK'ers to Keyvalue file: %s", AntiTK_DataFile);
if (g_kv_AntiTK == INVALID_HANDLE)
LogDebug(false, "SaveTKers - Keyvalues Handle is invalid? (This should probably not happen)");
else
SaveTKFile(g_kv_AntiTK);
CloseHandle(g_kv_AntiTK);
g_kv_AntiTK = INVALID_HANDLE;
}
// Purge Old TK'er data that has expired?
bool:PurgeTKerData(const purgetime, checklast = false)
{
new time = GetTime();
#if _DEBUG >= 2
LogDebug(false, "PurgeTKerData - Checking Old TKer data. LastPurge: %d Time: %d", LastTKPurge, time);
#endif
if (checklast)
if ((time - LastTKPurge) >= purgetime)
{
LogDebug(false, "PurgeTKerData - Old TKer data being purged: LastPurge: %d Time: %d", LastTKPurge, time);
}
else
return false;
if (g_kv_AntiTK == INVALID_HANDLE)
{
LogDebug(false, "PurgeTKerData - Keyvalues Handle is invalid? Attempting to read file?");
ReadTKers();
}
LogDebug(false, "PurgeTKerData - TKer's are being checked.");
new bool:check_record = true;
decl savetime;
decl String:steam_id[MAX_NETWORKID_LENGTH];
if (KvGotoFirstSubKey(g_kv_AntiTK))
{
LogDebug(false, "PurgeTKerData - Starting loop");
do
{
check_record = true;
do
{
savetime = KvGetNum(g_kv_AntiTK, "saved");
LogDebug(false, "PurgeTKerData - Record Retrieved: Time: %i Saved: %i", time, savetime);
if (savetime > 0)
{
if ((time - savetime) >= purgetime)
{
if ( KvGetSectionName(g_kv_AntiTK, steam_id, sizeof(steam_id)) )
LogDebug(false, "PurgeTKerData - Deleting record %s.", steam_id);
else
LogDebug(false, "PurgeTKerData - Deleting record... could not retrieve record name");
if (KvDeleteThis(g_kv_AntiTK) < 1)
check_record = false;
}
else
check_record = false;
}
else
check_record = false;
} while (check_record);
} while(KvGotoNextKey(g_kv_AntiTK));
}
else
LogDebug(false, "PurgeTKerData - Could not get first Key?");
LastTKPurge = time;
SaveTKFile(g_kv_AntiTK);
return true;
}
// Retrieve stored TKer data for players steamid.
bool:RetrieveTKer(client)
{
// Retrieve Steam ID
GetClientAuthString(client, arrayPlayerIDs[client], MAX_NETWORKID_LENGTH);
#if _DEBUG >= 2
LogDebug(false, "RetrieveTKer - Reading TK'er data for: %s", arrayPlayerIDs[client]);
#endif
if (g_kv_AntiTK == INVALID_HANDLE)
{
LogDebug(false, "RetrieveTKer - Keyvalues Handle is invalid? (This should not happen)");
ReadTKers();
}
// Rewind File
KvRewind(g_kv_AntiTK);
if (KvJumpToKey(g_kv_AntiTK, arrayPlayerIDs[client]))
{
#if _DEBUG >= 2
LogDebug(false, "RetrieveTKer - Found Key: %s", arrayPlayerIDs[client]);
#endif
arrayPlayerStats[client][STAT_KARMA] = KvGetNum(g_kv_AntiTK, "karma");
arrayPlayerStats[client][STAT_KILLS] = KvGetNum(g_kv_AntiTK, "kills");
arrayPlayerStats[client][STAT_TEAM_KILLS] = KvGetNum(g_kv_AntiTK, "tks");
KvRewind(g_kv_AntiTK);
return true;
}
else
{
#if _DEBUG >= 2
LogDebug(false, "RetrieveTKer - Failed? Key Not Found.");
#endif
return false;
}
}
bool:SaveTKer(client)
{
#if _DEBUG >= 2
LogDebug(false, "SaveTKer - Saving TK'er data for: %s", arrayPlayerIDs[client]);
#endif
if (g_kv_AntiTK == INVALID_HANDLE)
{
LogDebug(false, "SaveTKer - Keyvalues Handle is invalid? (This should not happen)");
ReadTKers();
}
// Safety Precaution
KvRewind(g_kv_AntiTK);
if (!StrEqual(arrayPlayerIDs[client], ""))
{
KvJumpToKey(g_kv_AntiTK,arrayPlayerIDs[client],true);
// Store Values
KvSetNum(g_kv_AntiTK, "karma", arrayPlayerStats[client][STAT_KARMA]);
KvSetNum(g_kv_AntiTK, "kills", arrayPlayerStats[client][STAT_KILLS]);
KvSetNum(g_kv_AntiTK, "tks", arrayPlayerStats[client][STAT_TEAM_KILLS]);
KvSetNum(g_kv_AntiTK, "saved", GetTime());
SaveTKFile(g_kv_AntiTK);
arrayPlayerIDs[client] = "";
return true;
}
return false;
}
bool:RemoveTKer(const String:steamid[])
{
LogDebug(false, "RemoveTKer - Removing TK'er data for: %s", steamid);
if (g_kv_AntiTK == INVALID_HANDLE)
{
LogDebug(false, "RemoveTKer - Keyvalues Handle is invalid? (This should not happen)");
ReadTKers();
}
if (KvGotoFirstSubKey(g_kv_AntiTK))
{
if (KvJumpToKey(g_kv_AntiTK, steamid))
{
KvDeleteThis(g_kv_AntiTK);
KvRewind(g_kv_AntiTK);
return true;
}
else
return false;
}
else
return false;
}
/*
DeleteAllTKers()
{
#if _DEBUG
LogAction(0, -1, "DeleteAllTKers - Removing all TKer data.");
#endif
if (g_kv_AntiTK == INVALID_HANDLE)
{
#if _DEBUG
LogAction(0, -1, "DeleteAllTKers - Keyvalues Handle is invalid? (This should not happen)");
#endif
}
if (!KvGotoFirstSubKey(g_kv_AntiTK))
{
return;
}
for (;;)
{
decl String:name[4];
KvGetString(g_kv_AntiTK, name, sizeof(name))
if (name[0] == '\0')
{
if (KvDeleteThis(g_kv_AntiTK) < 1)
{
break;
}
} else if (!KvGotoNextKey(g_kv_AntiTK)) {
break;
}
}
}
*/

@ -0,0 +1,69 @@
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
#include <mapchooser>
new Handle:hTimer = INVALID_HANDLE;
public Plugin:myinfo =
{
name = "Ask4MapChange",
author = "Chefe",
description = "",
version = "1.0",
url = "<- URL ->"
}
public OnPluginStart()
{
}
public OnMapStart()
{
if (hTimer == INVALID_HANDLE)
{
hTimer = CreateTimer(3600.0, Timer_Ask4Change, _, TIMER_REPEAT);
}
else
{
CloseHandle(hTimer);
hTimer = CreateTimer(3600.0, Timer_Ask4Change, _, TIMER_REPEAT);
}
}
public Action:Timer_Ask4Change(Handle:timer)
{
if (IsVoteInProgress())
{
return;
}
new Handle:menu = CreateMenu(Handle_Ask4ChangeMenu);
SetMenuTitle(menu, "Change map? (next vote in 60min)");
AddMenuItem(menu, "dismiss", "Press-only-1-noobing", ITEMDRAW_DISABLED);
AddMenuItem(menu, "no", "No");
AddMenuItem(menu, "yes", "Yes");
SetMenuExitButton(menu, false);
VoteMenuToAll(menu, 20);
}
public Handle_Ask4ChangeMenu(Handle:menu, MenuAction:action, param1, param2)
{
if (action == MenuAction_End)
{
/* This is called after VoteEnd */
CloseHandle(menu);
} else if (action == MenuAction_VoteEnd) {
/* 0=yes, 1=no */
if (param1 == 2)
{
PrintToChatAll("Vote succeed. Starting mapvote ...");
InitiateMapChooserVote(MapChange_Instant);
}
else
{
PrintToChatAll("Vote failed. Next Mapchange vote in 60 minutes.");
}
}
}

@ -0,0 +1,42 @@
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
new Handle:cv_ip, Handle:cv_port;
public Plugin:myinfo =
{
name = "Ask4Connect",
author = "Chefe",
description = "Redirect your players (if they want) to another server",
version = "1.0",
url = "www.chefgaming.de"
}
public OnPluginStart()
{
cv_ip = CreateConVar("sm_a4c_ip", "0.0.0.0", "Set to witch IP the client should be asked to connect to.");
cv_port = CreateConVar("sm_a4c_port", "27015", "Set the port the client should be asked to connect to.");
AutoExecConfig(true);
}
public OnClientConnected(client)
{
CreateTimer(10.0, DisplayAsk, client);
}
public Action:DisplayAsk(Handle:timer, any:data)
{
if (IsClientConnected(data))
{
new String:ip[50];
GetConVarString(cv_ip, ip, sizeof(ip));
new String:port[10];
GetConVarString(cv_port, port, sizeof(port));
new String:destination[50];
Format(destination, sizeof(destination), "%s:%s", ip, port);
DisplayAskConnectBox(data, 120.0, destination);
PrintToChat(data, "\x04Our server has moved to an other IP address, pls use the connection box displayed now upper left and save the new server IP: %s!!!", destination);
}
}

@ -0,0 +1,75 @@
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
#define AI_VERSION "1.0"
new Handle:dbcon = INVALID_HANDLE;
public Plugin:myinfo =
{
name = "Autoinvite Tracking",
author = "Chefe",
description = "Tracks players for AI",
version = AI_VERSION,
url = "www.chefgaming.de"
}
public OnPluginStart()
{
SQL_TConnect(DBInit, "default");
}
public DBInit(Handle:owner, Handle:hndl, const String:error[], any:data)
{
if (hndl == INVALID_HANDLE)
{
LogError("[AI] Database connection failed: %s", error);
SetFailState("Unable to connect to database, look for more infos in the error logs!");
return;
}
dbcon = hndl;
}
public OnClientAuthorized(client, const String:auth[])
{
if (strcmp(auth, "BOT", false) != 0 && dbcon != INVALID_HANDLE)
{
new String:sqlstring[255];
Format(sqlstring, sizeof(sqlstring), "SELECT id FROM autoinvite_player WHERE steamid = '%s'", auth);
SQL_TQuery(dbcon, InitDBCheck1, sqlstring, client);
}
}
public InitDBCheck1(Handle:owner, Handle:hndl, const String:error[], any:data)
{
if (hndl == INVALID_HANDLE || strlen(error) > 0)
{
LogError("AI Query error: %s", error);
return;
}
if (IsClientConnected(data))
{
if (SQL_GetRowCount(hndl) == 0)
{
new String:auth[100];
GetClientAuthString(data, auth, sizeof(auth));
new String:createsql[250];
Format(createsql, sizeof(createsql), "INSERT INTO autoinvite_player(steamid) VALUES ('%s')", auth);
SQL_TQuery(dbcon, EmptyResultSet, createsql);
}
}
}
public EmptyResultSet(Handle:owner, Handle:hndl, const String:error[], any:data)
{
if (hndl == INVALID_HANDLE || strlen(error) > 0)
{
LogError("LP Query error: %s", error);
return;
}
}

@ -0,0 +1,152 @@
#include <sourcemod>
#include <tf2>
#include <tf2_stocks>
#include <clients>
#include <sdktools_functions>
#define AFA_VERSION "1.5.8"
new bool:temp_disabled = false
new Handle:h_enabled, Handle:h_time, Handle:h_admins_only;
new Float:client_orgin[MAXPLAYERS][3];
new Float:client_angels[MAXPLAYERS][3];
new Handle:h_sudden_death, Handle:h_re, Handle:h_teleport_enabled,
Handle:h_flag, Handle:h_tags;
new AdminFlag:cflag;
public Plugin:myinfo =
{
name = "Autorespawn for Admins",
author = "Chefe",
description = "Respawn(&Teleport) Admins/Players in a varaible amount of time.",
version = AFA_VERSION,
url = "http://forums.alliedmods.net/showthread.php?t=110918"
}
public OnPluginStart()
{
HookEvent("player_death", Event_PlayerDeath)
HookEvent("teamplay_round_win", Event_TeamplayRoundWin)
HookEvent("teamplay_round_start", Event_TeamplayRoundStart)
HookEvent("teamplay_suddendeath_begin", Event_SuddendeathBegin)
h_enabled = CreateConVar("sm_instant_enabled", "1", "Enable or Disable Instant Respawn for Admins.");
h_time = CreateConVar("sm_instant_time", "0.1", "Set the Instant Respawn Time for Admins.", _, true, 0.1);
h_admins_only = CreateConVar("sm_instant_admins_only", "1", "Set is instant respawn only enabled for admins or for all.");
h_sudden_death = CreateConVar("sm_instant_sudeath", "1", "Enable or Disable the Respawn in Sudden Death.");
h_re = CreateConVar("sm_instant_re", "1", "Enable or Disable the Respawn on Roundend");
h_teleport_enabled = CreateConVar("sm_instant_teleport", "0", "Enable or Disable teleport Player to ther old Position");
h_flag = CreateConVar("sm_instant_flag", "t", "Set the flag witch admins must have to use instant respawn.");
CreateConVar("sm_instant_version", AFA_VERSION, "Autorespawn Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
AutoExecConfig(true);
new String:flagcvar[1];
GetConVarString(h_flag, flagcvar, sizeof(flagcvar));
FindFlagByChar(flagcvar[0], cflag);
h_tags = FindConVar("sv_tags");
HookConVarChange(h_tags, OnTagsChange);
CheckForPluginTag(h_tags, "respawntimes");
}
CheckForPluginTag(Handle:convar, String:tag[])
{
new String:oldtags[256];
GetConVarString(convar, oldtags, sizeof(oldtags));
if (StrContains(oldtags, tag, false) == -1)
{
new String:newtags[256];
Format(newtags, sizeof(newtags), "%s,%s", oldtags, tag);
SetConVarString(convar, newtags, _, true);
}
}
RemovePluginTag(Handle:convar, String:tag[])
{
new String:oldtags[256];
GetConVarString(convar, oldtags, sizeof(oldtags));
if (StrContains(oldtags, tag, false) != -1)
{
ReplaceString(oldtags, sizeof(oldtags), tag, "", false);
SetConVarString(convar, oldtags, _, true);
}
}
public OnPluginEnd()
{
RemovePluginTag(h_tags, "respawntimes");
}
public OnTagsChange(Handle:cvar, const String:oldVal[], const String:newVal[])
{
CheckForPluginTag(h_tags, "respawntimes");
}
public Event_SuddendeathBegin(Handle:event,const String:name[],bool:dontBroadcast)
{
if (!GetConVarBool(h_sudden_death))
{
temp_disabled = true;
}
}
public Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
new client_userid = GetEventInt(event, "userid");
new client = GetClientOfUserId(client_userid);
new AdminId:admin_id = GetUserAdmin(client);
if (GetConVarBool(h_teleport_enabled))
{
GetClientAbsOrigin(client, client_orgin[client]);
GetClientAbsAngles(client, client_angels[client]);
}
new Float:time = GetConVarFloat(h_time);
new death_flags = GetEventInt(event, "death_flags");
if (GetConVarBool(h_admins_only))
{
if (admin_id != INVALID_ADMIN_ID && IsClientInGame(client) && GetConVarBool(h_enabled) && !temp_disabled && !(death_flags & 32) && GetAdminFlag(admin_id, cflag, AdmAccessMode:Access_Effective))
{
CreateTimer(time, RespawnClient, client)
}
}
else
{
if (IsClientInGame(client) && GetConVarBool(h_enabled) && !temp_disabled && !(death_flags & 32))
{
CreateTimer(time, RespawnClient, client)
}
}
}
public Event_TeamplayRoundWin(Handle:event, const String:name[], bool:dontBroadcast)
{
if (!GetConVarBool(h_re))
{
temp_disabled = true;
}
}
public Event_TeamplayRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
temp_disabled = false;
}
public Action:RespawnClient(Handle:timer, any:client)
{
if (IsClientInGame(client))
{
TF2_RespawnPlayer(client);
if (GetConVarBool(h_teleport_enabled))
{
TeleportEntity(client, client_orgin[client], client_angels[client], NULL_VECTOR);
}
}
}

@ -0,0 +1,138 @@
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
#include <clients>
#include <cstrike>
#include <sdktools_functions>
#define AFA_VERSION "1.5.5"
new bool:temp_disabled = false
new Handle:h_enabled, Handle:h_time, Handle:h_admins_only;
new Float:client_orgin[MAXPLAYERS][3];
new Float:client_angels[MAXPLAYERS][3];
new Handle:h_teleport_enabled, Handle:h_flag;
new AdminFlag:cflag;
public Plugin:myinfo =
{
name = "Autorespawn for Admins",
author = "Chefe",
description = "Respawn(&Teleport) Admins/Players in a varaible amount of time.",
version = AFA_VERSION,
url = "http://forums.alliedmods.net/showthread.php?t=110918"
}
public OnPluginStart()
{
HookEvent("player_death", Event_PlayerDeath)
HookEvent("player_class", Event_PlayerClass);
HookEvent("player_team", Event_PlayerTeam);
h_enabled = CreateConVar("sm_instant_enabled", "1", "Enable or Disable Instant Respawn for Admins.");
h_time = CreateConVar("sm_instant_time", "0.1", "Set the Instant Respawn Time.", _, true, 0.1);
h_admins_only = CreateConVar("sm_instant_admins_only", "1", "Set is instant respawn only enabled for admins or for all.");
h_teleport_enabled = CreateConVar("sm_instant_teleport", "0", "Enable or Disable teleport Player to ther old Position");
h_flag = CreateConVar("sm_instant_flag", "t", "Set the flag witch admins must have to use instant respawn.");
CreateConVar("sm_instant_version", AFA_VERSION, "Autorespawn Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
AutoExecConfig(true);
new String:flagcvar[1];
GetConVarString(h_flag, flagcvar, sizeof(flagcvar));
FindFlagByChar(flagcvar[0], cflag);
}
public Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
new client_userid = GetEventInt(event, "userid");
new client = GetClientOfUserId(client_userid);
new AdminId:admin_id = GetUserAdmin(client);
if (GetConVarBool(h_teleport_enabled))
{
GetClientAbsOrigin(client, client_orgin[client]);
GetClientAbsAngles(client, client_angels[client]);
}
new Float:time = GetConVarFloat(h_time);
if (GetConVarBool(h_admins_only))
{
if (admin_id != INVALID_ADMIN_ID && IsClientInGame(client) && GetConVarBool(h_enabled) && !temp_disabled && GetAdminFlag(admin_id, cflag, AdmAccessMode:Access_Effective))
{
CreateTimer(time, RespawnClient, client)
}
}
else
{
if (IsClientInGame(client) && GetConVarBool(h_enabled) && !temp_disabled)
{
CreateTimer(time, RespawnClient, client)
}
}
}
public Event_PlayerClass(Handle:event, const String:name[], bool:dontBroadcast)
{
new client_userid = GetEventInt(event, "userid");
new client = GetClientOfUserId(client_userid);
//new team = GetEventInt(event, "team");
new AdminId:admin_id = GetUserAdmin(client);
new Float:time = GetConVarFloat(h_time);
if (GetConVarBool(h_admins_only))
{
if (admin_id != INVALID_ADMIN_ID && IsClientInGame(client) && GetConVarBool(h_enabled) && !temp_disabled && GetAdminFlag(admin_id, cflag, AdmAccessMode:Access_Effective))
{
CreateTimer(time, RespawnClient, client)
}
}
else
{
if (IsClientInGame(client) && GetConVarBool(h_enabled) && !temp_disabled)
{
CreateTimer(time, RespawnClient, client)
}
}
}
public Event_PlayerTeam(Handle:event, const String:name[], bool:dontBroadcast)
{
new client_userid = GetEventInt(event, "userid");
new client = GetClientOfUserId(client_userid);
new team = GetEventInt(event, "team");
new AdminId:admin_id = GetUserAdmin(client);
new Float:time = GetConVarFloat(h_time);
if (GetConVarBool(h_admins_only))
{
if (team > 0 && admin_id != INVALID_ADMIN_ID && IsClientInGame(client) && GetConVarBool(h_enabled) && !temp_disabled && GetAdminFlag(admin_id, cflag, AdmAccessMode:Access_Effective))
{
CreateTimer(time, RespawnClient, client)
}
}
else
{
if (team > 0 && IsClientInGame(client) && GetConVarBool(h_enabled) && !temp_disabled)
{
CreateTimer(time, RespawnClient, client)
}
}
}
public Action:RespawnClient(Handle:timer, any:client)
{
if (IsClientInGame(client))
{
CS_RespawnPlayer(client);
if (GetConVarBool(h_teleport_enabled))
{
TeleportEntity(client, client_orgin[client], client_angels[client], NULL_VECTOR);
}
}
}

@ -0,0 +1,115 @@
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
#include <sdktools_functions>
#include <tf2>
new Handle:cv_enabled, Handle:cv_unbalancelimit;
new bool:tmp_disabled = false;
public Plugin:myinfo =
{
name = "Automated Teambalancer",
author = "Chefe",
description = "Balances teams",
version = "1.0",
url = "www.chefgaming.de"
}
public OnPluginStart()
{
cv_enabled = CreateConVar("sm_atb_enabled", "1", "Enabled/Disable the ATB");
cv_unbalancelimit = CreateConVar("sm_atb_limit", "1", "The max difference beetween the teams");
HookEvent("player_team", Event_PlayerTeam);
}
public OnMapStart()
{
tmp_disabled = false;
}
public OnMapEnd()
{
tmp_disabled = true;
}
public Event_PlayerTeam(Handle:event, const String:name[], bool:dontBroadcast)
{
CheckTeams();
}
public OnClientDisconnect(client)
{
CheckTeams();
}
CheckTeams()
{
if (!tmp_disabled && GetConVarBool(cv_enabled))
{
new cred = GetTeamClientCount(2);
new cblu = GetTeamClientCount(3);
new dif = cred-cblu;
if (dif > GetConVarInt(cv_unbalancelimit))
{
DoClientMove(GetRandomPlayer(2), 3);
}
else if (dif < -GetConVarInt(cv_unbalancelimit))
{
DoClientMove(GetRandomPlayer(3), 2);
}
}
}
public Action:TmpDis(Handle:timer, any:client)
{
tmp_disbaled = false;
CheckTeams();
}
public Action:TmpDelay(Handle:timer, any:client)
{
CheckTeams();
}
GetRandomPlayer(team)
{
new client;
new i = 0;
while (i < 1000)
{
client = GetRandomInt(1, GetClientCount(true));
if (IsClientInGame(client) && GetClientTeam(client) == team && !IsClientAdm(client) && !TF2_IsPlayerInDuel(client))
{
break;
}
}
return client;
}
DoClientMove(client, team)
{
new String:teamname[50];
GetTeamName(team, teamname, sizeof(teamname));
tmp_disbaled = true;
ChangeClientTeam(client, team);
PrintToChatAll("\x04%N\x01 was moved to %s for teambalance", client, teamname);
}
IsClientAdm(client)
{
new AdminId:admid = GetUserAdmin(client);
if (admid != INVALID_ADMIN_ID)
{
return GetAdminFlag(admid, AdminFlag:Admin_Custom2);
}
else
{
return false;
}
}

@ -0,0 +1,124 @@
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
#include <adminmenu>
new kickclients[MAXPLAYERS+1];
new banclients[MAXPLAYERS+1];
new muteclients[MAXPLAYERS+1];
new alreadyvoted_kick[MAXPLAYERS+1];
new alreadyvoted_ban[MAXPLAYERS+1];
new alreadyvoted_mute[MAXPLAYERS+1];
public Plugin:myinfo =
{
name = "Basic Votes",
author = "Chefe",
description = "<- Description ->",
version = "1.1",
url = "<- URL ->"
}
public OnPluginStart()
{
RegConsoleCmd("sm_votekick", Command_VoteKick, "Vote for kick a client.")
RegConsoleCmd("sm_voteban", Command_VoteBan, "Vote for ban a client.")
}
public OnClientConnected(client)
{
alreadyvoted_kick[client] = 0;
alreadyvoted_ban[client] = 0;
alreadyvoted_mute[client] = 0;
}
public OnClientDisconnect(client)
{
alreadyvoted_kick[client] = 0;
alreadyvoted_ban[client] = 0;
alreadyvoted_mute[client] = 0;
}
public Action:Command_VoteKick(client, args)
{
new Handle:votekick = CreateMenu(Menu_VoteKick);
SetMenuTitle(votekick, "Select Player to Vote")
AddTargetsToMenu(votekick, 0, true, false);
DisplayMenu(votekick, client, MENU_TIME_FOREVER);
return Plugin_Handled;
}
public Action:Command_VoteBan(client, args)
{
new Handle:voteban = CreateMenu(Menu_VoteBan);
SetMenuTitle(voteban, "Select Player to Vote");
AddTargetsToMenu(voteban, 0, true, false);
DisplayMenu(voteban, client, MENU_TIME_FOREVER);
return Plugin_Handled;
}
public Menu_VoteKick(Handle:menu, MenuAction:action, param1, param2)
{
if (action == MenuAction_Select)
{
new String:info[32];
GetMenuItem(menu, param2, info, sizeof(info));
new client = GetClientOfUserId(StringToInt(info));
new required = (60 * GetClientCount(true) / 100);
if (alreadyvoted_kick[param1] != client)
{
kickclients[client]++;
alreadyvoted_kick[param1] = client;
PrintToChatAll(" [SM] Register votekicks against %N (%i registered, %i required)", client, kickclients[client], required);
}
else
{
PrintToChat(param1, "[SM] You have already voted for %N", client);
}
if (kickclients[client] >= required)
{
KickClient(client, "You are kicked by Vote!");
PrintToChatAll("[SM] Kicked %N by %i votes.", client, kickclients[client]);
}
}
else if (action == MenuAction_End)
{
CloseHandle(menu);
}
}
public Menu_VoteBan(Handle:menu, MenuAction:action, param1, param2)
{
if (action == MenuAction_Select)
{
new String:info[32];
GetMenuItem(menu, param2, info, sizeof(info));
new client = GetClientOfUserId(StringToInt(info));
new required = (60 * GetClientCount(true) / 100);
if (alreadyvoted_ban[param1] != client)
{
banclients[client]++;
alreadyvoted_ban[param1] = client;
PrintToChatAll(" [SM] Register voteban against %N (%i registered, %i required)", client, banclients[client], required);
}
else
{
PrintToChat(param1, "[SM] You have already voted for %N", client);
}
if (banclients[client] >= required)
{
BanClient(client, 3600, BANFLAG_AUTHID, "Voteban.", "You are banned by Vote for %i seconds!");
PrintToChatAll("[SM] Banned %N for %i seconds by %i votes.", client, 3600, kickclients[client]);
}
}
else if (action == MenuAction_End)
{
CloseHandle(menu);
}
}

@ -0,0 +1,734 @@
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
#include <mapchooser>
new Handle:g_NextMap = INVALID_HANDLE;
new Handle:g_ChangeMap = INVALID_HANDLE;
new Handle:g_NominationMap = INVALID_HANDLE;
new Handle:cv_serverid, Handle:cv_lotto;
new price_nomination = 25;
new price_mapvote = 100;
new price_nextmap = 150;
new price_changelevel = 200;
new String:MapchangeTo[100];
public Plugin:myinfo =
{
name = "Beer System",
author = "Chefe",
description = "System that gives Players Points for they Playtime.",
version = "2.4",
url = "www.the-bos.de"
}
public OnPluginStart()
{
CreateTimer(300.0, Abbrechnung, _, TIMER_REPEAT);
RegConsoleCmd("sm_beer", CommandLP, "Shows you your liter Beer!");
cv_serverid = CreateConVar("sm_beer_serverid", "0", "Serverid for remove liter");
cv_lotto = CreateConVar("sm_beer_lotto", "0", "Lotto I/0");
//HookEvent("player_activate", Event_PlayerActivate);
if (GetConVarBool(cv_lotto))
{
CreateTimer(7200.0, LottoZiehung, _, TIMER_REPEAT);
}
if (CheckCon())
{
PrintToServer("[BEER] Connection sucessfull!");
}
else
{
SetFailState("Can't etablish connection to Database");
}
AutoExecConfig(true);
}
public OnMapStart()
{
MapchangeTo = NULL_STRING;
g_NextMap = BuildMapMenu(Menu_NextMap);
g_ChangeMap = BuildMapMenu(Menu_ChangeMap);
g_NominationMap = BuildMapMenu(Menu_NominateMap);
}
public OnMapEnd()
{
if (g_NextMap != INVALID_HANDLE)
{
CloseHandle(g_NextMap);
g_NextMap = INVALID_HANDLE;
}
if (g_ChangeMap != INVALID_HANDLE)
{
CloseHandle(g_ChangeMap);
g_ChangeMap = INVALID_HANDLE;
}