19 lines
762 B
C#
19 lines
762 B
C#
using System;
|
|
using CitizenFX.Core;
|
|
using Framework.Server.Handlers;
|
|
|
|
namespace Framework.Server {
|
|
public class Server : ServerScript {
|
|
|
|
public Server() {
|
|
MySql.Initialize("Server=213.136.89.237;Database=FiveM;Uid=FiveM;Pwd=uTwjt1nGX3nf.LHR;");
|
|
MySql.CreateTables(
|
|
"CREATE TABLE IF NOT EXISTS players (owner VARCHAR(100), charId VARCHAR(100), sex BOOLEAN, height INT(3), firstName VARCHAR(60), lastName VARCHAR(60), birth VARCHAR(10), skin LONGTEXT)"
|
|
);
|
|
|
|
EventHandlers["playerJoining"] += new Action<Player>(JoinHandler.OnPlayerJoining);
|
|
EventHandlers["server:spawn:register"] += new Action<Player, dynamic>(JoinHandler.OnRegister);
|
|
}
|
|
|
|
}
|
|
} |