-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cda1e5a
commit a274f6f
Showing
48 changed files
with
2,856 additions
and
2,545 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.idea/ | ||
/addons/sourcemod/plugins/* | ||
!addons/sourcemod/plugins/.gitkeep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
sudo: false | ||
language: c | ||
|
||
addons: | ||
apt_packages: | ||
- lib32stdc++6 | ||
|
||
env: | ||
- SOURCEMOD=1.7 | ||
- SOURCEMOD=1.8 | ||
|
||
before_script: | ||
- mkdir build && cd build | ||
- wget "http://www.sourcemod.net/latest.php?version=$SOURCEMOD&os=linux" -O sourcemod-$SOURCEMOD-linux.tar.gz | ||
- tar -xzf sourcemod-$SOURCEMOD-linux.tar.gz | ||
- cd addons/sourcemod/scripting | ||
- chmod +x spcomp | ||
- cp -R $TRAVIS_BUILD_DIR/addons/sourcemod/scripting/* . | ||
- wget "https://github.com/GameConnect/IRCRelay/raw/master/addons/sourcemod/scripting/include/ircrelay.inc" -O include/ircrelay.inc | ||
|
||
script: ./compile.sh atac.sp atac-beacon.sp atac-blind.sp atac-css.sp atac-dods.sp atac-drug.sp atac-fire.sp atac-freeze.sp atac-ins.sp atac-ircrelay.sp atac-slap.sp atac-slay.sp atac-timebomb.sp atac-uberslap.sp | ||
|
||
before_deploy: | ||
- cp -R compiled/* $TRAVIS_BUILD_DIR/addons/sourcemod/plugins/ | ||
- cd $TRAVIS_BUILD_DIR | ||
- tar -czf release.tar.gz addons/ | ||
|
||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: AV2KA95YZ9HLZExkSxZavQGptQMKUNwu6bgALbEor4Pevnbnvq+XjMemfRBKTz0NjRwtREKlllW0b6Ppj0iTx1a5BWTHjuK73n2oUOfKuhQDc1N5ycnoT38hzqlk3s5u870YOTzxCVrzGfnw+ujs+hVBmdyuSmHr2yWPkIN9DJ8= | ||
file: release.tar.gz | ||
skip_cleanup: true | ||
on: | ||
tags: true | ||
condition: $SOURCEMOD = 1.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Advanced Team Attack Control for SourceMod | ||
Advanced Team Attack Control for SourceMod |
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,110 +1,112 @@ | ||
#pragma semicolon 1 | ||
|
||
#include <sourcemod> | ||
#include <sdktools> | ||
|
||
#undef REQUIRE_PLUGIN | ||
#include <atac> | ||
|
||
#pragma newdecls required | ||
#pragma semicolon 1 | ||
|
||
#define SOUND_BLIP "buttons/blip1.wav" | ||
|
||
public Plugin:myinfo = | ||
public Plugin myinfo = | ||
{ | ||
name = "ATAC - Beacon Punishment", | ||
author = "GameConnect", | ||
description = "Advanced Team Attack Control", | ||
version = ATAC_VERSION, | ||
url = "http://www.gameconnect.net" | ||
name = "ATAC - Beacon Punishment", | ||
author = "GameConnect", | ||
description = "Advanced Team Attack Control", | ||
version = ATAC_VERSION, | ||
url = "http://www.gameconnect.net" | ||
}; | ||
|
||
|
||
/** | ||
* Globals | ||
*/ | ||
new g_iBeamSprite; | ||
new g_iBlueColor[4] = { 75, 75, 255, 255}; | ||
new g_iGreenColor[4] = { 75, 255, 75, 255}; | ||
new g_iGreyColor[4] = {128, 128, 128, 255}; | ||
new g_iHaloSprite; | ||
new g_iRedColor[4] = {255, 75, 75, 255}; | ||
new Handle:g_hRadius; | ||
int g_iBeamSprite; | ||
int g_iBlueColor[4] = { 75, 75, 255, 255}; | ||
int g_iGreenColor[4] = { 75, 255, 75, 255}; | ||
int g_iGreyColor[4] = {128, 128, 128, 255}; | ||
int g_iHaloSprite; | ||
int g_iRedColor[4] = {255, 75, 75, 255}; | ||
ConVar g_hRadius; | ||
|
||
|
||
/** | ||
* Plugin Forwards | ||
*/ | ||
public OnPluginStart() | ||
public void OnPluginStart() | ||
{ | ||
// Create convars | ||
g_hRadius = CreateConVar("atac_beacon_radius", "375", "ATAC Beacon Radius", FCVAR_PLUGIN); | ||
|
||
// Load translations | ||
LoadTranslations("atac-beacon.phrases"); | ||
|
||
if(LibraryExists("atac")) | ||
OnLibraryAdded("atac"); | ||
// Create convars | ||
g_hRadius = CreateConVar("atac_beacon_radius", "375", "ATAC Beacon Radius"); | ||
|
||
// Load translations | ||
LoadTranslations("atac-beacon.phrases"); | ||
|
||
if (LibraryExists("atac")) { | ||
OnLibraryAdded("atac"); | ||
} | ||
} | ||
|
||
public OnMapStart() | ||
public void OnMapStart() | ||
{ | ||
g_iBeamSprite = PrecacheModel("materials/sprites/laser.vmt"); | ||
g_iHaloSprite = PrecacheModel("materials/sprites/halo01.vmt"); | ||
PrecacheSound(SOUND_BLIP, true); | ||
g_iBeamSprite = PrecacheModel("materials/sprites/laser.vmt"); | ||
g_iHaloSprite = PrecacheModel("materials/sprites/halo01.vmt"); | ||
|
||
PrecacheSound(SOUND_BLIP, true); | ||
} | ||
|
||
public OnLibraryAdded(const String:name[]) | ||
public void OnLibraryAdded(const char[] name) | ||
{ | ||
if(!StrEqual(name, "atac")) | ||
return; | ||
|
||
decl String:sName[32]; | ||
Format(sName, sizeof(sName), "%T", "Beacon", LANG_SERVER); | ||
ATAC_RegisterPunishment(sName, AtacPunishment_Beacon); | ||
if (!StrEqual(name, "atac")) { | ||
return; | ||
} | ||
|
||
char sName[32]; | ||
Format(sName, sizeof(sName), "%T", "Beacon", LANG_SERVER); | ||
ATAC_RegisterPunishment(sName, AtacPunishment_Beacon); | ||
} | ||
|
||
|
||
/** | ||
* ATAC Punishments | ||
*/ | ||
public AtacPunishment_Beacon(victim, attacker) | ||
public void AtacPunishment_Beacon(int victim, int attacker) | ||
{ | ||
PrintToChatAll("%c[ATAC]%c %t", CLR_GREEN, CLR_DEFAULT, "Beaconed", attacker, ATAC_GetInfo(attacker, AtacInfo_Kills), ATAC_GetSetting(AtacSetting_KillsLimit)); | ||
CreateTimer(1.0, Timer_Beacon, attacker, TIMER_REPEAT); | ||
PrintToChatAll("%c[ATAC]%c %t", CLR_GREEN, CLR_DEFAULT, "Beaconed", attacker, ATAC_GetInfo(attacker, AtacInfo_Kills), ATAC_GetSetting(AtacSetting_KillsLimit)); | ||
|
||
CreateTimer(1.0, Timer_Beacon, attacker, TIMER_REPEAT); | ||
} | ||
|
||
|
||
/** | ||
* Timers | ||
*/ | ||
public Action:Timer_Beacon(Handle:timer, any:client) | ||
public Action Timer_Beacon(Handle timer, any client) | ||
{ | ||
if(!IsClientInGame(client) || !IsPlayerAlive(client)) | ||
return Plugin_Stop; | ||
decl Float:flPos[3]; | ||
GetClientAbsOrigin(client, flPos); | ||
flPos[2] += 10; | ||
new Float:flRadius = GetConVarFloat(g_hRadius); | ||
TE_SetupBeamRingPoint(flPos, 10.0, flRadius, g_iBeamSprite, g_iHaloSprite, 0, 15, 0.5, 5.0, 0.0, g_iGreyColor, 10, 0); | ||
TE_SendToAll(); | ||
switch(GetClientTeam(client)) | ||
{ | ||
case 2: | ||
TE_SetupBeamRingPoint(flPos, 10.0, flRadius, g_iBeamSprite, g_iHaloSprite, 0, 10, 0.6, 10.0, 0.5, g_iRedColor, 10, 0); | ||
case 3: | ||
TE_SetupBeamRingPoint(flPos, 10.0, flRadius, g_iBeamSprite, g_iHaloSprite, 0, 10, 0.6, 10.0, 0.5, g_iBlueColor, 10, 0); | ||
default: | ||
TE_SetupBeamRingPoint(flPos, 10.0, flRadius, g_iBeamSprite, g_iHaloSprite, 0, 10, 0.6, 10.0, 0.5, g_iGreenColor, 10, 0); | ||
} | ||
TE_SendToAll(); | ||
GetClientEyePosition(client, flPos); | ||
EmitAmbientSound(SOUND_BLIP, flPos, client, SNDLEVEL_RAIDSIREN); | ||
return Plugin_Continue; | ||
} | ||
if (!IsClientInGame(client) || !IsPlayerAlive(client)) { | ||
return Plugin_Stop; | ||
} | ||
|
||
float flPos[3]; | ||
GetClientAbsOrigin(client, flPos); | ||
flPos[2] += 10; | ||
|
||
float flRadius = g_hRadius.FloatValue; | ||
TE_SetupBeamRingPoint(flPos, 10.0, flRadius, g_iBeamSprite, g_iHaloSprite, 0, 15, 0.5, 5.0, 0.0, g_iGreyColor, 10, 0); | ||
TE_SendToAll(); | ||
|
||
switch (GetClientTeam(client)) { | ||
case 2: | ||
TE_SetupBeamRingPoint(flPos, 10.0, flRadius, g_iBeamSprite, g_iHaloSprite, 0, 10, 0.6, 10.0, 0.5, g_iRedColor, 10, 0); | ||
case 3: | ||
TE_SetupBeamRingPoint(flPos, 10.0, flRadius, g_iBeamSprite, g_iHaloSprite, 0, 10, 0.6, 10.0, 0.5, g_iBlueColor, 10, 0); | ||
default: | ||
TE_SetupBeamRingPoint(flPos, 10.0, flRadius, g_iBeamSprite, g_iHaloSprite, 0, 10, 0.6, 10.0, 0.5, g_iGreenColor, 10, 0); | ||
} | ||
|
||
TE_SendToAll(); | ||
|
||
GetClientEyePosition(client, flPos); | ||
EmitAmbientSound(SOUND_BLIP, flPos, client, SNDLEVEL_RAIDSIREN); | ||
|
||
return Plugin_Continue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,82 @@ | ||
#pragma semicolon 1 | ||
|
||
#include <sourcemod> | ||
#include <sdktools> | ||
|
||
#undef REQUIRE_PLUGIN | ||
#include <atac> | ||
|
||
public Plugin:myinfo = | ||
#pragma newdecls required | ||
#pragma semicolon 1 | ||
|
||
public Plugin myinfo = | ||
{ | ||
name = "ATAC - Blind Punishment", | ||
author = "GameConnect", | ||
description = "Advanced Team Attack Control", | ||
version = ATAC_VERSION, | ||
url = "http://www.gameconnect.net" | ||
name = "ATAC - Blind Punishment", | ||
author = "GameConnect", | ||
description = "Advanced Team Attack Control", | ||
version = ATAC_VERSION, | ||
url = "http://www.gameconnect.net" | ||
}; | ||
|
||
|
||
/** | ||
* Globals | ||
*/ | ||
new Handle:g_hAmount; | ||
ConVar g_hAmount; | ||
|
||
|
||
/** | ||
* Plugin Forwards | ||
*/ | ||
public OnPluginStart() | ||
public void OnPluginStart() | ||
{ | ||
// Create convars | ||
g_hAmount = CreateConVar("atac_blind_amount", "255", "ATAC Blind Amount", FCVAR_PLUGIN); | ||
|
||
// Load translations | ||
LoadTranslations("atac-blind.phrases"); | ||
|
||
if(LibraryExists("atac")) | ||
OnLibraryAdded("atac"); | ||
// Create convars | ||
g_hAmount = CreateConVar("atac_blind_amount", "255", "ATAC Blind Amount"); | ||
|
||
// Load translations | ||
LoadTranslations("atac-blind.phrases"); | ||
|
||
if (LibraryExists("atac")) { | ||
OnLibraryAdded("atac"); | ||
} | ||
} | ||
|
||
public OnLibraryAdded(const String:name[]) | ||
public void OnLibraryAdded(const char[] name) | ||
{ | ||
if(!StrEqual(name, "atac")) | ||
return; | ||
|
||
decl String:sName[32]; | ||
Format(sName, sizeof(sName), "%T", "Blind", LANG_SERVER); | ||
ATAC_RegisterPunishment(sName, AtacPunishment_Blind); | ||
if (!StrEqual(name, "atac")) { | ||
return; | ||
} | ||
|
||
char sName[32]; | ||
Format(sName, sizeof(sName), "%T", "Blind", LANG_SERVER); | ||
ATAC_RegisterPunishment(sName, AtacPunishment_Blind); | ||
} | ||
|
||
|
||
/** | ||
* ATAC Punishments | ||
*/ | ||
public AtacPunishment_Blind(victim, attacker) | ||
public void AtacPunishment_Blind(int victim, int attacker) | ||
{ | ||
PrintToChatAll("%c[ATAC]%c %t", CLR_GREEN, CLR_DEFAULT, "Blinded", attacker, ATAC_GetInfo(attacker, AtacInfo_Kills), ATAC_GetSetting(AtacSetting_KillsLimit)); | ||
|
||
new iDuration = 1536; | ||
new iHoldTime = 1536; | ||
new iFlags = (0x0002 | 0x0008); | ||
new iColor[4] = {0, 0, 0, 0}; | ||
iColor[3] = GetConVarInt(g_hAmount); | ||
|
||
new Handle:hMessage = StartMessageOne("Fade", attacker); | ||
if(GetUserMessageType() == UM_Protobuf) | ||
{ | ||
PbSetInt(hMessage, "duration", iDuration); | ||
PbSetInt(hMessage, "hold_time", iHoldTime); | ||
PbSetInt(hMessage, "flags", iFlags); | ||
PbSetColor(hMessage, "clr", iColor); | ||
} | ||
else | ||
{ | ||
BfWriteShort(hMessage, iDuration); | ||
BfWriteShort(hMessage, iHoldTime); | ||
BfWriteShort(hMessage, iFlags); | ||
BfWriteByte(hMessage, iColor[0]); | ||
BfWriteByte(hMessage, iColor[1]); | ||
BfWriteByte(hMessage, iColor[2]); | ||
BfWriteByte(hMessage, iColor[3]); | ||
} | ||
EndMessage(); | ||
} | ||
PrintToChatAll("%c[ATAC]%c %t", CLR_GREEN, CLR_DEFAULT, "Blinded", attacker, ATAC_GetInfo(attacker, AtacInfo_Kills), ATAC_GetSetting(AtacSetting_KillsLimit)); | ||
|
||
int iDuration = 1536, | ||
iHoldTime = 1536, | ||
iFlags = (0x0002 | 0x0008), | ||
iColor[4] = {0, 0, 0, 0}; | ||
iColor[3] = g_hAmount.IntValue; | ||
|
||
Handle hMessage = StartMessageOne("Fade", attacker); | ||
if (GetUserMessageType() == UM_Protobuf) { | ||
PbSetInt(hMessage, "duration", iDuration); | ||
PbSetInt(hMessage, "hold_time", iHoldTime); | ||
PbSetInt(hMessage, "flags", iFlags); | ||
PbSetColor(hMessage, "clr", iColor); | ||
} else { | ||
BfWriteShort(hMessage, iDuration); | ||
BfWriteShort(hMessage, iHoldTime); | ||
BfWriteShort(hMessage, iFlags); | ||
BfWriteByte(hMessage, iColor[0]); | ||
BfWriteByte(hMessage, iColor[1]); | ||
BfWriteByte(hMessage, iColor[2]); | ||
BfWriteByte(hMessage, iColor[3]); | ||
} | ||
EndMessage(); | ||
} |
Oops, something went wrong.