01.11.2015, 14:50
Not create dynamic checkpoint !
PHP код:
//============================================================================//
#include <a_samp>
#include <core>
#include <float>
#include <streamer>
#include <zcmd>
#include "../include/gl_common.inc"
#include "../include/gl_spawns.inc"
//============================================================================//
#pragma tabsize 0
//============================================================================//
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_NORMAL_PLAYER 0xFFBB7777
#define COLOR_GREEN 0x33AA33AA
//============================================================================//
#define CITY_LOS_SANTOS 0
#define CITY_SAN_FIERRO 1
#define CITY_LAS_VENTURAS 2
//============================================================================//
new total_vehicles_from_files=0;
//============================================================================//
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 Checkpoint[MAX_PLAYERS];
//============================================================================//
new VehicleNames[213][256] = {
"Landstalker",
"Bravura",
"Buffalo",
"Linerunner",
"Pereniel",
"Sentinel",
"Dumper",
"Firetruck",
"Trashmaster",
"Stretch",
"Manana",
"Infernus",
"Voodoo",
"Pony",
"Mule",
"Cheetah",
"Ambulance",
"Leviathan",
"Moonbeam",
"Esperanto",
"Taxi",
"Washington",
"Bobcat",
"Mr Whoopee",
"BF Injection",
"Hunter",
"Premier",
"Enforcer",
"Securicar",
"Banshee",
"Predator",
"Bus",
"Rhino",
"Barracks",
"Hotknife",
"Trailer", //artict1
"Previon",
"Coach",
"Cabbie",
"Stallion",
"Rumpo",
"RC Bandit",
"Romero",
"Packer",
"Monster",
"Admiral",
"Squalo",
"Seasparrow",
"Pizzaboy",
"Tram",
"Trailer", //artict2
"Turismo",
"Speeder",
"Reefer",
"Tropic",
"Flatbed",
"Yankee",
"Caddy",
"Solair",
"Berkley's RC Van",
"Skimmer",
"PCJ-600",
"Faggio",
"Freeway",
"RC Baron",
"RC Raider",
"Glendale",
"Oceanic",
"Sanchez",
"Sparrow",
"Patriot",
"Quad",
"Coastguard",
"Dinghy",
"Hermes",
"Sabre",
"Rustler",
"ZR3 50",
"Walton",
"Regina",
"Comet",
"BMX",
"Burrito",
"Camper",
"Marquis",
"Baggage",
"Dozer",
"Maverick",
"News Chopper",
"Rancher",
"FBI Rancher",
"Virgo",
"Greenwood",
"Jetmax",
"Hotring",
"Sandking",
"Blista Compact",
"Police Maverick",
"Boxville",
"Benson",
"Mesa",
"RC Goblin",
"Hotring Racer", //hotrina
"Hotring Racer", //hotrinb
"Bloodring Banger",
"Rancher",
"Super GT",
"Elegant",
"Journey",
"Bike",
"Mountain Bike",
"Beagle",
"Cropdust",
"Stunt",
"Tanker", //petro
"RoadTrain",
"Nebula",
"Majestic",
"Buccaneer",
"Shamal",
"Hydra",
"FCR-900",
"NRG-500",
"HPV1000",
"Cement Truck",
"Tow Truck",
"Fortune",
"Cadrona",
"FBI Truck",
"Willard",
"Forklift",
"Tractor",
"Combine",
"Feltzer",
"Remington",
"Slamvan",
"Blade",
"Freight",
"Streak",
"Vortex",
"Vincent",
"Bullet",
"Clover",
"Sadler",
"Firetruck", //firela
"Hustler",
"Intruder",
"Primo",
"Cargobob",
"Tampa",
"Sunrise",
"Merit",
"Utility",
"Nevada",
"Yosemite",
"Windsor",
"Monster", //monstera
"Monster", //monsterb
"Uranus",
"Jester",
"Sultan",
"Stratum",
"Elegy",
"Raindance",
"RC Tiger",
"Flash",
"Tahoma",
"Savanna",
"Bandito",
"Freight", //freiflat
"Trailer", //streakc
"Kart",
"Mower",
"Duneride",
"Sweeper",
"Broadway",
"Tornado",
"AT-400",
"DFT-30",
"Huntley",
"Stafford",
"BF-400",
"Newsvan",
"Tug",
"Trailer", //petrotr
"Emperor",
"Wayfarer",
"Euros",
"Hotdog",
"Club",
"Trailer", //freibox
"Trailer", //artict3
"Andromada",
"Dodo",
"RC Cam",
"Launch",
"Police Cruiser",//LSPD
"Police Cruiser",//SFPD
"Police Cruiser",//LVPD
"Police Ranger",
"Picador",
"S.W.A.T. Van",
"Alpha",
"Phoenix",
"Glendale",
"Sadler",
"Luggage Trailer", //bagboxa
"Luggage Trailer", //bagboxb
"Stair Trailer", //tugstair
"Boxville",
"Farm Plow", //farmtr1
"Utility Trailer", //utiltr1
"Invalid Vehicle" //just to return if the modelid is invalid
};
//============================================================================//
main()
{
print("\n---------------------------------------");
print("Running Grand Larceny - by the SA-MP team\n");
print("---------------------------------------\n");
}
//============================================================================//
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
printf("%d", checkpointid);
if(checkpointid == Checkpoint[0])
{
GameTextForPlayer(playerid, "Test By Blondu", 4000, 5);
}
print("OnPlayerEnterDynamicCP");
}
//============================================================================//
public OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid,"~w~Grand Larceny",3000,4);
SendClientMessage(playerid,COLOR_WHITE,"Welcome to {88AA88}G{FFFFFF}rand {88AA88}L{FFFFFF}arceny");
gPlayerCitySelection[playerid] = -1;
gPlayerHasCitySelected[playerid] = 0;
gPlayerLastCitySelectionTick[playerid] = GetTickCount();
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]);
}
GivePlayerWeapon(playerid,WEAPON_COLT45,100);
TogglePlayerClock(playerid, 0);
return 1;
}
//============================================================================//
public OnPlayerDeath(playerid, killerid, reason)
{
new playercash;
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);
}
}
//============================================================================//
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()
{
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);
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;
}
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);
ManualVehicleEngineAndLights();
ClassSel_InitTextDraws();
// Player Class
AddPlayerClass(298,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(299,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(300,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(301,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(302,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(303,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(304,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(305,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
AddPlayerClass(280,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
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);
// SPECIAL
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt");
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt");
// LAS VENTURAS
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");
// SAN FIERRO
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_law.txt");
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_airport.txt");
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_gen.txt");
// LOS SANTOS
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_law.txt");
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_airport.txt");
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");
// OTHER AREAS
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/bone.txt");
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/tierra.txt");
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");
printf("Total vehicles from files: %d",total_vehicles_from_files);
return 1;
}
//============================================================================//
public OnPlayerUpdate(playerid)
{
if(!IsPlayerConnected(playerid)) return 0;
if(IsPlayerNPC(playerid)) return 1;
if(!gPlayerHasCitySelected[playerid] && GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
{
ClassSel_HandleCitySelection(playerid);
return 1;
}
if(GetPlayerWeapon(playerid) == WEAPON_MINIGUN)
{
Kick(playerid);
return 0;
}
return 1;
}
//============================================================================//
stock GetVehicleNameByModel(modelid,name[],length=256)
{
if(modelid < 400 || modelid > 611)
{
modelid=612;
}
return format(name,length,"%s",VehicleNames[(modelid-400)]);
}
//============================================================================//
forward StartEngine(vehicleid);
public StartEngine(vehicleid)
{
new params[7];
GetVehicleParamsEx(vehicleid,params[0],params[1],params[2],params[3],params[4],params[5],params[6]);
SetVehicleParamsEx(vehicleid,1,params[1],params[2],params[3],params[4],params[5],params[6]);
}
//============================================================================//
forward StopEngine(vehicleid);
public StopEngine(vehicleid)
{
new params[7];
GetVehicleParamsEx(vehicleid,params[0],params[1],params[2],params[3],params[4],params[5],params[6]);
SetVehicleParamsEx(vehicleid,0,params[1],params[2],params[3],params[4],params[5],params[6]);
}
//============================================================================//
COMMAND:engine(playerid,params[])
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new param[7];
new veh = GetPlayerVehicleID(playerid);
new vname[128];
GetVehicleNameByModel(GetVehicleModel(veh),vname);
GetVehicleParamsEx(veh,param[0],param[1],param[2],param[3],param[4],param[5],param[6]);
if(!param[0])
{
StartEngine(veh);
new msg[128];
format(msg, sizeof(msg), "~b~MOTOR:~g~ PORNIT");
GameTextForPlayer(playerid, msg, 2500, 4);
new str[1024];
format(str,sizeof(str),"porneste motorul vehiculului %s.",vname);
SendClientMessage(playerid, COLOR_GREEN, str);
}
else
{
StopEngine(veh);
new msg[128];
format(msg, sizeof(msg), "~b~MOTOR:~r~ OPRIT");
GameTextForPlayer(playerid, msg, 2500, 4);
new str[1024];
format(str,sizeof(str),"invarte cheia, oprind motorul vehiculului %s.",vname);
SendClientMessage(playerid, COLOR_GREEN, str);
}
}
return 1;
}
//============================================================================//
COMMAND:gotoloc(playerid, params[])
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid,1666.0887,-1891.7545,13.5469);
SendClientMessage(playerid, COLOR_GREEN, "Te-ai teleportat cu succes !");
return 1;
}
//============================================================================//
COMMAND:blondu(playerid, params[])
{
SendClientMessage(playerid, COLOR_GREEN, "Testing !");
Checkpoint[0] = CreateDynamicCP(1666.0887,-1891.7545,13.5469, 1.5, -1, -1, -1, 100.0);
return 1;
}
//============================================================================//