mirror of
https://codeberg.org/spire/mapdownloader.git
synced 2026-06-03 18:24:11 +02:00
formatting change to test actions
This commit is contained in:
parent
2b322cdade
commit
df49ace162
1 changed files with 4 additions and 8 deletions
|
|
@ -27,15 +27,13 @@ new CURL_Default_opt[][2] = {
|
|||
|
||||
new Handle:g_hCvarUrl = INVALID_HANDLE;
|
||||
|
||||
public OnPluginStart()
|
||||
{
|
||||
public OnPluginStart() {
|
||||
g_hCvarUrl = CreateConVar("sm_map_download_base", "http://dl.serveme.tf/maps/", "map download url", FCVAR_PROTECTED);
|
||||
|
||||
RegServerCmd("changelevel", HandleChangeLevelAction);
|
||||
}
|
||||
|
||||
public Action:HandleChangeLevelAction(args)
|
||||
{
|
||||
public Action:HandleChangeLevelAction(args) {
|
||||
new String:arg[128];
|
||||
GetCmdArg(1, arg, sizeof(arg));
|
||||
|
||||
|
|
@ -51,8 +49,7 @@ public Action:HandleChangeLevelAction(args)
|
|||
}
|
||||
}
|
||||
|
||||
public DownloadMap(String:map[128], String:targetPath[128])
|
||||
{
|
||||
public DownloadMap(String:map[128], String:targetPath[128]) {
|
||||
decl String:fullUrl[512];
|
||||
decl String:BaseUrl[128];
|
||||
GetConVarString(g_hCvarUrl, BaseUrl, sizeof(BaseUrl));
|
||||
|
|
@ -104,8 +101,7 @@ public onComplete(Handle:hndl, CURLcode:code, any hDLPack) {
|
|||
return;
|
||||
}
|
||||
|
||||
public changeLevel(String:map[128])
|
||||
{
|
||||
public changeLevel(String:map[128]) {
|
||||
decl String:command[512];
|
||||
Format(command, sizeof(command), "changelevel %s", map);
|
||||
ServerCommand(command, sizeof(command));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue