All pastes #245825 Raw Edit

LGMain

public cpp v1 · immutable
#245825 ·published 2006-11-11 14:06 UTC
rendered paste body
#include <a_samp>#define dcmd(%1,%2) if ((strcmp(cmdtext, "/%1", true, %2 + 1) == 0) && (((cmdtext[%2 + 1] == 0) && (dcmd_%1(playerid, ""))) || ((cmdtext[%2 + 1] == 32) && (dcmd_%1(playerid, cmdtext[%2 + 2]))))) return 1#define TEAM_ADMIN 2new gTeam[MAX_PLAYERS] = {1, ...};#include "LGdefines.pwn"new gLGPoints[][LG_MAIN] ={//	NAME				AREA_MIN_X	AREA_MAX_X	AREA_MIN_Y	AREA_MAX_Y	CP_X		CP_Y		CP_Z		CP_S		OPTION_1	OPTION_2	SPECIAL				TEAMS		OWNER					LINKS	{"24-7",			-40.23,		-12.90,		-93.89,		-72.65,		-22.76,		-55.57,		1003.54,	2.0,		4,		0,		LG_BANK | LG_INTERIOR,		LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // 2473	{"Ammunation",		282.25,		300.58,		-83.74,		-29.18,		291.83,		-39.36,		1001.51,	2.0,		0,		0,		LG_AMMU | LG_INTERIOR,		LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // amu1	{"Sex Shop",		-117.95,	-97.16,		-26.26,		-5.13,		-104.02,	-21.47,		1000.71,	2.0,		0,		0,		LG_PROPERTY | LG_INTERIOR,	LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // sex	{"Camel Toe",       2081.32,    2115.12,    1251.11,    1306.27,    2093.0,        1270.0,        10.9,        2.0,        0,      0,      LG_TELEPORT,				LG_ALL_TEAMS,  INVALID_PLAYER_ID,	{5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}},	{"Camel Toe",       2088.64,    2122.30,    1327.63,    1365.32,    0.0,        0.0,        0.0,        0.0,        0,      0,      LG_FORBIDDEN,				LG_NOT_TEAMS | TEAM_ADMIN,   INVALID_PLAYER_ID, LG_NO_LINK},	{"Middle of nowhere",       0.0,        0.0,        0.0,        0.0,        0.0,        0.0,        0.0,        90.0,        0,      0,      LG_TARGET | LG_NO_CHECKPOINT,                  0,          INVALID_PLAYER_ID,      LG_NO_LINK}};new gLGWepDat[][LG_WEAPONS] ={//  NAME                WEAPON  AMMO    PRICE	{"Flamethrower",	37,		20,		0},	{"UZI",				28,	200,	0}};#include "LGfunctions.pwn"main(){	print("\n====================================");	print("|                                  |");	print("|      Blank Gamemode Script!      |");	print("|     ------------------------     |");	print("|                                  |");	print("| By Alex \"Y_Less\" Cole - (c) 2006 |");	print("|                                  |");	print("====================================\n");}public OnGameModeInit(){	SetGameModeText("Blank Script");	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);	LG_INIT_CODE	return 1;}public OnGameModeExit(){	return 1;}public OnPlayerRequestClass(playerid, classid){	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);	return 1;}public OnPlayerRequestSpawn(playerid){	return 1;}public OnPlayerConnect(playerid){	LG_CONNECT_CODE	return 1;}public OnPlayerDisconnect(playerid){	LG_DISCONNECT_CODE	return 1;}public OnPlayerSpawn(playerid){	LG_SPAWN_CODE	return 1;}public OnPlayerDeath(playerid, killerid, reason){	return 1;}public OnVehicleSpawn(vehicleid){	return 1;}public OnVehicleDeath(vehicleid, killerid){	return 1;}public OnPlayerText(playerid){	return 1;}public OnPlayerPrivmsg(playerid, senderid, text[]){	return 1;}public OnPlayerCommandText(playerid, cmdtext[]){	dcmd(mycommand, 9);	LG_COMMAND_CODE	return 0;}dcmd_mycommand(playerid, text[]){	#pragma unused playerid, text	// Do something here	return 1;}public OnPlayerInfoChange(playerid){	return 1;}public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){	return 1;}public OnPlayerExitVehicle(playerid, vehicleid){	return 1;}public OnPlayerStateChange(playerid, newstate, oldstate){	if (IsPlayerAdmin(playerid))	{		gTeam[playerid] = TEAM_ADMIN;	}	return 1;}public OnPlayerEnterCheckpoint(playerid){	LG_ENTER_CP_CODE	{		// Put your CP handlers here	}	return 1;}public OnPlayerLeaveCheckpoint(playerid){	return 1;}