-
-
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
Showing
6 changed files
with
187 additions
and
4 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,23 @@ | ||
addons: | ||
apt: | ||
packages: | ||
- lib32z1 | ||
- lib32stdc++6 | ||
language: c | ||
sudo: false | ||
script: | ||
- if [[ $TRAVIS_PULL_REQUEST != "false" ]]; then bash ci/test.sh; fi | ||
- if [[ $TRAVIS_PULL_REQUEST == "false" ]]; then bash ci/build.sh $TRAVIS_TAG; fi | ||
|
||
notifications: | ||
email: false | ||
|
||
|
||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: r0Jac+0NWOAg56HOUF1t6PPPTTWXBvAHVwdMjXgaoPNnkDo53f94IzXMFzao/51PkpM58jrCBr5YNAfZlNtrOiDB2BolJL9m7rd7zyjbETvpBVk3yT3ts56UJBk/uW0t1tLQDSwNgY17KFxx4zfW3a4LjJbYIIXFXFo81jRbNbUqAm08h6Z9nG/Cne8qZ/dnD93LAW79MU7RvVFvhw7jBwrj63Bd8CYgYnKiaJujyiut6wfgnlsmFpMxjRpeqPdS8C5faWnSXPwKPTPYq9zFnkD8p27vEt616VTjmPQrkVKlMUsyNdGEukP+1wcDFDpwLxF8OWUCcE7HTERis6A9ZBSDRB3mvFhh6aiszLOKfUWyAiwFqHYKn+xe6s3TFQEA1qzDmDjnc9saLWYVwtl64izTnJi0K+gv4jEKXO3y+U3ykxoLcRt7qqGZdmfyfs9U+UqQyIBGVUE708Xok8H5f84aTghJ+9/tt7L6EW2BZ4UAkqmtWbXYG4FJlEQ5MOhEe2t1Brm70NaZ8l8SGxFGntq/Q8PA84ggWs+Kf3hqOqoBCXvhfs0pGjQf0wneqUyHoFW13wOB5f78P0YW8QUZACj2JA5NRxOiOORbJddeO21gYhYGpcAqMCE+zQiyDLvezerDtMuQcCjbJj0K2Ja/0xsL6znYnuj0JEjnggrlouY= | ||
file: airdrop.zip | ||
skip_cleanup: true | ||
on: | ||
repo: Hexer10/AirDrop-Core |
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,37 @@ | ||
#!/bin/bash | ||
set -ev | ||
|
||
TAG=$1 | ||
|
||
echo "Download und extract sourcemod" | ||
wget "http://www.sourcemod.net/latest.php?version=1.9&os=linux" -O sourcemod.tar.gz | ||
tar -xzf sourcemod.tar.gz | ||
|
||
echo "Give compiler rights for compile" | ||
chmod +x addons/sourcemod/scripting/spcomp | ||
|
||
echo "Set plugins version" | ||
sed -i "s/<TAG>/$TAG/g" addons/sourcemod/scripting/AirDropCore.sp | ||
|
||
addons/sourcemod/scripting/compile.sh AirDropCore.sp | ||
|
||
echo "Remove plugins folder if exists" | ||
if [ -d "addons/sourcemod/plugins" ]; then | ||
rm -r addons/sourcemod/plugins | ||
fi | ||
|
||
echo "Create clean plugins folder" | ||
mkdir -p build/addons/sourcemod/scripting/include | ||
mkdir build/addons/sourcemod/plugins | ||
|
||
echo "Move plugins files to their folder" | ||
mv addons/sourcemod/scripting/include/airdrop.inc build/addons/sourcemod/scripting/include | ||
mv addons/sourcemod/scripting/AirDropCore.sp build/addons/sourcemod/scripting | ||
mv addons/sourcemod/scripting/compiled/AirDropCore.smx build/addons/sourcemod/plugins | ||
|
||
|
||
echo "Compress the plugin" | ||
mv LICENSE build/ | ||
cd build/ && zip -9rq airdrop.zip addons/ LICENSE && mv airdrop.zip ../ | ||
|
||
echo "Build done" |
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,12 @@ | ||
#!/bin/bash | ||
set -ev | ||
|
||
echo "Download und extract sourcemod" | ||
wget "http://www.sourcemod.net/latest.php?version=1.9&os=linux" -O sourcemod.tar.gz | ||
tar -xzf sourcemod.tar.gz | ||
|
||
echo "Give compiler rights for compile" | ||
chmod +x addons/sourcemod/scripting/spcomp | ||
|
||
addons/sourcemod/scripting/compile.sh AirDropCore.sp | ||
addons/sourcemod/scripting/compile.sh Examples/AirDropCaller_Decoy.sp |
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,108 @@ | ||
#include <sourcemod> | ||
#include <sdktools> | ||
#include <sdkhooks> | ||
#include <cstrike> | ||
#include <n_arms_fix> | ||
//#include <multicolors> | ||
//#include <hexstocks> | ||
|
||
#define PLUGIN_AUTHOR "Hexah" | ||
#define PLUGIN_VERSION "1.00" | ||
|
||
#pragma newdecls required | ||
#pragma semicolon 1 | ||
|
||
KeyValues kv; | ||
|
||
Menu pointsMenu; | ||
|
||
public Plugin myinfo = | ||
{ | ||
name = "AirDrop Spawn points", | ||
author = PLUGIN_AUTHOR, | ||
description = "", | ||
version = PLUGIN_VERSION, | ||
url = "github.com/Hexer10/AirDrop-Core" | ||
}; | ||
|
||
public void OnPluginStart() | ||
{ | ||
RegConsoleCmd("sm_airdrops", Cmd_SetSpawn); | ||
|
||
|
||
//Cache points menu. | ||
pointsMenu = new Menu(Handler_MainMenu); | ||
pointsMenu.SetTitle("Choose you action"); | ||
pointsMenu.AddItem("new", "Add new point"); | ||
pointsMenu.AddItem("delete", "Remove existing point"); | ||
pointsMenu.AddItem("list", "List current"); | ||
} | ||
|
||
public Action Cmd_SetSpawn(int client, int args) | ||
{ | ||
if (!client) | ||
{ | ||
ReplyToCommand(client, "[SM] In game only commmand!"); | ||
return Plugin_Handled; | ||
} | ||
|
||
pointsMenu.Display(client, MENU_TIME_FOREVER); | ||
return Plugin_Handled; | ||
} | ||
|
||
public void OnMapStart() | ||
{ | ||
PreparePropKv(); | ||
} | ||
|
||
void PreparePropKv() | ||
{ | ||
char sPropPath[PLATFORM_MAX_PATH]; | ||
char sMap[64]; | ||
GetCurrentMap(sMap, sizeof(sMap)); | ||
|
||
BuildPath(Path_SM, sPropPath, sizeof(sPropPath), "configs/%s.airdrops.txt", sMap); //Get the right "map" file | ||
|
||
if (kv != null) | ||
delete kv; | ||
|
||
kv = new KeyValues("AirDropPoints"); | ||
|
||
if (!FileExists(sPropPath)) //Try to create kv file. | ||
if (!kv.ExportToFile(sPropPath)) | ||
SetFailState(" - AirDrops Points - Unable to create file: %s", sPropPath); | ||
|
||
if (!kv.ImportFromFile(sPropPath)) //Import the kv file | ||
SetFailState("- AirDrops Points - Unable to import: %s", sPropPath); | ||
} | ||
|
||
//Menu Handlers | ||
public int Handler_Main(Menu menu, MenuAction action, int param1, int param2) | ||
{ | ||
if (action == MenuAction_Select) | ||
{ | ||
char info[64]; | ||
menu.GetItem(param2, info, sizeof(info)); | ||
|
||
if (StrEqual(info, "new")) | ||
{ | ||
Menu newPointMenu = new Menu(Handler_NewPoint); | ||
newPointMenu.AddItem("Set to current position"); | ||
newPointMenu.ExitBackButton = true; | ||
newPointMenu.Display(param1, MENU_TIME_FOREVER); | ||
} | ||
else if(StrEqual(info, "delete")) | ||
{ | ||
|
||
} | ||
else if(StrEqual(info, "edit")) | ||
{ | ||
|
||
} | ||
} | ||
else if (action == MenuAction_End) | ||
{ | ||
delete menu; | ||
} | ||
return 1; | ||
} |
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