Skip to content

Commit 6a9d2e0

Browse files
author
Sergtek
committed
First public version
1 parent a00764d commit 6a9d2e0

File tree

94 files changed

+46606
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+46606
-0
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: nacompllo

LICENSE

Lines changed: 661 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
## 💖 Espresso Your Love for SA-MP RCON! ☕
2+
<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>
3+
4+
## Total Control of your SA-MP Server from Android
5+
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.
6+
7+
With SA-MP RCON, gain the power to make crucial adjustments. From basic operations to advanced settings, this application allows you to:
8+
- **Shutdown your Server:** Ensures a safe shutdown when necessary.
9+
- **Customize Server:** Change the host name, game mode and map name to refresh the gaming experience.
10+
- **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.
11+
- **Direct Communication:** Message players directly to the in-game chat for announcements or instructions.
12+
- **Game Customization:** Adjust the gravity and weather of the game for a unique experience.
13+
14+
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.
15+
16+
## 📱 System Requirements
17+
SA-MP RCON is compatible with a wide range of Android devices:
18+
19+
- 🟢 Minimum version: Android 5.0 (Lollipop) and above
20+
- 🎯 Target version: Android 14 and above
21+
22+
## 🚀 Project Journey & Future
23+
24+
Hello, SA-MP community! 👋
25+
26+
Let's take a quick trip down memory lane and peek into the future of SA-MP RCON:
27+
28+
### 🌱 2020 - The Birth of SA-MP RCON
29+
30+
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.
31+
32+
### 🔍 Current State
33+
34+
Think of this version as a prototype. It works, but it's built on Xamarin Forms, which is now deprecated and no longer maintained.
35+
36+
### 🎓 Learning Opportunity
37+
38+
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.
39+
40+
### 🔮 Future Dreams
41+
42+
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:
43+
44+
- 🏗️ Rock-solid architecture
45+
- 🧪 Unit testing
46+
- 🌟 Best coding practices
47+
- 📱 Possible F-Droid publication
48+
- 🖥️ Potential support for iOS, Windows, and Linux
49+
50+
👐 **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.
51+
52+
Remember, every big idea starts somewhere. SA-MP RCON began as a quick experiment. Stay tuned, and keep managing those servers like pros! 🎮
53+
54+
## RCON Commands
55+
56+
<a href="https://www.open.mp/es/docs/server/ControllingServer" target="_blank">List of RCON commands</a>
57+
58+
## Images
59+
<img src="https://1.bp.blogspot.com/-TA6XQ3yQiZQ/Xq2prru5cDI/AAAAAAAACcw/JvecxSveBAc5SX53TKMwTQ6WX5-6YEPLgCLcBGAsYHQ/s1600/2020-05-02_19-10-08.gif">
60+
<img src="https://1.bp.blogspot.com/-atQQOYjabFc/Xq2qV2-clfI/AAAAAAAACdA/pee8rrclblgdHZAskz3qto3E3kPv4xQwQCLcBGAsYHQ/s1600/2020-05-02_19-13-44.gif">
61+
<img src="https://1.bp.blogspot.com/-2EHP86-65eQ/Xq2qE-KWpjI/AAAAAAAACc4/fo_ARhwGXwoWhDawDBUmW5FAKIbNbyBlQCLcBGAsYHQ/s1600/2020-05-02_19-12-33.gif">
62+
63+
## Copyright and license
64+
Code released under the <a href="https://www.gnu.org/licenses/agpl-3.0.html" target="_blank">GNU Affero General Public License</a>.

SampRcon.sln

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.32014.148
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampRcon.Android", "SampRcon\SampRcon.Android\SampRcon.Android.csproj", "{3BF1082A-4342-4814-9D8D-2871430DC520}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampRcon", "SampRcon\SampRcon\SampRcon.csproj", "{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Debug|ARM = Debug|ARM
14+
Debug|x64 = Debug|x64
15+
Debug|x86 = Debug|x86
16+
Release|Any CPU = Release|Any CPU
17+
Release|ARM = Release|ARM
18+
Release|x64 = Release|x64
19+
Release|x86 = Release|x86
20+
EndGlobalSection
21+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
22+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|Any CPU.Build.0 = Debug|Any CPU
24+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
25+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|ARM.ActiveCfg = Debug|Any CPU
26+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|ARM.Build.0 = Debug|Any CPU
27+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|ARM.Deploy.0 = Debug|Any CPU
28+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|x64.ActiveCfg = Debug|Any CPU
29+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|x64.Build.0 = Debug|Any CPU
30+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|x64.Deploy.0 = Debug|Any CPU
31+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|x86.ActiveCfg = Debug|Any CPU
32+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|x86.Build.0 = Debug|Any CPU
33+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Debug|x86.Deploy.0 = Debug|Any CPU
34+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|Any CPU.ActiveCfg = Release|Any CPU
35+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|Any CPU.Build.0 = Release|Any CPU
36+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|Any CPU.Deploy.0 = Release|Any CPU
37+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|ARM.ActiveCfg = Release|Any CPU
38+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|ARM.Build.0 = Release|Any CPU
39+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|ARM.Deploy.0 = Release|Any CPU
40+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|x64.ActiveCfg = Release|Any CPU
41+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|x64.Build.0 = Release|Any CPU
42+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|x64.Deploy.0 = Release|Any CPU
43+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|x86.ActiveCfg = Release|Any CPU
44+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|x86.Build.0 = Release|Any CPU
45+
{3BF1082A-4342-4814-9D8D-2871430DC520}.Release|x86.Deploy.0 = Release|Any CPU
46+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
48+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
49+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|ARM.ActiveCfg = Debug|Any CPU
50+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|ARM.Build.0 = Debug|Any CPU
51+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|ARM.Deploy.0 = Debug|Any CPU
52+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|x64.ActiveCfg = Debug|Any CPU
53+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|x64.Build.0 = Debug|Any CPU
54+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|x64.Deploy.0 = Debug|Any CPU
55+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|x86.ActiveCfg = Debug|Any CPU
56+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|x86.Build.0 = Debug|Any CPU
57+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Debug|x86.Deploy.0 = Debug|Any CPU
58+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
59+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|Any CPU.Build.0 = Release|Any CPU
60+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|Any CPU.Deploy.0 = Release|Any CPU
61+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|ARM.ActiveCfg = Release|Any CPU
62+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|ARM.Build.0 = Release|Any CPU
63+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|ARM.Deploy.0 = Release|Any CPU
64+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|x64.ActiveCfg = Release|Any CPU
65+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|x64.Build.0 = Release|Any CPU
66+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|x64.Deploy.0 = Release|Any CPU
67+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|x86.ActiveCfg = Release|Any CPU
68+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|x86.Build.0 = Release|Any CPU
69+
{CD92EA74-BB86-4877-81F5-628CD2BCA7AA}.Release|x86.Deploy.0 = Release|Any CPU
70+
EndGlobalSection
71+
GlobalSection(SolutionProperties) = preSolution
72+
HideSolutionNode = FALSE
73+
EndGlobalSection
74+
GlobalSection(ExtensibilityGlobals) = postSolution
75+
SolutionGuid = {F5F7C251-B607-4351-B6B7-F6AE8844AB3E}
76+
EndGlobalSection
77+
EndGlobal
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Any raw assets you want to be deployed with your application can be placed in
2+
this directory (and child directories) and given a Build Action of "AndroidAsset".
3+
4+
These files will be deployed with your package and will be accessible using Android's
5+
AssetManager, like this:
6+
7+
public class ReadAsset : Activity
8+
{
9+
protected override void OnCreate (Bundle bundle)
10+
{
11+
base.OnCreate (bundle);
12+
13+
InputStream input = Assets.Open ("my_asset.txt");
14+
}
15+
}
16+
17+
Additionally, some Android functions will automatically load asset files:
18+
19+
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
using Android.App;
2+
using Android.Content.PM;
3+
using Android.Runtime;
4+
using Android.OS;
5+
using Xamarin.Forms;
6+
using Plugin.CurrentActivity;
7+
8+
namespace SampRcon.Droid
9+
{
10+
[Activity(
11+
Label = "SA-MP RCON",
12+
Icon = "@mipmap/ic_launcher",
13+
RoundIcon = "@mipmap/ic_round_launcher",
14+
Theme = "@style/MainTheme",
15+
MainLauncher = false,
16+
ResizeableActivity = false,
17+
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
18+
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
19+
{
20+
public static MainActivity instance;
21+
protected override void OnCreate(Bundle savedInstanceState)
22+
{
23+
TabLayoutResource = Resource.Layout.Tabbar;
24+
ToolbarResource = Resource.Layout.Toolbar;
25+
26+
base.OnCreate(savedInstanceState);
27+
28+
Forms.SetFlags("SwipeView_Experimental");
29+
CrossCurrentActivity.Current.Init(this, savedInstanceState);
30+
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
31+
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
32+
LoadApplication(new App());
33+
instance = this;
34+
}
35+
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
36+
{
37+
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
38+
39+
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
40+
}
41+
}
42+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<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">
3+
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34" />
4+
<application android:label="SA-MP RCON">
5+
</application>
6+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
7+
</manifest>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
using Android.App;
5+
6+
// General Information about an assembly is controlled through the following
7+
// set of attributes. Change these attribute values to modify the information
8+
// associated with an assembly.
9+
[assembly: AssemblyTitle("SampRcon.Android")]
10+
[assembly: AssemblyDescription("")]
11+
[assembly: AssemblyConfiguration("")]
12+
[assembly: AssemblyCompany("")]
13+
[assembly: AssemblyProduct("SampRcon.Android")]
14+
[assembly: AssemblyCopyright("Copyright © 2014")]
15+
[assembly: AssemblyTrademark("")]
16+
[assembly: AssemblyCulture("")]
17+
[assembly: ComVisible(false)]
18+
19+
// Version information for an assembly consists of the following four values:
20+
//
21+
// Major Version
22+
// Minor Version
23+
// Build Number
24+
// Revision
25+
[assembly: AssemblyVersion("1.0.0.0")]
26+
[assembly: AssemblyFileVersion("1.0.0.0")]
27+
28+
// Add some common permissions, these can be removed if not needed
29+
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
30+
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Images, layout descriptions, binary blobs and string dictionaries can be included
2+
in your application as resource files. Various Android APIs are designed to
3+
operate on the resource IDs instead of dealing with images, strings or binary blobs
4+
directly.
5+
6+
For example, a sample Android app that contains a user interface layout (main.xml),
7+
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8+
would keep its resources in the "Resources" directory of the application:
9+
10+
Resources/
11+
drawable-hdpi/
12+
icon.png
13+
14+
drawable-ldpi/
15+
icon.png
16+
17+
drawable-mdpi/
18+
icon.png
19+
20+
layout/
21+
main.xml
22+
23+
values/
24+
strings.xml
25+
26+
In order to get the build system to recognize Android resources, set the build action to
27+
"AndroidResource". The native Android APIs do not operate directly with filenames, but
28+
instead operate on resource IDs. When you compile an Android application that uses resources,
29+
the build system will package the resources for distribution and generate a class called
30+
"Resource" that contains the tokens for each one of the resources included. For example,
31+
for the above Resources layout, this is what the Resource class would expose:
32+
33+
public class Resource {
34+
public class drawable {
35+
public const int icon = 0x123;
36+
}
37+
38+
public class layout {
39+
public const int main = 0x456;
40+
}
41+
42+
public class strings {
43+
public const int first_string = 0xabc;
44+
public const int second_string = 0xbcd;
45+
}
46+
}
47+
48+
You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49+
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50+
string in the dictionary file values/strings.xml.

0 commit comments

Comments
 (0)