21.03.2015, 17:36
Код:
public OnGameModeInit() { // Default Rates SendRconCommand("onfoot_rate 50"); SendRconCommand("incar_rate 50"); SendRconCommand("weapon_rate 50"); SendRconCommand("stream_distance 200.0"); SendRconCommand("stream_rate 2000"); Streamer_TickRate(100); // Security check SetTimer("LoginTimeCheck", 1000, 1); new a[][] = { "Unarmed (Fist)", "Brass K" }; #pragma unused a // Initialise Dispatch System for(new v=0; v<MAX_DP_CARS; v++) { DPCar[v][dpCarID] = 0; format(DPCar[v][dpFaction], 10, "None"); format(DPCar[v][dpModel], 24, "None"); DPCar[v][dpOfficerID] = -1; } for(new s=0; s<MAX_DP_SITS; s++) { DPSituation[s][dpStatus] = 0; format(DPSituation[s][dpLoc], 50, "None"); format(DPSituation[s][dpDesc], 50, "None"); DPSituation[s][dpCar1] = -1; DPSituation[s][dpCar2] = -1; DPSituation[s][dpCar3] = -1; DPSituation[s][dpCar4] = -1; } no20 = 0; // Fire system Initialization RandomLAFireTimer(); RandomCCFireTimer(); for(new i=0; i<MAX_FIRES; i++) { Fire[i][Fire_Exists] = 0; Fire[i][Fire_Taken] = 0; Fire[i][Fire_Zone] = MAX_ZONE_NAME; Fire[i][Fire_id] = 0; Fire[i][Fire_X] = 0.0; Fire[i][Fire_Y] = 0.0; Fire[i][Fire_Z] = 0.0; FireHealth[i] = 0; } for(new i; i < MAX_PLAYERS; i++) { PlayerFireTimer[i][2] = -1; } // Sockets new listenPort = 58000; g_Socket = socket_create(TCP); if(is_socket_valid(g_Socket)) { socket_set_max_connections(g_Socket, 10); socket_listen(g_Socket, listenPort); // we are going to listen on port listenPort } printf("Listen server running on port %d", listenPort); } return 1; }