diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index bdb0cab..0000000 --- a/.gitattributes +++ /dev/null @@ -1,17 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Custom for Visual Studio -*.cs diff=csharp - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore index 1291802..314f02b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -*.txt -*.cmd +*.txt \ No newline at end of file diff --git a/README.md b/README.md index 2086f4d..8cc8416 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +[comment]: <> (## For more information, go to the [GitHub Page][GitHub Page]) +[comment]: <> (To convert this file in Steam format, use this website: https://steamdown.vercel.app/) + # PlayerCore It's the PlyCore, an extension for the Expression 2 that add functions to manipulate players. All functions can be called on yourself or on other players if you have their prop protection rights. @@ -16,26 +19,27 @@ Clone this repository into your `steamapps\common\GarrysMod\garrysmod\addons` fo ### Console Commands `sbox_e2_plycore` -* `1` - Everyone can use the functions on Everyone. -* `2` - People can use the functions only on their friends. -* `3` - Only admins can use functions. -* `4` - The functions of players setting are disabled. +* "1" - Everyone can use the functions on Everyone. +* "2" - People can use the functions only on their friends. +* "3" - Only admins can use functions. +* "4" - The functions of players setting are disabled. ### Lua -Hook `PlyCoreCommand(ply, target, command)` +__Hook__ +`PlyCoreCommand(ply, target, command)` Called when a player use a command of PlyCore. -#### Arguments -* `Player` - originator -* `Player` - target -* `string` - command +__Arguments__ +* "Player" - originator +* "Player" - target +* "string" - command -#### Return -`boolean` - Return true to block the command. +__Return__ +"boolean" - Return true to block the command. ## Functions -The following functions are protected by Protection Prop. To use them on another player, you must have their rights. Look the command `sbox_e2_plycore`. +The following functions are protected by Protection Prop. To use them on another player, you must have their rights. Look the command "sbox_e2_plycore". ### Basic Getters and Setters | Function | Return | Description | @@ -95,4 +99,5 @@ The following functions are protected by Protection Prop. To use them on another | E:ip() | S | Returns the ip of the player. (only if the player is admin) | [PlayerCore Workshop Page]: -[Expression 2 Core Collection]: \ No newline at end of file +[Expression 2 Core Collection]: +[GitHub Page]: \ No newline at end of file diff --git a/addon.json b/addon.json index f3214d5..6f15615 100644 --- a/addon.json +++ b/addon.json @@ -1,11 +1,16 @@ { - "title" : "[E2] PlayerCore", - "type" : "tool", - "tags" : [ "build" ], + "id" : 216044582, + "title" : "[E2] PlayerCore", + "type" : "tool", + "tags" : [ "build" ], "ignore" : [ "*.cmd", "*.gma", "addonid.txt", - ".git*" + ".git*", + "*.md", + ".*", + "LICENSE", + "images/*" ] } diff --git a/images/background.jpeg b/images/background.jpeg new file mode 100644 index 0000000..ee25861 Binary files /dev/null and b/images/background.jpeg differ diff --git a/images/icon.jpeg b/images/icon.jpeg new file mode 100644 index 0000000..4dc093c Binary files /dev/null and b/images/icon.jpeg differ diff --git a/publish.cmd b/publish.cmd new file mode 100644 index 0000000..8a46649 --- /dev/null +++ b/publish.cmd @@ -0,0 +1,29 @@ +@echo off +REM This script will create a GMA file and publish it to the workshop. + +FOR /F "tokens=*" %%g IN ('jq ".id" .\addon.json') do (SET ID=%%g) + +if "%ID%" == "" goto no-id + +gmad create -folder .\ -out .\addon.gma + +if "%1" == "-m" goto with-message +if "%1" == "-message" goto with-message +if "%1" == "-msg" goto with-message + +if "%1" == "" goto without-message + +:with-message +gmpublish.exe update -id %ID% -addon .\addon.gma [-changes %2] +goto after + +:without-message +gmpublish.exe update -id %ID% -addon .\addon.gma +goto after + +:no-id +echo "No ID found in addon.json" +goto after + +:after +del .\addon.gma \ No newline at end of file