Sure, here it is.
PHP код:
//----------------------------------------------------------
//
// GRAND LARCENY 1.0
// A freeroam gamemode for SA-MP 0.3
//
//----------------------------------------------------------
#include <a_samp>
#include <zcmd>
#include <core>
#include <float>
#include "../include/gl_common.inc"
#include "../include/gl_spawns.inc"
#pragma tabsize 0
//----------------------------------------------------------
#define COLOR_PINK 0xFF0099
#define COLOR_RED 0xCC0000
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_NORMAL_PLAYER 0xFFBB7777
#define CITY_LOS_SANTOS 0
#define CITY_SAN_FIERRO 1
#define CITY_LAS_VENTURAS 2
#define pTextdraw
new total_vehicles_from_files=0;
// Class selection globals
new gPlayerCitySelection[MAX_PLAYERS];
new gPlayerHasCitySelected[MAX_PLAYERS];
new gPlayerLastCitySelectionTick[MAX_PLAYERS];
new Text:txtClassSelHelper;
new Text:txtLosSantos;
new Text:txtSanFierro;
new Text:txtLasVenturas;
new thisanimid=0;
new lastanimid=0;
//----------------------------------------------------------
main()
{
print("\n---------------------------------------");
print("Running Grand Larceny - by the SA-MP team\n");
print("---------------------------------------\n");
}
//----------------------------------------------------------
public OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid,"~w~Stunt Planet V1",3000,4);
SendClientMessage(playerid,COLOR_PINK,"Welcome to Stunt Planet V1");
// class selection init vars
gPlayerCitySelection[playerid] = -1;
gPlayerHasCitySelected[playerid] = 0;
gPlayerLastCitySelectionTick[playerid] = GetTickCount();
//Santa Maria Beach remove building code
RemoveBuildingForPlayer(playerid, 6415, 154.2109, -1950.1953, 26.4063, 0.25);
RemoveBuildingForPlayer(playerid, 1461, 147.9453, -1927.7266, 3.5547, 0.25);
RemoveBuildingForPlayer(playerid, 6295, 154.2109, -1950.1953, 26.4063, 0.25);
RemoveBuildingForPlayer(playerid, 1461, 148.0938, -1887.2813, 3.5469, 0.25);
RemoveBuildingForPlayer(playerid, 1231, 154.4531, -1887.2422, 5.4844, 0.25);
RemoveBuildingForPlayer(playerid, 1280, 150.6641, -1870.3125, 3.1016, 0.25);
RemoveBuildingForPlayer(playerid, 1280, 158.6641, -1908.3203, 3.1719, 0.25);
RemoveBuildingForPlayer(playerid, 1461, 161.5703, -1921.3125, 3.5391, 0.25);
RemoveBuildingForPlayer(playerid, 1461, 161.6563, -1893.6406, 3.5469, 0.25);
RemoveBuildingForPlayer(playerid, 1461, 148.0938, -1847.7109, 3.5469, 0.25);
RemoveBuildingForPlayer(playerid, 1461, 148.8125, -1820.0469, 3.5391, 0.25);
RemoveBuildingForPlayer(playerid, 1280, 150.6641, -1835.3594, 3.1094, 0.25);
RemoveBuildingForPlayer(playerid, 1231, 154.6641, -1839.4297, 5.4766, 0.25);
RemoveBuildingForPlayer(playerid, 1280, 159.1953, -1842.5859, 3.1406, 0.25);
RemoveBuildingForPlayer(playerid, 1461, 161.6563, -1854.0781, 3.5469, 0.25);
RemoveBuildingForPlayer(playerid, 1461, 161.8125, -1813.6328, 3.5547, 0.25);
RemoveBuildingForPlayer(playerid, 1280, 150.6641, -1809.3594, 3.0859, 0.25);
RemoveBuildingForPlayer(playerid, 1461, 148.8125, -1799.9375, 3.5391, 0.25);
RemoveBuildingForPlayer(playerid, 1231, 154.5469, -1799.6406, 5.4688, 0.25);
RemoveBuildingForPlayer(playerid, 1280, 159.3359, -1794.5859, 3.1719, 0.25);
RemoveBuildingForPlayer(playerid, 1280, 150.6641, -1784.3359, 3.4688, 0.25);
RemoveBuildingForPlayer(playerid, 16375, 387.6016, 2525.5469, 15.6641, 0.25);
RemoveBuildingForPlayer(playerid, 16790, 425.4688, 2531.0000, 22.5547, 0.25);
//SetPlayerColor(playerid,COLOR_NORMAL_PLAYER);
//Kick(playerid);
/*
Removes vending machines
RemoveBuildingForPlayer(playerid, 1302, 0.0, 0.0, 0.0, 6000.0);
RemoveBuildingForPlayer(playerid, 1209, 0.0, 0.0, 0.0, 6000.0);
RemoveBuildingForPlayer(playerid, 955, 0.0, 0.0, 0.0, 6000.0);
RemoveBuildingForPlayer(playerid, 1775, 0.0, 0.0, 0.0, 6000.0);
RemoveBuildingForPlayer(playerid, 1776, 0.0, 0.0, 0.0, 6000.0);
*/
/*
new ClientVersion[32];
GetPlayerVersion(playerid, ClientVersion, 32);
printf("Player %d reports client version: %s", playerid, ClientVersion);*/
return 1;
}
//----------------------------------------------------------
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
new randSpawn = 0;
SetPlayerInterior(playerid,0);
TogglePlayerClock(playerid,0);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, 30000);
if(CITY_LOS_SANTOS == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_LosSantos));
SetPlayerPos(playerid,
gRandomSpawns_LosSantos[randSpawn][0],
gRandomSpawns_LosSantos[randSpawn][1],
gRandomSpawns_LosSantos[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_LosSantos[randSpawn][3]);
}
else if(CITY_SAN_FIERRO == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_SanFierro));
SetPlayerPos(playerid,
gRandomSpawns_SanFierro[randSpawn][0],
gRandomSpawns_SanFierro[randSpawn][1],
gRandomSpawns_SanFierro[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_SanFierro[randSpawn][3]);
}
else if(CITY_LAS_VENTURAS == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_LasVenturas));
SetPlayerPos(playerid,
gRandomSpawns_LasVenturas[randSpawn][0],
gRandomSpawns_LasVenturas[randSpawn][1],
gRandomSpawns_LasVenturas[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_LasVenturas[randSpawn][3]);
}
//SetPlayerColor(playerid,COLOR_NORMAL_PLAYER);
SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,100);
SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,100);
SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,100);
SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,200);
GivePlayerWeapon(playerid,WEAPON_COLT45,200);
//GivePlayerWeapon(playerid,WEAPON_MP5,100);
TogglePlayerClock(playerid, 0);
return 1;
}
//----------------------------------------------------------
public OnPlayerDeath(playerid, killerid, reason)
{
new playercash;
// if they ever return to class selection make them city
// select again first
gPlayerHasCitySelected[playerid] = 0;
if(killerid == INVALID_PLAYER_ID) {
ResetPlayerMoney(playerid);
} else {
playercash = GetPlayerMoney(playerid);
if(playercash > 0) {
GivePlayerMoney(killerid, playercash);
ResetPlayerMoney(playerid);
}
}
return 1;
}
//----------------------------------------------------------
ClassSel_SetupCharSelection(playerid)
{
if(gPlayerCitySelection[playerid] == CITY_LOS_SANTOS) {
SetPlayerInterior(playerid,11);
SetPlayerPos(playerid,508.7362,-87.4335,998.9609);
SetPlayerFacingAngle(playerid,0.0);
SetPlayerCameraPos(playerid,508.7362,-83.4335,998.9609);
SetPlayerCameraLookAt(playerid,508.7362,-87.4335,998.9609);
}
else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,-2673.8381,1399.7424,918.3516);
SetPlayerFacingAngle(playerid,181.0);
SetPlayerCameraPos(playerid,-2673.2776,1394.3859,918.3516);
SetPlayerCameraLookAt(playerid,-2673.8381,1399.7424,918.3516);
}
else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,349.0453,193.2271,1014.1797);
SetPlayerFacingAngle(playerid,286.25);
SetPlayerCameraPos(playerid,352.9164,194.5702,1014.1875);
SetPlayerCameraLookAt(playerid,349.0453,193.2271,1014.1797);
}
}
//----------------------------------------------------------
// Used to init textdraws of city names
ClassSel_InitCityNameText(Text:txtInit)
{
TextDrawUseBox(txtInit, 0);
TextDrawLetterSize(txtInit,1.25,3.0);
TextDrawFont(txtInit, 0);
TextDrawSetShadow(txtInit,0);
TextDrawSetOutline(txtInit,1);
TextDrawColor(txtInit,0xEEEEEEFF);
TextDrawBackgroundColor(txtClassSelHelper,0x000000FF);
}
//----------------------------------------------------------
ClassSel_InitTextDraws()
{
// Init our observer helper text display
txtLosSantos = TextDrawCreate(10.0, 380.0, "Los Santos");
ClassSel_InitCityNameText(txtLosSantos);
txtSanFierro = TextDrawCreate(10.0, 380.0, "San Fierro");
ClassSel_InitCityNameText(txtSanFierro);
txtLasVenturas = TextDrawCreate(10.0, 380.0, "Las Venturas");
ClassSel_InitCityNameText(txtLasVenturas);
// Init our observer helper text display
txtClassSelHelper = TextDrawCreate(10.0, 415.0,
" Press ~b~~k~~GO_LEFT~ ~w~or ~b~~k~~GO_RIGHT~ ~w~to switch cities.~n~ Press ~r~~k~~PED_FIREWEAPON~ ~w~to select.");
TextDrawUseBox(txtClassSelHelper, 1);
TextDrawBoxColor(txtClassSelHelper,0x222222BB);
TextDrawLetterSize(txtClassSelHelper,0.3,1.0);
TextDrawTextSize(txtClassSelHelper,400.0,40.0);
TextDrawFont(txtClassSelHelper, 2);
TextDrawSetShadow(txtClassSelHelper,0);
TextDrawSetOutline(txtClassSelHelper,1);
TextDrawBackgroundColor(txtClassSelHelper,0x000000FF);
TextDrawColor(txtClassSelHelper,0xFFFFFFFF);
}
//----------------------------------------------------------
ClassSel_SetupSelectedCity(playerid)
{
if(gPlayerCitySelection[playerid] == -1) {
gPlayerCitySelection[playerid] = CITY_LOS_SANTOS;
}
if(gPlayerCitySelection[playerid] == CITY_LOS_SANTOS) {
SetPlayerInterior(playerid,0);
SetPlayerCameraPos(playerid,1630.6136,-2286.0298,110.0);
SetPlayerCameraLookAt(playerid,1887.6034,-1682.1442,47.6167);
TextDrawShowForPlayer(playerid,txtLosSantos);
TextDrawHideForPlayer(playerid,txtSanFierro);
TextDrawHideForPlayer(playerid,txtLasVenturas);
}
else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
SetPlayerInterior(playerid,0);
SetPlayerCameraPos(playerid,-1300.8754,68.0546,129.4823);
SetPlayerCameraLookAt(playerid,-1817.9412,769.3878,132.6589);
TextDrawHideForPlayer(playerid,txtLosSantos);
TextDrawShowForPlayer(playerid,txtSanFierro);
TextDrawHideForPlayer(playerid,txtLasVenturas);
}
else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
SetPlayerInterior(playerid,0);
SetPlayerCameraPos(playerid,1310.6155,1675.9182,110.7390);
SetPlayerCameraLookAt(playerid,2285.2944,1919.3756,68.2275);
TextDrawHideForPlayer(playerid,txtLosSantos);
TextDrawHideForPlayer(playerid,txtSanFierro);
TextDrawShowForPlayer(playerid,txtLasVenturas);
}
}
//----------------------------------------------------------
ClassSel_SwitchToNextCity(playerid)
{
gPlayerCitySelection[playerid]++;
if(gPlayerCitySelection[playerid] > CITY_LAS_VENTURAS) {
gPlayerCitySelection[playerid] = CITY_LOS_SANTOS;
}
PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
gPlayerLastCitySelectionTick[playerid] = GetTickCount();
ClassSel_SetupSelectedCity(playerid);
}
//----------------------------------------------------------
ClassSel_SwitchToPreviousCity(playerid)
{
gPlayerCitySelection[playerid]--;
if(gPlayerCitySelection[playerid] < CITY_LOS_SANTOS) {
gPlayerCitySelection[playerid] = CITY_LAS_VENTURAS;
}
PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
gPlayerLastCitySelectionTick[playerid] = GetTickCount();
ClassSel_SetupSelectedCity(playerid);
}
//----------------------------------------------------------
ClassSel_HandleCitySelection(playerid)
{
new Keys,ud,lr;
GetPlayerKeys(playerid,Keys,ud,lr);
if(gPlayerCitySelection[playerid] == -1) {
ClassSel_SwitchToNextCity(playerid);
return;
}
// only allow new selection every ~500 ms
if( (GetTickCount() - gPlayerLastCitySelectionTick[playerid]) < 500 ) return;
if(Keys & KEY_FIRE) {
gPlayerHasCitySelected[playerid] = 1;
TextDrawHideForPlayer(playerid,txtClassSelHelper);
TextDrawHideForPlayer(playerid,txtLosSantos);
TextDrawHideForPlayer(playerid,txtSanFierro);
TextDrawHideForPlayer(playerid,txtLasVenturas);
TogglePlayerSpectating(playerid,0);
return;
}
if(lr > 0) {
ClassSel_SwitchToNextCity(playerid);
}
else if(lr < 0) {
ClassSel_SwitchToPreviousCity(playerid);
}
}
//----------------------------------------------------------
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid)) return 1;
if(gPlayerHasCitySelected[playerid]) {
ClassSel_SetupCharSelection(playerid);
return 1;
} else {
if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) {
TogglePlayerSpectating(playerid,1);
TextDrawShowForPlayer(playerid, txtClassSelHelper);
gPlayerCitySelection[playerid] = -1;
}
}
return 0;
}
//----------------------------------------------------------
public OnGameModeInit()
{
SetGameModeText("Grand Larceny");
ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL);
ShowNameTags(1);
SetNameTagDrawDistance(40.0);
EnableStuntBonusForAll(0);
DisableInteriorEnterExits();
SetWeather(2);
SetWorldTime(11);
UsePlayerPedAnims();
//ManualVehicleEngineAndLights();
//LimitGlobalChatRadius(300.0);
ClassSel_InitTextDraws();
// Player Class
AddPlayerClass(281,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(282,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(283,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(284,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(285,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(286,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(287,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(288,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(289,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(265,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(266,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(267,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(268,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(269,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(270,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(1,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(2,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(3,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(4,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(5,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(6,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(8,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(42,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(65,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
//AddPlayerClass(74,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(86,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(119,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(149,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(208,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(273,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(289,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(47,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(48,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(49,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(50,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(51,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(52,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(53,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(54,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(55,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(56,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(57,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(58,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(68,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(69,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(70,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(71,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(72,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(73,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(75,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(76,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(78,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(79,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(80,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(81,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(82,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(83,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(84,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(85,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(87,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(88,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(89,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(91,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(92,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(93,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(95,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(96,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(97,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(98,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(99,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
// OTHER AREAS
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");
printf("Total vehicles from files: %d",total_vehicles_from_files);
//smb spawn map
CreateObject(18783, 154.58350, -1951.55896, 0.33590, 0.00000, 0.00000, 0.00000);
CreateObject(19129, 154.57445, -1951.53113, 2.79470, 0.00000, 0.00000, 0.00000);
CreateObject(8483, 153.48911, -1966.99280, 8.39110, 0.00000, 0.00000, 90.00000);
CreateObject(9076, 154.65559, -1975.58521, 8.48860, 0.00000, 0.00000, -90.00000);
CreateObject(7392, 168.70193, -1956.77063, 6.79730, 0.00000, 0.00000, -40.00000);
CreateObject(7392, 140.56345, -1957.58142, 6.79730, 0.00000, 0.00000, 40.00000);
CreateObject(3472, 144.76077, -1941.71301, -2.61270, 0.00000, 0.00000, 85.00000);
CreateObject(3472, 164.41035, -1941.66431, -2.61270, 0.00000, 0.00000, -30.00000);
CreateObject(8397, 149.00160, -1982.93909, 0.00380, 0.00000, -25.00000, 0.00000);
CreateObject(8397, 160.71667, -1983.28711, 0.00380, 0.00000, 25.00000, 0.00000);
CreateObject(3472, 147.02428, -1744.58911, 3.16310, 0.00000, 0.00000, 0.00000);
CreateObject(3472, 160.44016, -1748.33606, 3.16310, 0.00000, 0.00000, 0.00000);
//aa spawn map
CreateObject(5716, 371.67850, 2546.63794, 28.70470, 0.00000, 0.40000, 0.00000);
CreateObject(19129, 383.79382, 2539.14990, 15.68420, 0.00000, 0.00000, 0.00000);
CreateObject(19129, 351.36154, 2539.11182, 15.70420, 0.00000, 0.00000, 0.00000);
CreateObject(19129, 367.57828, 2539.11743, 15.69420, 0.00000, 0.00000, 0.00000);
CreateObject(7073, 386.61774, 2542.40015, 21.31110, 0.00000, 0.00000, 50.00000);
CreateObject(7073, 348.58661, 2541.19434, 21.31110, 0.00000, 0.00000, -50.00000);
CreateObject(3528, 366.08502, 2539.88818, 31.50020, 0.00000, 0.00000, -90.00000);
CreateObject(3437, 381.68982, 2545.29785, 30.15230, 0.00000, 0.00000, 0.00000);
CreateObject(3437, 375.06033, 2545.28711, 28.77230, 0.00000, 0.00000, 0.00000);
CreateObject(3437, 352.26370, 2545.03955, 30.13230, 0.00000, 0.00000, 0.00000);
CreateObject(3437, 378.40344, 2545.29077, 26.57230, 0.00000, 0.00000, 0.00000);
CreateObject(3437, 355.37695, 2545.04517, 26.57230, 0.00000, 0.00000, 0.00000);
CreateObject(3437, 358.62390, 2545.05151, 28.77230, 0.00000, 0.00000, 0.00000);
CreateObject(3472, 337.60190, 2529.56763, 20.91090, 0.00000, 0.00000, -90.00000);
CreateObject(3472, 349.04605, 2529.50146, 18.61090, 0.00000, 0.00000, 30.00000);
CreateObject(3472, 384.77252, 2529.56616, 18.61090, 0.00000, 0.00000, 30.00000);
CreateObject(3472, 396.21524, 2529.52930, 20.91090, 0.00000, 0.00000, -90.00000);
//sfa spawn map
CreateObject(9076, -1386.94348, -226.92401, 18.93600, 0.00000, 0.00000, -160.00000);
CreateObject(9076, -1369.69214, -254.04630, 18.93600, 0.00000, 0.00000, -135.00000);
CreateObject(9076, -1342.61292, -271.37524, 18.93600, 0.00000, 0.00000, -110.00000);
CreateObject(8483, -1380.81995, -223.78815, 18.88040, 0.00000, 0.00000, 20.00000);
CreateObject(8483, -1342.01270, -265.99899, 18.88040, 0.00000, 0.00000, 70.00000);
CreateObject(8483, -1367.32336, -249.97310, 18.88040, 0.00000, 0.00000, 45.00000);
CreateObject(18783, -1367.93823, -224.77100, 10.92850, 0.00000, 0.00000, 45.00000);
CreateObject(8397, -1361.63513, -270.70786, 17.22520, 0.00000, 0.00000, -20.00000);
CreateObject(8397, -1386.58386, -243.80820, 17.22520, 0.00000, 0.00000, 20.00000);
CreateObject(7073, -1358.85681, -265.99374, 24.94760, 0.00000, 0.00000, -110.00000);
CreateObject(7073, -1380.59558, -242.83730, 24.94760, 0.00000, 0.00000, 20.00000);
CreateObject(7392, -1323.64709, -273.79370, 17.17470, 0.00000, 0.00000, -85.00000);
CreateObject(7392, -1389.95972, -205.99680, 17.17470, 0.00000, 0.00000, 0.00000);
CreateObject(18783, -1340.03186, -252.66051, 10.92850, 0.00000, 0.00000, 45.00000);
CreateObject(18783, -1353.96521, -238.73923, 10.91850, 0.00000, 0.00000, 45.00000);
CreateObject(19129, -1339.73071, -252.99609, 13.38730, 0.00000, 0.00000, 45.00000);
CreateObject(19129, -1367.94287, -224.76810, 13.38730, 0.00000, 0.00000, 45.00000);
CreateObject(19129, -1353.84827, -238.87860, 13.38730, 0.00000, 0.00000, 45.00000);
//Derby Airstrike
CreateObject(5185, 3890.36670, -1860.24927, 2.59000, 0.00000, 0.00000, 300.00000);
CreateObject(5185, 3943.17114, -1846.83423, 2.62000, 0.00000, 0.00000, 357.99500);
CreateObject(5185, 3959.19995, -1795.69995, 2.64000, 0.00000, 0.00000, 60.00000);
CreateObject(5185, 3922.02905, -1754.87524, 2.62000, 0.00000, 0.00000, 115.75000);
CreateObject(5185, 3855.19995, -1820.90002, 2.58000, 0.00000, 0.00000, 235.00000);
CreateObject(4726, 3906.84546, -1809.79724, 0.00000, 0.00000, 0.00000, 0.00000);
CreateObject(1655, 3924.25928, -1802.05334, 2.44000, 0.00000, 0.00000, 112.99900);
CreateObject(1655, 3911.01709, -1788.67505, 2.38000, 0.00000, 0.00000, 170.00000);
CreateObject(1655, 3893.24805, -1796.23682, 2.36000, 0.00000, 0.00000, 231.00000);
CreateObject(1655, 3923.07935, -1819.56653, 2.36000, 0.00000, 0.00000, 53.00000);
CreateObject(1655, 3904.47827, -1827.66333, 2.36000, 0.00000, 0.00000, 350.99500);
CreateObject(1655, 3890.04834, -1816.27405, 2.36000, 0.00000, 0.00000, 292.00000);
CreateObject(5185, 3871.41699, -1767.62988, 2.60000, 0.00000, 0.00000, 182.00000);
CreateObject(2780, 3897.23047, -1811.25183, 1.30272, 0.00000, 0.00000, 0.00000);
CreateObject(2780, 3913.35962, -1794.35986, 1.30272, 0.00000, 0.00000, 0.00000);
CreateObject(2780, 3924.14917, -1812.23621, 1.30272, 0.00000, 0.00000, 0.00000);
CreateObject(2780, 3894.66992, -1821.92419, 1.30272, 0.00000, 0.00000, 0.00000);
CreateObject(2780, 3891.72070, -1801.28857, 1.30272, 0.00000, 0.00000, 0.00000);
CreateObject(2780, 3909.24585, -1816.28003, 1.30272, 0.00000, 0.00000, 0.00000);
CreateObject(2780, 3901.06274, -1800.96570, 1.30272, 0.00000, 0.00000, 0.00000);
CreateObject(2780, 3914.87915, -1805.34802, 1.30272, 0.00000, 0.00000, 0.00000);
CreateObject(1232, 3949.86182, -1767.48718, 0.13870, 0.00000, 0.00000, 0.00000);
CreateObject(1232, 3894.04102, -1747.19739, 0.13870, 0.00000, 0.00000, 0.00000);
CreateObject(1232, 3852.33740, -1790.43286, 0.13870, 0.00000, 0.00000, 0.00000);
CreateObject(1232, 3861.79614, -1849.81128, 0.13870, 0.00000, 0.00000, 0.00000);
CreateObject(1232, 3919.20361, -1865.77979, 0.13870, 0.00000, 0.00000, 0.00000);
CreateObject(1232, 3963.77002, -1825.36841, 0.13870, 0.00000, 0.00000, 0.00000);
//SPderby
CreateObject(6342, 4180.09033, -1558.23132, 8.54030, 0.00000, 0.00000, 317.79999);
CreateObject(6342, 4100.58740, -1608.07532, 8.56030, 0.00000, 0.00000, 0.00000);
CreateObject(6342, 4075.97534, -1707.58777, 8.55030, 0.00000, 0.00000, 46.00000);
CreateObject(6342, 4130.46533, -1794.42334, 8.56030, 0.00000, 0.00000, 92.00000);
CreateObject(6342, 4230.79834, -1815.56042, 8.57030, 0.00000, 0.00000, 138.00000);
CreateObject(6342, 4315.72217, -1758.04993, 8.57030, 0.00000, 0.00000, 184.00000);
CreateObject(6342, 4333.31396, -1657.13245, 8.57030, 0.00000, 0.00000, 230.00000);
CreateObject(6342, 4272.90674, -1574.32178, 8.56030, 0.00000, 0.00000, 276.00000);
CreateObject(13725, 4206.91260, -1687.26294, 8.62860, 0.00000, 0.00000, 45.00000);
CreateObject(3458, 4248.98633, -1709.66370, 14.72840, 0.00000, 0.00000, 90.00000);
CreateObject(3458, 4143.37598, -1727.30835, 9.53030, 0.00000, -15.00000, 0.00000);
CreateObject(3458, 4182.68701, -1626.47815, 21.78600, 0.00000, 0.00000, 0.00000);
CreateObject(3458, 4165.03906, -1664.38586, 14.70840, 0.00000, 0.00000, 90.00000);
CreateObject(3458, 4206.88721, -1664.38318, 14.70840, 0.00000, 0.00000, 90.00000);
CreateObject(3458, 4270.66260, -1646.76746, 9.53300, 0.00000, 15.00000, 0.00000);
CreateObject(3458, 4289.47949, -1709.66089, 5.21950, 0.00000, 0.00000, 90.00000);
CreateObject(3458, 4231.35254, -1686.90759, 14.71840, 0.00000, 0.00000, 0.00000);
CreateObject(3458, 4207.04492, -1709.65967, 14.70840, 0.00000, 0.00000, 90.00000);
CreateObject(3458, 4165.05908, -1709.66443, 14.70840, 0.00000, 0.00000, 90.00000);
CreateObject(3458, 4185.48584, -1727.28674, 14.69840, 0.00000, 0.00000, 0.00000);
CreateObject(3458, 4182.68555, -1687.11267, 14.70840, 0.00000, 0.00000, 0.00000);
CreateObject(3458, 4187.40430, -1646.75647, 14.69840, 0.00000, 0.00000, 0.00000);
CreateObject(3458, 4143.36523, -1646.75220, 9.53030, 0.00000, -15.00000, 0.00000);
CreateObject(3458, 4143.36719, -1687.12524, 9.53030, 0.00000, -15.00000, 0.00000);
CreateObject(3458, 4182.68799, -1747.09338, 21.62050, 0.00000, 0.00000, 0.00000);
CreateObject(3458, 4270.66162, -1727.30359, 9.55300, 0.00000, 15.00000, 0.00000);
CreateObject(3458, 4270.66797, -1686.90222, 9.54300, 0.00000, 15.00000, 0.00000);
CreateObject(3458, 4165.05908, -1646.69714, 13.39300, 0.00000, -25.00000, 90.00000);
CreateObject(3458, 4124.50537, -1709.64709, 5.21000, 0.00000, 0.00000, 90.00000);
CreateObject(3458, 4289.46631, -1704.69495, 5.20950, 0.00000, 0.00000, 90.00000);
CreateObject(3458, 4289.46875, -1664.39856, 5.20910, 0.00000, 0.00000, 90.00000);
CreateObject(3458, 4124.50488, -1664.39001, 5.20910, 0.00000, 0.00000, 90.00000);
CreateObject(3458, 4124.50537, -1704.16187, 5.19990, 0.00000, 0.00000, 90.00000);
CreateObject(3458, 4248.99121, -1664.39917, 14.70840, 0.00000, 0.00000, 90.00000);
CreateObject(3458, 4248.99072, -1646.69885, 13.38840, 0.00000, -25.00000, 90.00000);
CreateObject(3458, 4226.61914, -1646.75452, 14.69840, 0.00000, 0.00000, 0.00000);
CreateObject(3458, 4231.34961, -1626.48645, 21.77840, 0.00000, 0.00000, 0.00000);
CreateObject(3458, 4191.34619, -1626.48242, 21.78840, 0.00000, 0.00000, 0.00000);
CreateObject(3458, 4248.98389, -1726.87268, 13.22840, 0.00000, 25.00000, 90.00000);
CreateObject(3458, 4165.05078, -1726.86804, 13.22840, 0.00000, 25.00000, 90.00000);
CreateObject(3458, 4226.59619, -1727.29907, 14.69840, 0.00000, 0.00000, 0.00000);
CreateObject(3458, 4231.34277, -1747.09497, 21.62080, 0.00000, 0.00000, 0.00000);
CreateObject(3458, 4191.71289, -1747.09302, 21.61990, 0.00000, 0.00000, 0.00000);
CreateObject(3515, 4206.76172, -1686.92737, 17.65340, 0.00000, 0.00000, 0.00000);
CreateObject(8493, 4191.37891, -1794.08826, 16.43911, 0.00000, 0.00000, 90.00000);
CreateObject(8493, 4193.35547, -1580.11414, 16.43911, 0.00000, 0.00000, 90.00000);
CreateObject(11556, 4153.06494, -1588.66699, 4.39458, 0.00000, 0.00000, 27.00971);
CreateObject(11556, 4253.63232, -1595.35681, 4.39458, 0.00000, 0.00000, 328.56906);
CreateObject(16139, 4182.55078, -1561.04272, -5.29340, 0.00000, 0.00000, 353.96121);
CreateObject(16139, 4216.02734, -1560.11707, -5.29340, 0.00000, 0.00000, 346.20602);
CreateObject(11556, 4141.18457, -1778.69312, 3.99402, 0.00000, 0.00000, 151.41264);
CreateObject(11556, 4243.76465, -1791.45862, 3.68061, 0.00000, 0.00000, 206.28796);
CreateObject(16139, 4213.89014, -1809.43909, -8.15714, 0.00000, 0.00000, 350.69391);
CreateObject(16139, 4188.74512, -1808.44995, -4.47967, 0.00000, 0.00000, 331.59430);
CreateObject(3505, 4237.59131, -1805.61963, 8.24140, 30.00000, 0.00000, 167.54311);
CreateObject(3505, 4135.42871, -1783.63062, 8.24140, 20.00000, 0.00000, 167.54311);
CreateObject(3505, 4178.00928, -1804.34155, 12.12140, 20.00000, 20.00000, 167.54311);
CreateObject(3505, 4256.05811, -1789.09424, 8.24140, 0.00000, 0.00000, 167.54311);
CreateObject(1215, 4123.35449, -1781.52563, 14.98137, 0.00000, 0.00000, 0.00000);
CreateObject(1215, 4139.79736, -1785.49280, 10.80119, 0.00000, 0.00000, 0.00000);
return 1;
}
//----------------------------------------------------------
public OnPlayerUpdate(playerid)
{
if(!IsPlayerConnected(playerid)) return 0;
if(IsPlayerNPC(playerid)) return 1;
// changing cities by inputs
if( !gPlayerHasCitySelected[playerid] &&
GetPlayerState(playerid) == PLAYER_STATE_SPECTATING ) {
ClassSel_HandleCitySelection(playerid);
return 1;
}
// No weapons in interiors
if(GetPlayerInterior(playerid) != 0 && GetPlayerWeapon(playerid) != 0) {
SetPlayerArmedWeapon(playerid,0); // fists
return 0; // no syncing until they change their weapon
}
/* No jetpacks allowed
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) {
Kick(playerid);
return 0;
}*/
/* For testing animations
new msg[128+1];
new animlib[32+1];
new animname[32+1];
thisanimid = GetPlayerAnimationIndex(playerid);
if(lastanimid != thisanimid)
{
GetAnimationName(thisanimid,animlib,32,animname,32);
format(msg, 128, "anim(%d,%d): %s %s", lastanimid, thisanimid, animlib, animname);
lastanimid = thisanimid;
SendClientMessage(playerid, 0xFFFFFFFF, msg);
}*/
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
return 1;
}
CMD:smb(playerid, params[])
{
SetPlayerPos(playerid, 154.2825,-1954.7573,4.7508);
SetPlayerFacingAngle(playerid, 0);
SendClientMessage(playerid, COLOR_PINK, "Santa Maria Beach");
return 1;
}
CMD:aa(playerid, params[])
{
SetPlayerPos(playerid, 366.6012,2536.2109,17.6443);
SetPlayerFacingAngle(playerid, 180);
SendClientMessage(playerid, COLOR_PINK, "Abandoned Airport");
return 1;
}
CMD:sfa(playerid, params[])
{
SetPlayerPos(playerid, -1357.3173,-241.3204,15.2904);
SetPlayerFacingAngle(playerid, 318);
SendClientMessage(playerid, COLOR_PINK, "San Ferrio Airport");
return 1;
}
CMD:derby(playerid, params[])
{
SetPlayerPos(playerid, 4070.8362,-1690.5979,29.8003);
SendClientMessage(playerid, COLOR_PINK, "Derby(Under Construction)");
return 1;
}
//----------------------------------------------------------