Ini adalah Launcher SAMP untuk android, ini hanya untuk mengganti nama dan kemungkinan di update lanjutnya akan mendukung download client.

Overview

SAMP-Launcher-Android

Ini adalah Launcher SAMP untuk android, ini hanya untuk mengganti nama dan kemungkinan di update lanjutnya akan mendukung download client. Bersenang senanglah!!!

Build Test On

  • Android Studio.
  • AIDE(mobile).

settings source code SAMP

  • settings.cpp
#include "main.h"
#include "settings.h"
#include "vendor/inih/cpp/INIReader.h"

CSettings::CSettings()
{
	Log("Loading settings..");	

	char buff[0x7F];
	sprintf(buff, "%sSAMP/settings.ini", g_pszStorage);

	INIReader reader(buff);

	if(reader.ParseError() < 0)
	{
		Log("Error: can't load %s", buff);
		std::terminate();
		return;
	}
	
	LoadName();

	// client
	size_t length = 0;
	//sprintf(buff, "__android_%d%d", rand() % 1000, rand() % 1000);
	//length = reader.Get("client", "name", buff).copy(m_Settings.szNickName, MAX_PLAYER_NAME);
	m_Settings.szNickName[length] = '\0';
	length = reader.Get("client", "host", "127.0.0.1").copy(m_Settings.szHost, MAX_SETTINGS_STRING);
	m_Settings.szHost[length] = '\0';
	length = reader.Get("client", "password", "").copy(m_Settings.szPassword, MAX_SETTINGS_STRING);
	m_Settings.szPassword[length] = '\0';
	m_Settings.iPort = reader.GetInteger("client", "port", 7777);
	length = reader.Get("client", "authKey", "").copy(m_Settings.szAuthKey, MAX_SETTINGS_STRING);
	m_Settings.szAuthKey[length] = '\0';

	// debug
	m_Settings.bDebug = reader.GetBoolean("debug", "debug", false);
	m_Settings.bOnline = reader.GetBoolean("debug", "online", true);

	// gui
	strcpy(m_Settings.szFont, "Arial_2.ttf");
	m_Settings.fFontSize = 26.0f;
	m_Settings.iFontOutline = 2;
	
	// chat
	m_Settings.fChatPosX = 325.0f;
	m_Settings.fChatPosY = -15.0f;
	m_Settings.fChatSizeX = 1150.0f;
	m_Settings.fChatSizeY = 325.0f;
	m_Settings.iChatMaxMessages = 12;
	// spawnscreen
	m_Settings.fSpawnScreenPosX = 660.0f;
	m_Settings.fSpawnScreenPosY = 950.0f;
	m_Settings.fSpawnScreenSizeX = 600.0f;
	m_Settings.fSpawnScreenSizeY = 100.0f;
	// nametags
	m_Settings.fHealthBarWidth = 60.0f;
	m_Settings.fHealthBarHeight = 10.0f;
	// scoreboard
	m_Settings.fScoreBoardSizeX = 1024.0f;
	m_Settings.fScoreBoardSizeY = 768.0f;

	// passenger
	m_Settings.bPassengerUseTexture = reader.GetBoolean("gui", "PassengerUseTexture", true);
	m_Settings.fPassengerTextureSize = reader.GetReal("gui", "PassengerTextureSize", 20.0f);
	m_Settings.fPassengerTextureX = reader.GetReal("gui", "PassengerTexturePosX", 120.0f);
	m_Settings.fPassengerTextureY = reader.GetReal("gui", "PassengerTexturePosY", 430.0f);
	Log("Settings loaded.");
}

void LoadName()
{
	char c;
	char path[0x7F];
	sprintf(path, "/storage/emulated/0/Android/media/com.rockstargames.gtasa/settings.name");
	
	std::string buf;
	FILE *fp = fopen(path, "r");
	while (fscanf(fp, "%c", &c) != EOF)
	{
		buf += c;
    }
	fclose(fp);
	fp = NULL;

	// Client
	if(buf == " ") sprintf(buf, "__android_%d%d", rand() % 1000, rand() % 1000);
	cp1251_to_utf8(m_Settings.szNickName, buf.data());
	Log("Name loaded.");
}```
You might also like...
RxJava binding APIs for Android's UI widgets.

RxBinding RxJava binding APIs for Android UI widgets from the platform and support libraries. Download Platform bindings: implementation 'com.jakewhar

A gradle plugin for getting java lambda support in java 6, 7 and android

Gradle Retrolambda Plugin This plugin will automatically build your java or android project with retrolambda, giving you lambda goodness on java 6 or

A comprehensive tutorial for Android Data Binding
A comprehensive tutorial for Android Data Binding

精通 Android Data Binding 更多干货可移步至个人主页 QQ 交流群:324112728 ,或者点击链接加入QQ群 官方虽然已经给出了教程 - Data Binding Guide (中文版 - Data Binding(数据绑定)用户指南) ,但是实践之后发现槽点实在太多,于是就

A Job Queue specifically written for Android to easily schedule jobs (tasks) that run in the background, improving UX and application stability.

Development in this repository is stopped. Future development continues on https://github.com/yigit/android-priority-jobqueue ========================

An android library for displaying fps from the choreographer and percentage of time with two or more frames dropped
An android library for displaying fps from the choreographer and percentage of time with two or more frames dropped

DEPRECATED TinyDancer is deprecated. No more development will be taking place. Check out the Google Android developer documentation for UI performance

Memory safer implementation of android.os.Handler
Memory safer implementation of android.os.Handler

Android Weak Handler Memory safer implementation of android.os.Handler Problem Original implementation of Handler always keeps hard reference to handl

Android Library to help you with your runtime Permissions.
Android Library to help you with your runtime Permissions.

PermissionHelper Android Library to help you with your runtime Permissions. Demo Android M Watch it in action. Pre M Watch it in action. Nexus 6 (M) N

Android validation library which helps developer boil down the tedious work to three easy steps.
Android validation library which helps developer boil down the tedious work to three easy steps.

AwesomeValidation Introduction Implement validation for Android within only 3 steps. Developers should focus on their awesome code, and let the librar

📄The reliable, generic, fast and flexible logging framework for Android
📄The reliable, generic, fast and flexible logging framework for Android

logback-android v2.0.0 Overview logback-android brings the power of logback to Android. This library provides a highly configurable logging framework

Releases(samplauncher)
Owner
Kiril
Hallo My Name Is Khairil.
Kiril
A weird launcher inspired in windows phone's ui

Slab launcher A weird launcher inspired in windows phone's ui Contribute Code You can contribute to this repo, or to one of these libraries: android.l

posidon 22 Dec 24, 2022
A Utility to Add all of your installed steam games to the Start Launcher for Windows

Steam Start Launcher The Steam Start launcher is a small tool that will scan your computer for isntalled steam games and create a shortcut for each ga

null 1 Dec 1, 2021
The Launcher3 fork known as Rootless Pixel Launcher

The Launcher3 fork known as Rootless Pixel Launcher

Amir Zaidi 3.7k Jan 6, 2023
A Java client for the Sixpack A/B testing framework https://github.com/seatgeek/sixpack

sixpack-java A Java client for SeatGeek's Sixpack a/b testing framework: https://github.com/seatgeek/sixpack Installing Sixpack-java is currently only

null 135 Oct 7, 2022
Src for muffin client, without hwid

Muffin-SRC-BUILDABLE Src for muffin client. Modifications: Fully removed the hwid system, Changed the main menu shader option to be off by default (it

null 28 Dec 2, 2022
Editframe Kotlin Client library

Editframe Kotlin Client library Installing Add the project to your gradle dependencies.

editframe 2 Apr 7, 2022
Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.

Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.

OpenBytes 1 Feb 18, 2022
SL4A brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreters directly on the Android device.

#Scripting Layer for Android (SL4A) SL4A brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreter

Damon Kohler 2.3k Dec 23, 2022
****. Use the native and support library variants instead - https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml.html. An android library that makes it easy to add custom fonts to edittexts and textviews

Add to your project Add this line to your dependencies in build.gradle compile 'in.workarounds.typography:typography:0.0.8' Using the views There are

Workarounds 43 Nov 6, 2021
ZXing ("Zebra Crossing") barcode scanning library for Java, Android

Project in Maintenance Mode Only The project is in maintenance mode, meaning, changes are driven by contributed patches. Only bug fixes and minor enha

ZXing Project 30.5k Dec 27, 2022