'Database/PlayerDatabase.cs' ändern
This commit is contained in:
parent
a829ed0154
commit
d6e272ca62
1 changed files with 8 additions and 8 deletions
|
@ -12,7 +12,7 @@ namespace Roleplay
|
|||
{
|
||||
class PlayerDatabase
|
||||
{
|
||||
//Initialisierung conString, conn, cmd, reader
|
||||
//Initialise conString, conn, cmd, reader
|
||||
public static string myConnectionString = "SERVER=185.223.28.49;" + "DATABASE=gtanetwork;" + "UID=fivem;" + "PASSWORD=" + Main.databasepass + ";";
|
||||
public static MySqlConnection connection;
|
||||
public static MySqlCommand command;
|
||||
|
@ -38,7 +38,7 @@ namespace Roleplay
|
|||
//SERVER SETTINGS
|
||||
public static int startgeld = 25000;
|
||||
|
||||
//Checkt ob Spieler existiert
|
||||
//Check if the player is existiting
|
||||
public static Boolean playerExists(Client player)
|
||||
{
|
||||
connection = new MySqlConnection(myConnectionString);
|
||||
|
@ -54,7 +54,7 @@ namespace Roleplay
|
|||
string name = reader.GetString("nickname");
|
||||
if(name == player.name)
|
||||
{
|
||||
//NAME IST GLEICH DER SPIELERNAME SPIELER EXISTIERT
|
||||
//NAME equals the PLAYERNAME PLAYER is existing
|
||||
connection.Close();
|
||||
return true;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ namespace Roleplay
|
|||
|
||||
|
||||
|
||||
//Spieler einen Datenbank eintrag geben!
|
||||
//inputs the player into the database!
|
||||
public static void createPlayer(Client player, string pass,string skin)
|
||||
{
|
||||
connection = new MySqlConnection(myConnectionString);
|
||||
|
@ -108,7 +108,7 @@ namespace Roleplay
|
|||
Main.changePWtoSHA256(player,pass);
|
||||
}
|
||||
|
||||
//Spieler passwort abfragen!
|
||||
//get the password of a player!
|
||||
public static Boolean checkPassword(Client player, string pass)
|
||||
{
|
||||
connection = new MySqlConnection(myConnectionString);
|
||||
|
@ -138,7 +138,7 @@ namespace Roleplay
|
|||
{
|
||||
if (RAPI.MainAPI.CalculateMD5Hash(pass) == reader.GetString("password"))
|
||||
{
|
||||
//passwort richtig
|
||||
//password is right
|
||||
connection.Close();
|
||||
return true;
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ namespace Roleplay
|
|||
player.sendChatMessage(RAPI.MainAPI.CalculateMD5Hash(pass));
|
||||
}
|
||||
|
||||
//Skin eines Spielers getten
|
||||
//get the Skin of the player
|
||||
public static string getSkin(Client player)
|
||||
{
|
||||
string skin = "";
|
||||
|
@ -178,7 +178,7 @@ namespace Roleplay
|
|||
return skin; //
|
||||
}
|
||||
|
||||
// Players money getten
|
||||
//get the money of the player
|
||||
public static int getMoney(Client player)
|
||||
{
|
||||
int money = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue