Skip to content

Commit

Permalink
First public version
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergtek committed Sep 1, 2024
1 parent a00764d commit 6a9d2e0
Show file tree
Hide file tree
Showing 94 changed files with 46,606 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: nacompllo
661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
## 💖 Espresso Your Love for SA-MP RCON! ☕
<a href="https://ko-fi.com/nacompllo" target="_blank"><img src="https://blogger.googleusercontent.com/img/a/AVvXsEjS38xLsDGtE9pLzBOks40WyC5elONtfXRJXkLktB1eHsyNphp_jNT3MLYbnDxDEvbAJ2fBThxEItrml_L9d85_Da_pjd5jBH-IzdKMOGMhfTfvIBx8R8X7WZzhuAitVEKc_70QIBpw5ytFUfQf8ug_0quMz96YBz7S0BSX_YIPJKii1r7OgAm_BWBw4Q" alt="Ko-fi" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>

## Total Control of your SA-MP Server from Android
SA-MP RCON is the essential tool for SA-MP server administrators, giving you full, real-time control of your server directly from your Android device. With an intuitive interface and powerful features, managing your server has never been so easy and accessible.

With SA-MP RCON, gain the power to make crucial adjustments. From basic operations to advanced settings, this application allows you to:
- **Shutdown your Server:** Ensures a safe shutdown when necessary.
- **Customize Server:** Change the host name, game mode and map name to refresh the gaming experience.
- **Comprehensive Server Control:** Manage player access and server security through a robust system. Kick or ban players by ID, control access via IP bans/unbans, and update RCON passwords to maintain a secure and well-regulated gaming environment.
- **Direct Communication:** Message players directly to the in-game chat for announcements or instructions.
- **Game Customization:** Adjust the gravity and weather of the game for a unique experience.

Whether you need to perform routine maintenance or quickly respond to unexpected situations, SA-MP RCON gives you the control you need to keep your server running smoothly and keep your gaming community happy and engaged.

## 📱 System Requirements
SA-MP RCON is compatible with a wide range of Android devices:

- 🟢 Minimum version: Android 5.0 (Lollipop) and above
- 🎯 Target version: Android 14 and above

## 🚀 Project Journey & Future

Hello, SA-MP community! 👋

Let's take a quick trip down memory lane and peek into the future of SA-MP RCON:

### 🌱 2020 - The Birth of SA-MP RCON

SA-MP RCON emerged in 2020, blending professional expertise with gaming enthusiasm. Amid my Xamarin.Forms work projects, I envisioned an exciting application - enabling SA-MP servers management from Android devices. This idea perfectly merged my day job skills with my passion for gaming.

### 🔍 Current State

Think of this version as a prototype. It works, but it's built on Xamarin Forms, which is now deprecated and no longer maintained.

### 🎓 Learning Opportunity

For budding developers, this project offers insights into rapid prototyping. I created it quickly, without focusing on architecture or clean code practices. While not a best practices showcase, it demonstrates how ideas can be brought to life swiftly.

### 🔮 Future Dreams

This version no longer receives updates as I'm focused on other projects. However, there are ideas for the future! While there's no set timeline and everything depends on my availability, a potential new version built with .NET MAUI could include:

- 🏗️ Rock-solid architecture
- 🧪 Unit testing
- 🌟 Best coding practices
- 📱 Possible F-Droid publication
- 🖥️ Potential support for iOS, Windows, and Linux

👐 **Open Invitation:** Whether you're here to use the app, learn from it, or dream about its future, you're part of this journey. The code is open for all to see, use, and learn from.

Remember, every big idea starts somewhere. SA-MP RCON began as a quick experiment. Stay tuned, and keep managing those servers like pros! 🎮

## RCON Commands

<a href="https://www.open.mp/es/docs/server/ControllingServer" target="_blank">List of RCON commands</a>

## Images
<img src="https://1.bp.blogspot.com/-TA6XQ3yQiZQ/Xq2prru5cDI/AAAAAAAACcw/JvecxSveBAc5SX53TKMwTQ6WX5-6YEPLgCLcBGAsYHQ/s1600/2020-05-02_19-10-08.gif">
<img src="https://1.bp.blogspot.com/-atQQOYjabFc/Xq2qV2-clfI/AAAAAAAACdA/pee8rrclblgdHZAskz3qto3E3kPv4xQwQCLcBGAsYHQ/s1600/2020-05-02_19-13-44.gif">
<img src="https://1.bp.blogspot.com/-2EHP86-65eQ/Xq2qE-KWpjI/AAAAAAAACc4/fo_ARhwGXwoWhDawDBUmW5FAKIbNbyBlQCLcBGAsYHQ/s1600/2020-05-02_19-12-33.gif">

## Copyright and license
Code released under the <a href="https://www.gnu.org/licenses/agpl-3.0.html" target="_blank">GNU Affero General Public License</a>.
77 changes: 77 additions & 0 deletions SampRcon.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32014.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampRcon.Android", "SampRcon\SampRcon.Android\SampRcon.Android.csproj", "{3BF1082A-4342-4814-9D8D-2871430DC520}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampRcon", "SampRcon\SampRcon\SampRcon.csproj", "{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|ARM.ActiveCfg = Debug|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|ARM.Build.0 = Debug|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|ARM.Deploy.0 = Debug|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|x64.ActiveCfg = Debug|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|x64.Build.0 = Debug|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|x64.Deploy.0 = Debug|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|x86.ActiveCfg = Debug|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|x86.Build.0 = Debug|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|x86.Deploy.0 = Debug|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|Any CPU.Build.0 = Release|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|Any CPU.Deploy.0 = Release|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|ARM.ActiveCfg = Release|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|ARM.Build.0 = Release|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|ARM.Deploy.0 = Release|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|x64.ActiveCfg = Release|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|x64.Build.0 = Release|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|x64.Deploy.0 = Release|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|x86.ActiveCfg = Release|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|x86.Build.0 = Release|Any CPU
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|x86.Deploy.0 = Release|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|ARM.ActiveCfg = Debug|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|ARM.Build.0 = Debug|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|ARM.Deploy.0 = Debug|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|x64.ActiveCfg = Debug|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|x64.Build.0 = Debug|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|x64.Deploy.0 = Debug|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|x86.ActiveCfg = Debug|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|x86.Build.0 = Debug|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|x86.Deploy.0 = Debug|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|Any CPU.Build.0 = Release|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|Any CPU.Deploy.0 = Release|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|ARM.ActiveCfg = Release|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|ARM.Build.0 = Release|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|ARM.Deploy.0 = Release|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|x64.ActiveCfg = Release|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|x64.Build.0 = Release|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|x64.Deploy.0 = Release|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|x86.ActiveCfg = Release|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|x86.Build.0 = Release|Any CPU
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|x86.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F5F7C251-B607-4351-B6B7-F6AE8844AB3E}
EndGlobalSection
EndGlobal
19 changes: 19 additions & 0 deletions SampRcon/SampRcon.Android/Assets/AboutAssets.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".

These files will be deployed with your package and will be accessible using Android's
AssetManager, like this:

public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);

InputStream input = Assets.Open ("my_asset.txt");
}
}

Additionally, some Android functions will automatically load asset files:

Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
42 changes: 42 additions & 0 deletions SampRcon/SampRcon.Android/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.OS;
using Xamarin.Forms;
using Plugin.CurrentActivity;

namespace SampRcon.Droid
{
[Activity(
Label = "SA-MP RCON",
Icon = "@mipmap/ic_launcher",
RoundIcon = "@mipmap/ic_round_launcher",
Theme = "@style/MainTheme",
MainLauncher = false,
ResizeableActivity = false,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
public static MainActivity instance;
protected override void OnCreate(Bundle savedInstanceState)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;

base.OnCreate(savedInstanceState);

Forms.SetFlags("SwipeView_Experimental");
CrossCurrentActivity.Current.Init(this, savedInstanceState);
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
LoadApplication(new App());
instance = this;
}
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
{
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);

base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
}
}
7 changes: 7 additions & 0 deletions SampRcon/SampRcon.Android/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="20240901" android:versionName="0.0.1" package="com.nacompllo.samprcon" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34" />
<application android:label="SA-MP RCON">
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
30 changes: 30 additions & 0 deletions SampRcon/SampRcon.Android/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SampRcon.Android")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SampRcon.Android")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

// Add some common permissions, these can be removed if not needed
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
50 changes: 50 additions & 0 deletions SampRcon/SampRcon.Android/Resources/AboutResources.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.

For example, a sample Android app that contains a user interface layout (main.xml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:

Resources/
drawable-hdpi/
icon.png

drawable-ldpi/
icon.png

drawable-mdpi/
icon.png

layout/
main.xml

values/
strings.xml

In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called
"Resource" that contains the tokens for each one of the resources included. For example,
for the above Resources layout, this is what the Resource class would expose:

public class Resource {
public class drawable {
public const int icon = 0x123;
}

public class layout {
public const int main = 0x456;
}

public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}

You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
string in the dictionary file values/strings.xml.
Loading

0 comments on commit 6a9d2e0

Please sign in to comment.