Permalink
Browse files

Add shop item; tripmines

* Remove stable branch support from .travis.yml

* Add base plugin for tripmines

Credits goes to 404/abrandnewday and L. Duke)

* Add tripmine model

Taken from: https://forums.alliedmods.net/showthread.php?p=1840614

* Rename tripmines2016.sp to tripmines.sp

* Minor changes to tripmines.sp

* Fix error spam with enabled debug mode

( [ttt/ttt_shop.smx] (LoadClientCredits) Auth failed: # )

* Add EmitSoundAny

Renaming
Change sounds, .... (doesn't work?)

* Add forwards (Tripmine_OnPlant, Tripmine_Planted and Tripmine_Ready)

* Add natives (Tripmine_GetClientMines, Tripmine_AddClientMines and Tripmine_SetClientMines)

* public -> native

* Reset remainung mines on disconnect

* Add tripmines shop item (UNTESTED)

* Remove unused stuff

* Set default value to 0

* Add translation
Beam color is now customizable over convar

* Delete handle before we get an memory leak

* Add autoexecconfig support

* tabs -> spaces

* Fix C&P fail

* Add LoadTranslations
Revert EmitSoundAny change
  • Loading branch information...
Bara committed May 5, 2018
1 parent 3e16a3d commit 7638f06757a03312e231eb9454f7f021c79e8229
@@ -20,11 +20,11 @@ matrix:
- env: VERSION=1.10
before_script:
- 'if [[ $TRAVIS_PULL_REQUEST != "false" || $TRAVIS_PULL_REQUEST == "false" && $TRAVIS_BRANCH != "master" && $TRAVIS_BRANCH != "stable" ]]; then bash ci/test.sh $VERSION "dev"; fi'
- 'if [[ $TRAVIS_PULL_REQUEST == "false" && $TRAVIS_BRANCH == "master" || $TRAVIS_BRANCH == "stable" ]]; then bash ci/build.sh $VERSION "dev" $FTP_HOST $FTP_USER $FTP_PASS $TRAVIS_JOB_ID; fi'
- 'if [[ $TRAVIS_PULL_REQUEST != "false" || $TRAVIS_PULL_REQUEST == "false" && $TRAVIS_BRANCH != "master" ]]; then bash ci/test.sh $VERSION "dev"; fi'
- 'if [[ $TRAVIS_PULL_REQUEST == "false" && $TRAVIS_BRANCH == "master" ]]; then bash ci/build.sh $VERSION "dev" $FTP_HOST $FTP_USER $FTP_PASS $TRAVIS_JOB_ID; fi'
script:
- 'if [[ $TRAVIS_PULL_REQUEST == "false" && $TRAVIS_BRANCH == "master" || $TRAVIS_BRANCH == "stable" ]]; then bash ci/upload.sh $VERSION "dev" $FTP_HOST $FTP_USER $FTP_PASS $TRAVIS_JOB_ID; fi'
- 'if [[ $TRAVIS_PULL_REQUEST == "false" && $TRAVIS_BRANCH == "master" ]]; then bash ci/upload.sh $VERSION "dev" $FTP_HOST $FTP_USER $FTP_PASS $TRAVIS_JOB_ID; fi'
notifications:
email: false
@@ -34,13 +34,15 @@ public Action UserMsg_TextMsg(UserMsg msg_id, Protobuf msg, const int[] players,
if (!FileExists(sPath))
{
SetFailState("Can't find the following file: \"configs/ttt/block_messages.ini\"");
delete hFile;
return Plugin_Continue;
}
while(!IsEndOfFile(hFile) && ReadFileLine(hFile, sFileText, sizeof(sFileText)))
{
if (StrContains(sText, sFileText, false) != -1)
{
delete hFile;
return Plugin_Handled;
}
}
@@ -0,0 +1,72 @@
#if defined _tripmines_included
#endinput
#endif
#define _tripmines_included
/*
* Called before planting, useful to block planting while something.
*
* @param client The client/planter index
*/
forward Action Tripmine_OnPlant(int client);
/*
* Called after planted, can't blocked anymore.
*
* @param client The client/planter index
* @param entity The entity index
* @param beam The beam index
*/
forward void Tripmine_Planted(int client, int entity, int beam);
/*
* Called when tripmine is ready to use.
*
* @param client The client/planter index
* @param entity The entity index
* @param beam The beam index
*/
forward void Tripmine_Ready(int client, int entity, int beam);
/*
* Returns the amount of mines of a client
*
* @param client The client index
* @return returns the amount of mines for the client
*/
native int Tripmine_GetClientMines(int client);
/*
* Adds the amount of mines for a client
*
* @param client The client index
* @return returns the (new) amount of mines for the client
*/
native int Tripmine_AddClientMines(int client, int amount);
/*
* Sets the amount of mines for a client
*
* @param client The client index
* @return returns the (new) amount of mines for the client
*/
native int Tripmine_SetClientMines(int client, int amount);
public SharedPlugin __pl_tripmines =
{
name = "tripmines",
file = "tripmines.smx",
#if defined REQUIRE_PLUGIN
required = 1,
#else
required = 0,
#endif
};
#if !defined REQUIRE_PLUGIN
public void __pl_tripmines_SetNTVOptional()
{
// MarkNativeAsOptional("");
}
#endif
Oops, something went wrong.

0 comments on commit 7638f06

Please sign in to comment.