mirror of
https://github.com/sirpapate/playercore.git
synced 2025-03-04 03:13:01 -05:00
add script to publish
This commit is contained in:
parent
65420a3f94
commit
ce4c98c6ef
17
.gitattributes
vendored
17
.gitattributes
vendored
@ -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
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1 @@
|
||||
*.txt
|
||||
*.cmd
|
||||
*.txt
|
31
README.md
31
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]: <https://steamcommunity.com/sharedfiles/filedetails/?id=216044582>
|
||||
[Expression 2 Core Collection]: <https://steamcommunity.com/workshop/filedetails/?id=726399057>
|
||||
[Expression 2 Core Collection]: <https://steamcommunity.com/workshop/filedetails/?id=726399057>
|
||||
[GitHub Page]: <https://github.com/sirpapate/playercore>
|
13
addon.json
13
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/*"
|
||||
]
|
||||
}
|
||||
|
BIN
images/background.jpeg
Normal file
BIN
images/background.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
BIN
images/icon.jpeg
Normal file
BIN
images/icon.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
29
publish.cmd
Normal file
29
publish.cmd
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user