22.02.2016, 22:38
Achei uma include que da certo so que ela nгo carrega todos os obj alguem me ajuda??
include : ela carrega objetos MTA
desculpб double post bugou aki ;-;
include : ela carrega objetos MTA
pawn Code:
/**
MTA MAP LOADER
maploader.inc
Purpose: Loads mta maps with no needs of conversions
@author Larceny
@version 1.0 30/07/13
*/
#if defined _maploader_included
#endinput
#endif
#include <a_samp>
#define _maploader_included
#if defined MAX_VEHICLE_NAME
#if MAX_VEHICLE_NAME < 22
#undef MAX_VEHICLE_NAME
#endif
#endif
#if !defined MAX_VEHICLE_NAME
#define MAX_VEHICLE_NAME (22)
#endif
#if !defined MAX_FILE_NAME
#define MAX_FILE_NAME (64)
#endif
#if !defined MAX_ELEMENTS
#define MAX_ELEMENTS (500)
#endif
#if !defined MAPLOADER_UPDATE
#define MAPLOADER_UPDATE (100)
#endif
enum E_PICKUP_VEHICLE
{
E_PICKUP_VEHICLE_MODEL,
E_PICKUP_VEHICLE_ID,
Float:E_PICKUP_VEHICLE_X,
Float:E_PICKUP_VEHICLE_Y,
Float:E_PICKUP_VEHICLE_Z
}
enum E_PICKUP_NITRO
{
E_PICKUP_NITRO_ID,
Float:E_PICKUP_NITRO_X,
Float:E_PICKUP_NITRO_Y,
Float:E_PICKUP_NITRO_Z
}
enum E_PICKUP_REPAIR
{
E_PICKUP_REPAIR_ID,
Float:E_PICKUP_REPAIR_X,
Float:E_PICKUP_REPAIR_Y,
Float:E_PICKUP_REPAIR_Z
}
new
gMapVehicleData[MAX_ELEMENTS][E_PICKUP_VEHICLE],
gMapRepairData[MAX_ELEMENTS][E_PICKUP_REPAIR],
gMapNitroData[MAX_ELEMENTS][E_PICKUP_NITRO];
new
repairs,
nitros,
vehiclechanges;
/**
Loads a map from a file.
@param mapname The name of the file (with extension)
*/
stock LoadMap(mapname[])
{
if (!fexist(mapname))
{
printf("ERROR: Couldn't load map. File %s does not exist!", mapname);
return 0;
}
printf("Loading Map... File %s.", mapname);
new
File:mapfile,
line[256];
mapfile = fopen(mapname, io_read);
while (fread(mapfile, line))
{
if (strfind(line, "object id", true) != -1)
{
new strDest[32],
modelid,
Float:PosX,
Float:PosY,
Float:PosZ,
Float:RotX,
Float:RotY,
Float:RotZ;
strmid(strDest, line, strfind(line, "model=", true)+7, strfind(line, "scale=", true)-2);
modelid = strval(strDest);
strdel(strDest, 0, strlen(strDest));
strmid(strDest, line, strfind(line, "posX=", true)+6, strfind(line, "posY=", true)-2);
PosX = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
strmid(strDest, line, strfind(line, "posY=", true)+6, strfind(line, "posZ=", true)-2);
PosY = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
strmid(strDest, line, strfind(line, "posZ=", true)+6, strfind(line, "RotX=", true)-2);
PosZ = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
strmid(strDest, line, strfind(line, "posZ=", true)+6, strfind(line, "RotX=", true)-2);
PosZ = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
strmid(strDest, line, strfind(line, "RotX=", true)+6, strfind(line, "RotY=", true)-2);
RotX = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
strmid(strDest, line, strfind(line, "RotY=", true)+6, strfind(line, "RotZ=", true)-2);
RotY = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
strmid(strDest, line, strfind(line, "RotZ=", true)+6, strfind(line, "></object>", true)-1);
RotZ = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
CreateObject(modelid, PosX, PosY, PosZ, RotX, RotY, RotZ);
//<object id="AMT 8558 (2276)" interior="0" collisions="true" alpha="255" doublesided="false" model="8558" scale="1" dimension="0" posX="886" posY="-2513.5" posZ="117.5" rotX="359.484" rotY="359.995" rotZ="235.481"></object>
}
else if (strfind(line, "type=\"repair\"", true) != -1)
{
new strDest[32];
strmid(strDest, line, strfind(line, "posX=", true)+6, strfind(line, "posY=", true)-2);
gMapRepairData[repairs][E_PICKUP_REPAIR_X] = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
strmid(strDest, line, strfind(line, "posY=", true)+6, strfind(line, "posZ=", true)-2);
gMapRepairData[repairs][E_PICKUP_REPAIR_Y] = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
strmid(strDest, line, strfind(line, "posZ=", true)+6, strfind(line, "rotX=", true)-2);
gMapRepairData[repairs][E_PICKUP_REPAIR_Z] = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
gMapRepairData[repairs][E_PICKUP_REPAIR_ID] = CreatePickup(1239, 1, gMapRepairData[repairs][E_PICKUP_REPAIR_X], gMapRepairData[repairs][E_PICKUP_REPAIR_Y], gMapRepairData[repairs][E_PICKUP_REPAIR_Z], -1);
Create3DTextLabel("REPAIR", 0xFFFFFFFF, gMapRepairData[repairs][E_PICKUP_REPAIR_X], gMapRepairData[repairs][E_PICKUP_REPAIR_Y], gMapRepairData[repairs][E_PICKUP_REPAIR_Z], 60.0, 0, 0);
repairs++;
//<racepickup id="racepickup (NRG-500) (33)" type="repair" vehicle="522" respawn="0" posX="739.29999" posY="-3026.6001" posZ="20" rotX="0" rotY="0" rotZ="278.1"></racepickup>
}
else if (strfind(line, "type=\"vehiclechange\"", true) != -1)
{
new strDest[32];
strmid(strDest, line, strfind(line, "posX=", true)+6, strfind(line, "posY=", true)-2);
gMapVehicleData[vehiclechanges][E_PICKUP_VEHICLE_X] = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
strmid(strDest, line, strfind(line, "posY=", true)+6, strfind(line, "posZ=", true)-2);
gMapVehicleData[vehiclechanges][E_PICKUP_VEHICLE_Y] = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
strmid(strDest, line, strfind(line, "posZ=", true)+6, strfind(line, "rotX=", true)-2);
gMapVehicleData[vehiclechanges][E_PICKUP_VEHICLE_Z] = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
strmid(strDest, line, strfind(line, "vehicle=", true)+9, strfind(line, "respawn=", true)-2);
gMapVehicleData[vehiclechanges][E_PICKUP_VEHICLE_MODEL] = strval(strDest);
strdel(strDest, 0, strlen(strDest));
gMapVehicleData[vehiclechanges][E_PICKUP_VEHICLE_ID] = CreatePickup(1239, 1, gMapVehicleData[vehiclechanges][E_PICKUP_VEHICLE_X], gMapVehicleData[vehiclechanges][E_PICKUP_VEHICLE_Y], gMapVehicleData[vehiclechanges][E_PICKUP_VEHICLE_Z], -1);
Create3DTextLabel(GetVehicleName(gMapVehicleData[vehiclechanges][E_PICKUP_VEHICLE_MODEL]), 0xFFFFFFFF, gMapVehicleData[vehiclechanges][E_PICKUP_VEHICLE_X], gMapVehicleData[vehiclechanges][E_PICKUP_VEHICLE_Y], gMapVehicleData[vehiclechanges][E_PICKUP_VEHICLE_Z], 60.0, 0, 0);
vehiclechanges++;
//<racepickup id="racepickup (NRG-500) (3)" type="vehiclechange" vehicle="522" respawn="0" alpha="255" interior="0" posX="1185.59961" posY="-3075" posZ="50.3" rotX="0" rotY="0" rotZ="55.797"></racepickup>
}
else if (strfind(line, "type=\"nitro\"", true) != -1)
{
new strDest[32];
strmid(strDest, line, strfind(line, "posX=", true)+6, strfind(line, "posY=", true)-2);
gMapNitroData[nitros][E_PICKUP_NITRO_X] = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
strmid(strDest, line, strfind(line, "posY=", true)+6, strfind(line, "posZ=", true)-2);
gMapNitroData[nitros][E_PICKUP_NITRO_Y] = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
strmid(strDest, line, strfind(line, "posZ=", true)+6, strfind(line, "rotX=", true)-2);
gMapNitroData[nitros][E_PICKUP_NITRO_Z] = floatstr(strDest);
strdel(strDest, 0, strlen(strDest));
gMapNitroData[nitros][E_PICKUP_NITRO_ID] = CreatePickup(1239, 1, gMapNitroData[nitros][E_PICKUP_NITRO_X], gMapNitroData[nitros][E_PICKUP_NITRO_Y], gMapNitroData[nitros][E_PICKUP_NITRO_Z], -1);
Create3DTextLabel("NITRO", 0xFFFFFFFF, gMapNitroData[nitros][E_PICKUP_NITRO_X], gMapNitroData[nitros][E_PICKUP_NITRO_Y], gMapNitroData[nitros][E_PICKUP_NITRO_Z], 60.0, 0, 0);
nitros++;
//<racepickup id="racepickup (NRG-500) (51)" type="nitro" vehicle="522" respawn="0" posX="800.59998" posY="-3125.1001" posZ="46.9" rotX="0" rotY="0" rotZ="12.602"></racepickup>
}
}
fclose(mapfile);
print("Map Loaded.");
return 1;
}
/**
Returns the name of a vehicle
@param modelid The modelid of the vehicle
*/
static stock GetVehicleName(modelid)
{
new a_VEHICLE_NAME[22];
switch (modelid) {
case 400: a_VEHICLE_NAME = "Landstalker";
case 401: a_VEHICLE_NAME = "Bravura";
case 402: a_VEHICLE_NAME = "Buffalo";
case 403: a_VEHICLE_NAME = "Linerunner";
case 404: a_VEHICLE_NAME = "Perenniel";
case 405: a_VEHICLE_NAME = "Sentinel";
case 406: a_VEHICLE_NAME = "Dumper";
case 407: a_VEHICLE_NAME = "Firetruck";
case 408: a_VEHICLE_NAME = "Trashmaster";
case 409: a_VEHICLE_NAME = "Stretch";
case 410: a_VEHICLE_NAME = "Manana";
case 411: a_VEHICLE_NAME = "Infernus";
case 412: a_VEHICLE_NAME = "Voodoo";
case 413: a_VEHICLE_NAME = "Pony";
case 414: a_VEHICLE_NAME = "Mule";
case 415: a_VEHICLE_NAME = "Cheetah";
case 416: a_VEHICLE_NAME = "Ambulance";
case 417: a_VEHICLE_NAME = "Leviathan";
case 418: a_VEHICLE_NAME = "Moonbeam";
case 419: a_VEHICLE_NAME = "Esperanto";
case 420: a_VEHICLE_NAME = "Taxi";
case 421: a_VEHICLE_NAME = "Washigton";
case 422: a_VEHICLE_NAME = "Bobcat";
case 423: a_VEHICLE_NAME = "Mr Whoopee";
case 424: a_VEHICLE_NAME = "BF Injection";
case 425: a_VEHICLE_NAME = "Hunter";
case 426: a_VEHICLE_NAME = "Premier";
case 427: a_VEHICLE_NAME = "Enforcer";
case 428: a_VEHICLE_NAME = "Securicar";
case 429: a_VEHICLE_NAME = "Banshee";
case 430: a_VEHICLE_NAME = "Predator";
case 431: a_VEHICLE_NAME = "Bus";
case 432: a_VEHICLE_NAME = "Rhino";
case 433: a_VEHICLE_NAME = "Barracks";
case 434: a_VEHICLE_NAME = "Hotknife";
case 435: a_VEHICLE_NAME = "Article Trailer";
case 436: a_VEHICLE_NAME = "Previon";
case 437: a_VEHICLE_NAME = "Coach";
case 438: a_VEHICLE_NAME = "Cabbie";
case 439: a_VEHICLE_NAME = "Stallion";
case 440: a_VEHICLE_NAME = "Rumpo";
case 441: a_VEHICLE_NAME = "RC Bandit";
case 442: a_VEHICLE_NAME = "Romero";
case 443: a_VEHICLE_NAME = "Packer";
case 444: a_VEHICLE_NAME = "Monster";
case 445: a_VEHICLE_NAME = "Admiral";
case 446: a_VEHICLE_NAME = "Squallo";
case 447: a_VEHICLE_NAME = "Seasparrow";
case 448: a_VEHICLE_NAME = "Pizzaboy";
case 449: a_VEHICLE_NAME = "Tram";
case 450: a_VEHICLE_NAME = "Article Trailer 2";
case 451: a_VEHICLE_NAME = "Turismo";
case 452: a_VEHICLE_NAME = "Speeder";
case 453: a_VEHICLE_NAME = "Reefer";
case 454: a_VEHICLE_NAME = "Tropic";
case 455: a_VEHICLE_NAME = "Flatbed";
case 456: a_VEHICLE_NAME = "Yankee";
case 457: a_VEHICLE_NAME = "Caddy";
case 458: a_VEHICLE_NAME = "Solair";
case 459: a_VEHICLE_NAME = "Topfun Van";
case 460: a_VEHICLE_NAME = "Skimmer";
case 461: a_VEHICLE_NAME = "PCJ-600";
case 462: a_VEHICLE_NAME = "Faggio";
case 463: a_VEHICLE_NAME = "Freeway";
case 464: a_VEHICLE_NAME = "RC Baron";
case 465: a_VEHICLE_NAME = "RC Raider";
case 466: a_VEHICLE_NAME = "Glendale";
case 467: a_VEHICLE_NAME = "Oceanic";
case 468: a_VEHICLE_NAME = "Sanchez";
case 469: a_VEHICLE_NAME = "Sparrow";
case 470: a_VEHICLE_NAME = "Patriot";
case 471: a_VEHICLE_NAME = "Quad";
case 472: a_VEHICLE_NAME = "Coastguard";
case 473: a_VEHICLE_NAME = "Dinghy";
case 474: a_VEHICLE_NAME = "Hermes";
case 475: a_VEHICLE_NAME = "Sabre";
case 476: a_VEHICLE_NAME = "Rustler";
case 477: a_VEHICLE_NAME = "ZR-350";
case 478: a_VEHICLE_NAME = "Walton";
case 479: a_VEHICLE_NAME = "Regina";
case 480: a_VEHICLE_NAME = "Comet";
case 481: a_VEHICLE_NAME = "BMX";
case 482: a_VEHICLE_NAME = "Burrito";
case 483: a_VEHICLE_NAME = "Camper";
case 484: a_VEHICLE_NAME = "Marquis";
case 485: a_VEHICLE_NAME = "Baggage";
case 486: a_VEHICLE_NAME = "Dozer";
case 487: a_VEHICLE_NAME = "Maverick";
case 488: a_VEHICLE_NAME = "San News Maverick";
case 489: a_VEHICLE_NAME = "Rancher";
case 490: a_VEHICLE_NAME = "FBI Rancher";
case 491: a_VEHICLE_NAME = "Virgo";
case 492: a_VEHICLE_NAME = "Greenwood";
case 493: a_VEHICLE_NAME = "Jetmax";
case 494: a_VEHICLE_NAME = "Hotring Racer";
case 495: a_VEHICLE_NAME = "Sandking";
case 496: a_VEHICLE_NAME = "Blista Compact";
case 497: a_VEHICLE_NAME = "Police Maverick";
case 498: a_VEHICLE_NAME = "Boxville";
case 499: a_VEHICLE_NAME = "Benson";
case 500: a_VEHICLE_NAME = "Mesa";
case 501: a_VEHICLE_NAME = "RC Goblin";
case 502: a_VEHICLE_NAME = "Hotring Racer";
case 503: a_VEHICLE_NAME = "Hotring Racer";
case 504: a_VEHICLE_NAME = "Bloodring Banger";
case 505: a_VEHICLE_NAME = "Rancher";
case 506: a_VEHICLE_NAME = "Super GT";
case 507: a_VEHICLE_NAME = "Elegant";
case 508: a_VEHICLE_NAME = "Journey";
case 509: a_VEHICLE_NAME = "Bike";
case 510: a_VEHICLE_NAME = "Mountain Bike";
case 511: a_VEHICLE_NAME = "Beagle";
case 512: a_VEHICLE_NAME = "Cropduster";
case 513: a_VEHICLE_NAME = "Stuntplane";
case 514: a_VEHICLE_NAME = "Tanker";
case 515: a_VEHICLE_NAME = "Roadtrain";
case 516: a_VEHICLE_NAME = "Nebula";
case 517: a_VEHICLE_NAME = "Majestic";
case 518: a_VEHICLE_NAME = "Buccaneer";
case 519: a_VEHICLE_NAME = "Shamal";
case 520: a_VEHICLE_NAME = "Hydra";
case 521: a_VEHICLE_NAME = "FCR-900";
case 522: a_VEHICLE_NAME = "NRG-500";
case 523: a_VEHICLE_NAME = "HPV-1000";
case 524: a_VEHICLE_NAME = "Cement Truck";
case 525: a_VEHICLE_NAME = "TowTruck";
case 526: a_VEHICLE_NAME = "Fortune";
case 527: a_VEHICLE_NAME = "Cadrona";
case 528: a_VEHICLE_NAME = "FBI Truck";
case 529: a_VEHICLE_NAME = "Willard";
case 530: a_VEHICLE_NAME = "Forklift";
case 531: a_VEHICLE_NAME = "Tractor";
case 532: a_VEHICLE_NAME = "Combine Harvester";
case 533: a_VEHICLE_NAME = "Feltzer";
case 534: a_VEHICLE_NAME = "Remington";
case 535: a_VEHICLE_NAME = "Slamvan";
case 536: a_VEHICLE_NAME = "Blade";
case 537: a_VEHICLE_NAME = "Freight (Train)";
case 538: a_VEHICLE_NAME = "Brownstreak (Train)";
case 539: a_VEHICLE_NAME = "Vortex";
case 540: a_VEHICLE_NAME = "Vincent";
case 541: a_VEHICLE_NAME = "Bullet";
case 542: a_VEHICLE_NAME = "Clover";
case 543: a_VEHICLE_NAME = "Sadler";
case 544: a_VEHICLE_NAME = "Firetruck LA";
case 545: a_VEHICLE_NAME = "Hustler";
case 546: a_VEHICLE_NAME = "Intruder";
case 547: a_VEHICLE_NAME = "Primo";
case 548: a_VEHICLE_NAME = "Cargobob";
case 549: a_VEHICLE_NAME = "Tampa";
case 550: a_VEHICLE_NAME = "Sunrise";
case 551: a_VEHICLE_NAME = "Merit";
case 552: a_VEHICLE_NAME = "Utility Van";
case 553: a_VEHICLE_NAME = "Nevada";
case 554: a_VEHICLE_NAME = "Yosemite";
case 555: a_VEHICLE_NAME = "Windsor";
case 556: a_VEHICLE_NAME = "Monster ''A''";
case 557: a_VEHICLE_NAME = "Monster ''B''";
case 558: a_VEHICLE_NAME = "Uranus";
case 559: a_VEHICLE_NAME = "Jester";
case 560: a_VEHICLE_NAME = "Sultan";
case 561: a_VEHICLE_NAME = "Stratum";
case 562: a_VEHICLE_NAME = "Elegy";
case 563: a_VEHICLE_NAME = "Raindance";
case 564: a_VEHICLE_NAME = "RC Tiger";
case 565: a_VEHICLE_NAME = "Flash";
case 566: a_VEHICLE_NAME = "Tahoma";
case 567: a_VEHICLE_NAME = "Savanna";
case 568: a_VEHICLE_NAME = "Bandito";
case 569: a_VEHICLE_NAME = "Freight Flat Trailer";
case 570: a_VEHICLE_NAME = "Streak Trailer";
case 571: a_VEHICLE_NAME = "Kart";
case 572: a_VEHICLE_NAME = "Mower";
case 573: a_VEHICLE_NAME = "Dune";
case 574: a_VEHICLE_NAME = "Sweeper";
case 575: a_VEHICLE_NAME = "Broadway";
case 576: a_VEHICLE_NAME = "Tornado";
case 577: a_VEHICLE_NAME = "AT400";
case 578: a_VEHICLE_NAME = "DFT-30";
case 579: a_VEHICLE_NAME = "Huntley";
case 580: a_VEHICLE_NAME = "Stafford";
case 581: a_VEHICLE_NAME = "BF-400";
case 582: a_VEHICLE_NAME = "Newsvan";
case 583: a_VEHICLE_NAME = "Tug";
case 584: a_VEHICLE_NAME = "Petrol Trailer";
case 585: a_VEHICLE_NAME = "Emperor";
case 586: a_VEHICLE_NAME = "Wayfarer";
case 587: a_VEHICLE_NAME = "Euros";
case 588: a_VEHICLE_NAME = "Hotdog";
case 589: a_VEHICLE_NAME = "Club";
case 590: a_VEHICLE_NAME = "Freight Box Trailer";
case 591: a_VEHICLE_NAME = "Article Trailer 3";
case 592: a_VEHICLE_NAME = "Andromada";
case 593: a_VEHICLE_NAME = "Dodo";
case 594: a_VEHICLE_NAME = "RC Cam";
case 595: a_VEHICLE_NAME = "Launch";
case 596: a_VEHICLE_NAME = "Police Car (LSPD)";
case 597: a_VEHICLE_NAME = "Police Car (SFPD)";
case 598: a_VEHICLE_NAME = "Police Car (LVPD)";
case 599: a_VEHICLE_NAME = "Police Ranger";
case 600: a_VEHICLE_NAME = "Picador";
case 601: a_VEHICLE_NAME = "S.W.A.T";
case 602: a_VEHICLE_NAME = "Alpha";
case 603: a_VEHICLE_NAME = "Phoenix";
case 604: a_VEHICLE_NAME = "Glendale Shit";
case 605: a_VEHICLE_NAME = "Sadler Shit";
case 606: a_VEHICLE_NAME = "Baggage Trailer ''A''";
case 607: a_VEHICLE_NAME = "Baggage Trailer ''B''";
case 608: a_VEHICLE_NAME = "Tug Stairs Trailer";
case 609: a_VEHICLE_NAME = "Boxville";
case 610: a_VEHICLE_NAME = "Farm Trailer";
case 611: a_VEHICLE_NAME = "Utility Trailer";
default: a_VEHICLE_NAME = "Unknown Vehicle";
}
return a_VEHICLE_NAME;
}
forward maploader_Update();
public maploader_Update()
{
new
Float:fPlayerPos[3];
for (new slots = GetMaxPlayers( ), i; i < slots; i++)
{
if (!IsPlayerConnected(i))
continue;
if (!IsPlayerInAnyVehicle(i))
continue;
GetPlayerPos(i, fPlayerPos[0], fPlayerPos[1], fPlayerPos[2]);
for (new p; p < repairs; p++)
{
if(IsPlayerInRangeOfPoint(i, 4.0, gMapRepairData[p][E_PICKUP_REPAIR_X], gMapRepairData[p][E_PICKUP_REPAIR_Y], gMapRepairData[p][E_PICKUP_REPAIR_Z]))
{
new Float:vHealth;
GetVehicleHealth(GetPlayerVehicleID(i), vHealth);
if (vHealth == 1000)
continue;
RepairVehicle(GetPlayerVehicleID(i));
PlayerPlaySound(i, 1133, 0.0, 0.0, 0.0);
}
}
for (new p; p < nitros; p++)
{
if(IsPlayerInRangeOfPoint(i, 4.0, gMapNitroData[p][E_PICKUP_NITRO_X], gMapNitroData[p][E_PICKUP_NITRO_Y], gMapNitroData[p][E_PICKUP_NITRO_Z]))
{
AddVehicleComponent(GetPlayerVehicleID(i), 1010);
PlayerPlaySound(i, 1133, 0.0, 0.0, 0.0);
}
}
for (new p; p < vehiclechanges; p++)
{
if(IsPlayerInRangeOfPoint(i, 4.0, gMapVehicleData[p][E_PICKUP_VEHICLE_X], gMapVehicleData[p][E_PICKUP_VEHICLE_Y], gMapVehicleData[p][E_PICKUP_VEHICLE_Z]))
{
if(GetVehicleModel(GetPlayerVehicleID(i)) == gMapVehicleData[p][E_PICKUP_VEHICLE_MODEL])
continue;
new
Float:Velocity[3],
Float:Position[4],
vehicleid;
GetVehicleVelocity(GetPlayerVehicleID(i), Velocity[0], Velocity[1], Velocity[2]);
GetVehiclePos(GetPlayerVehicleID(i), Position[0], Position[1], Position[2]);
GetVehicleZAngle(GetPlayerVehicleID(i), Position[3]);
DestroyVehicle(GetPlayerVehicleID(i));
vehicleid = CreateVehicle(gMapVehicleData[p][E_PICKUP_VEHICLE_MODEL], Position[0], Position[1], Position[2], Position[3], -1, -1, 60);
PutPlayerInVehicle(i, vehicleid, false);
SetVehicleVelocity(vehicleid, Velocity[0], Velocity[1], Velocity[2]);
PlayerPlaySound(i, 1133, 0.0, 0.0, 0.0);
}
}
}
return 1;
}
#if !defined FILTERSCRIPT
public OnGameModeInit()
{
SetTimer("maploader_Update", MAPLOADER_UPDATE, true);
return CallLocalFunction("maploader_OnGameModeInit", "");
}
#if defined _ALS_OnGameModeInit
#undef OnGameModeInit
#else
#define _ALS_OnGameModeInit
#endif
#define OnGameModeInit maploader_OnGameModeInit
forward maploader_OnGameModeInit();
#else
public OnFilterScriptInit()
{
SetTimer("maploader_Update", MAPLOADER_UPDATE, true);
return CallLocalFunction("maploader_OnFilterScriptInit", "");
}
#if defined _ALS_OnFilterScriptInit
#undef OnFilterScriptInit
#else
#define _ALS_OnFilterScriptInit
#endif
#define OnFilterScriptInit maploader_OnFilterScriptInit
forward maploader_OnFilterScriptInit();
#endif
desculpб double post bugou aki ;-;

