2023-10-22 01:43:00 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifdef WIN32
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2023-10-22 17:08:53 +08:00
|
|
|
#define SLEEP(x) { Sleep(x); }
|
2023-10-22 01:43:00 +08:00
|
|
|
|
|
|
|
#include <windows.h>
|
2023-10-22 17:08:53 +08:00
|
|
|
#include <mmsystem.h>
|
2023-10-22 01:43:00 +08:00
|
|
|
#else
|
2023-10-22 17:08:53 +08:00
|
|
|
#define SLEEP(x) { usleep(x * 1000); }
|
|
|
|
|
|
|
|
#include <unistd.h>
|
2023-10-22 01:43:00 +08:00
|
|
|
#endif
|
|
|
|
|
2024-01-05 23:34:53 +08:00
|
|
|
#define MAX_PLAYER_NAME 24
|
2024-01-15 23:51:39 +08:00
|
|
|
#define MAX_PLAYERS 1000
|
2024-01-15 23:52:08 +08:00
|
|
|
#define MAX_VEHICLES 2000
|
2023-10-22 01:43:00 +08:00
|
|
|
#define MAX_SETTINGS_STRING 256
|
|
|
|
|
|
|
|
typedef struct _GAME_SETTINGS {
|
|
|
|
CHAR szConnectPass[MAX_SETTINGS_STRING+1];
|
|
|
|
CHAR szConnectHost[MAX_SETTINGS_STRING+1];
|
|
|
|
CHAR szConnectPort[MAX_SETTINGS_STRING+1];
|
|
|
|
CHAR szNickName[MAX_SETTINGS_STRING+1];
|
|
|
|
CHAR szModeName[MAX_SETTINGS_STRING+1];
|
|
|
|
} GAME_SETTINGS;
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2024-01-14 22:51:51 +08:00
|
|
|
#include "../raknet/RakClientInterface.h"
|
|
|
|
#include "../raknet/RakNetworkFactory.h"
|
|
|
|
#include "../raknet/PacketEnumerations.h"
|
|
|
|
#include "../raknet/SAMPRPC.h"
|
2024-01-15 23:51:39 +08:00
|
|
|
|
|
|
|
typedef unsigned short PLAYERID;
|
2024-01-15 23:52:08 +08:00
|
|
|
typedef unsigned short VEHICLEID;
|
|
|
|
|
2023-11-18 00:00:52 +08:00
|
|
|
#include "scrtimers.h"
|
|
|
|
#include "npcmode.h"
|
|
|
|
|
2024-01-14 22:51:51 +08:00
|
|
|
#include "net/netrpc.h"
|
2023-11-18 00:00:52 +08:00
|
|
|
#include "net/playerpool.h"
|
|
|
|
#include "net/vehiclepool.h"
|
2023-10-22 17:08:53 +08:00
|
|
|
#include "net/netgame.h"
|
2024-01-14 22:53:06 +08:00
|
|
|
#include "net/scriptrpc.h"
|
2023-10-22 17:08:53 +08:00
|
|
|
|
|
|
|
void logprintf(char* format, ...);
|
2023-12-18 23:26:11 +08:00
|
|
|
|
|
|
|
#ifdef LINUX
|
|
|
|
void SignalHandler(int sig);
|
|
|
|
long GetTickCount();
|
|
|
|
char* strlwr(char* str);
|
|
|
|
#endif
|