Szerző Téma: Jármûlehívó  (Megtekintve 706 alkalommal)

Jármûlehívó
« Dátum: 2013. június 26. - 07:21:48 »
0 Show voters
Hali! Valaki tudna linkelni egy bármilyen jármûlehívót? B_Jármûlehívó -t találtam csak, de az errorolt  :weep:

Nem elérhető Tomee

  • 385
    • Profil megtekintése
Jármûlehívó
« Válasz #1 Dátum: 2013. június 26. - 07:31:38 »
0 Show voters

CMD:veh(playerid, params[])
{
if(IsPlayerConnected(playerid)) {
new kocsi, szin1, szin2;
if(sscanf(params, \"iii\", kocsi, szin1, szin2)) SendClientMessage(playerid, -1,\"Használat : /veh <JármûID> <Szin1> <Szin2>\");
else if (kocsi < 400 || kocsi > 611) SendClientMessage(playerid, -1,\"Rossz jármû ID.\");
else if(szin1 < 0 || szin1 > 255) SendClientMessage(playerid,-1,\"Rossz szín ID.\");
else if(szin2 < 0 || szin2 > 255) SendClientMessage(playerid, -1,\"Rossz szín ID.\");
else{
   new Float:X,Float:Y,Float:Z;
   GetPlayerPos(playerid, X,Y,Z);
}
}
return 1;
}

Jármûlehívó
« Válasz #2 Dátum: 2013. június 28. - 15:36:09 »
0 Show voters
#include <a_samp>
#define FILTERSCRIPT
#define dialog 1500
#define COLOR_RED 0xAA3333AA
#define COLOR_LIGHTBLUE 0xADD8E6FF
new jarmu[MAX_PLAYERS];
new Jarmuvek[][] =
{
\"Admiral\\nAlpha\\nAmbulance\\nAndromada\\nAT-400\\nBaggage Trailer(A)\\nBaggage Trailer(B)\\nBaggage\\n\",
\"Bandito\\nBanshee\\nBarracks\\nBeagle\\nBenson\\nBerkley\'s RC Van\\nBF Injection\\nBF-400\\nBike\\nBlade\\n\",
\"Blista Compact\\nBloodring Banger\\nBMX\\nBobcat\\nBoxvillde\\nBoxville\\nBravura\\nBroadway\\nBuccaneer\\n\",
\"Buffalo\\nBullet\\nBurrito\\nBus\\nCabbie\\nCaddy\\nCadrona\\nCamper\\nCargobob\\nCement Truck\\nCheetah\\n\",
\"Clover\\nClub\\nCoach\\nCoastguard\\nCombine\\nComet\\nCropduster\\nDFT-30\\nDinghy\\nDodo\\nDozer\\nDumper\\n\",
\"Dune\\nElegant\\nElegy\\nEmperor\\nEnforcer\\nEsperanto\\nEuros\\nFaggio\\nFBI Rancher\\nFBI Truck\\nFCR-900\\n\",
\"Feltzer\\nFiretruck\\nFiretruck\\nFlash\\nFlatbed\\nForklift\\nFortune\\nFreeway\\nFreight Box\\nFreight Flat\\n\",
\"Freight\\nGlendale Shit\\nGlendale\\nGreenwood\\nHermes\\nHotdog\\nHotknife\\nHotring Racer A\\nHotring Racer B\\n\",
\"Hotring\\nHPV1000\\nHunter\\nHuntley\\nHustler\\nHydra\\nInfernus\\nIntruder\\nJester\\nJetmax\\nJourney\\n\",
\"Kart\\nLandstalker\\nLaunch\\nLeviathan\\nLinerunner\\nMajestic\\nManana\\nMarquis\\nMaverick\\nMerit\\nMesa\\n\",
\"Monster\\nMonster(A)\\nMonster(B)\\nMoonbeam\\nMountain Bike\\nMower\\nMule\\nNebula\\nNevada\\nNews Chopper\\n\",
\"News Van\\nNRG-500\\nOceanic\\nPacker\\nPatriot\\nPCJ-600\\nPerrenial\\nPhoenix\\nPicador\\nPizzaboy\\n\",
\"Police Car(LSPD)\\nPolice Car(LVPD)\\nPolice Car(SFPD)\\nPolice Maverick\\nPolice Ranger\\nPony\\n\",
\"Predator\\nPremier\\nPrevion\\nPrimo\\nQuad\\nRaindance\\nRancher\\nRancher\\nRC Bandit\\nRC Baron\\n\",
\"RC Cam\\nRC Goblin\\nRC Raider\\nRC Tiger\\nReefer\\nRegina\\nRemington\\nRhino\\nRoadtrain\\nRomero\\nRumpo\\n\",
\"Rustler\\nS.W.A.T\\nSabre\\nSadler Shit\\nSadler\\nSanchez\\nSandking\\nSavanna\\nSeasparrow\\nSecuricar\\n\",
\"Sentinel\\nShamal\\nSkimmer\\nSlamvan\\nSolair\\nSparrow\\nSpeeder\\nSquallo\\nStafford\\nStairs\\nStallion\\n\",
\"Stratum\\nStreak Carriage\\nStreak\\nStretch\\nStunt\\nSultan\\nSunrise\\nSuper GT\\nSweeper\\nTahoma\\nTampa\\n\",
\"Tanker\\nTaxi\\nTiller\\nTornado\\nTow Truck\\nTractor\\nTrailer\\nTrailer\\nTrailer\\nTrailer\\nTram\\nTrashmaster\\n\",
\"Tropic\\nTug\\nTurismo\\nUranus\\nUtility TrailerUtility\\nVincent\\nVirgo\\nVoodoo\\nVortex\\nWalton\\nWashington\\n\",
\"Wayfarer\\nWhoopee\\nWillard\\nWindsor\\nYankee\\nYosemite\\nZR-350\\n\"
};
new JarmuNevek[][] =
{
  \"Landstalker\", \"Bravura\", \"Buffalo\", \"Linerunner\", \"Perrenial\", \"Sentinel\", \"Dumper\", \"Firetruck\", \"Trashmaster\",
  \"Stretch\", \"Manana\", \"Infernus\", \"Voodoo\", \"Pony\", \"Mule\", \"Cheetah\", \"Ambulance\", \"Leviathan\", \"Moonbeam\",
  \"Esperanto\", \"Taxi\", \"Washington\", \"Bobcat\", \"Whoopee\", \"BF Injection\", \"Hunter\", \"Premier\", \"Enforcer\",
  \"Securicar\", \"Banshee\", \"Predator\", \"Bus\", \"Rhino\", \"Barracks\", \"Hotknife\", \"Trailer\", \"Previon\", \"Coach\",
  \"Cabbie\", \"Stallion\", \"Rumpo\", \"RC Bandit\", \"Romero\", \"Packer\", \"Monster\", \"Admiral\", \"Squalo\", \"Seasparrow\",
  \"Pizzaboy\", \"Tram\", \"Trailer\", \"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\", \"ZR-350\", \"Walton\",
  \"Regina\", \"Comet\", \"BMX\", \"Burrito\", \"Camper\", \"Marquis\", \"Baggage\", \"Dozer\", \"Maverick\", \"News Chopper\", \"Rancher\",
  \"FBI Rancher\", \"Virgo\", \"Greenwood\", \"Jetmax\", \"Hotring\", \"Sandking\", \"Blista Compact\", \"Police Maverick\",
  \"Boxvillde\", \"Benson\", \"Mesa\", \"RC Goblin\", \"Hotring Racer A\", \"Hotring Racer B\", \"Bloodring Banger\", \"Rancher\",
  \"Super GT\", \"Elegant\", \"Journey\", \"Bike\", \"Mountain Bike\", \"Beagle\", \"Cropduster\", \"Stunt\", \"Tanker\", \"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\", \"Hustler\", \"Intruder\",
  \"Primo\", \"Cargobob\", \"Tampa\", \"Sunrise\", \"Merit\", \"Utility\", \"Nevada\", \"Yosemite\", \"Windsor\", \"Monster\", \"Monster\",
  \"Uranus\", \"Jester\", \"Sultan\", \"Stratum\", \"Elegy\", \"Raindance\", \"RC Tiger\", \"Flash\", \"Tahoma\", \"Savanna\", \"Bandito\",
  \"Freight Flat\", \"Streak Carriage\", \"Kart\", \"Mower\", \"Dune\", \"Sweeper\", \"Broadway\", \"Tornado\", \"AT-400\", \"DFT-30\",
  \"Huntley\", \"Stafford\", \"BF-400\", \"News Van\", \"Tug\", \"Trailer\", \"Emperor\", \"Wayfarer\", \"Euros\", \"Hotdog\", \"Club\",
  \"Freight Box\", \"Trailer\", \"Andromada\", \"Dodo\", \"RC Cam\", \"Launch\", \"Police Car\", \"Police Car\", \"Police Car\",
  \"Police Ranger\", \"Picador\", \"S.W.A.T\", \"Alpha\", \"Phoenix\", \"Glendale\", \"Sadler\", \"Luggage\", \"Luggage\", \"Stairs\",
  \"Boxville\", \"Tiller\", \"Utility Trailer\"
};
new JarmuID[] =
{
445,602,416,592,577,606,607,485,568,429,433,511,499,459,424,581,509,536,496,504,481,422,498,609,
401,575,518,402,541,482,431,438,457,527,483,548,524,415,542,589,437,472,532,480,512,578,473,593,
486,406,573,507,562,585,427,419,587,462,490,528,521,533,407,544,565,455,530,526,463,590,569,537,
604,466,492,474,588,434,502,503,494,523,425,579,545,520,411,546,559,493,508,571,400,595,417,403,
517,410,484,487,551,500,444,556,557,418,510,572,414,516,553,488,582,522,467,443,470,461,404,603,
600,448,596,598,597,497,599,413,430,426,436,547,471,563,489,505,441,464,594,501,465,564,453,479,
534,432,515,442,440,476,601,475,605,543,468,495,567,447,428,405,519,460,535,458,469,452,446,580,
608,439,561,570,538,409,513,560,550,506,574,566,549,514,420,610,576,525,531,435,450,584,591,449,
408,454,583,451,558,611,552,540,491,412,539,478,421,586,423,529,555,456,554,477
};
public OnFilterScriptInit()
{
print(\"*** Jarmu lehivo betoltve Keszitette: DrAkE ***\");
return 1;
}
public OnFilterScriptExit()
{
print(\"*** Jarmu lehivo kiveve! ***\");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/jarmuvek\", cmdtext, true, 10) == 0)
{
    new string[1600];
format(string,sizeof string,\"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\",Jarmuvek[0],Jarmuvek[1],Jarmuvek[2],
Jarmuvek[3],Jarmuvek[4],Jarmuvek[5],Jarmuvek[6],Jarmuvek[7],Jarmuvek[8],Jarmuvek[9],
Jarmuvek[10],Jarmuvek[11],Jarmuvek[12],Jarmuvek[13],Jarmuvek[14],Jarmuvek[15],Jarmuvek[16],
Jarmuvek[17],Jarmuvek[18],Jarmuvek[19],Jarmuvek[20]);
ShowPlayerDialog(playerid,dialog,DIALOG_STYLE_LIST,\"Válassz jármûvet\",string,\"Kiválaszt\", \"Mégse\");
return 1;
}
if(strcmp(\"/jarmu\", cmdtext, true, 10) == 0)
{
    ShowPlayerDialog(playerid,dialog+1,DIALOG_STYLE_INPUT,\"Jármû lehívása\",\"Írd be a jármû ID-jét vagy nevét.\",\"Mehet\",\"Mégse\");
    return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(response)
    {
       switch(dialogid)
       {
   case dialog:
           {
                 switch(listitem)
              {
                  case 0..210:
                  {
                      new Float:X, Float:Y, Float:Z, Float:Angle, string[128];
            GetPlayerFacingAngle(playerid, Angle);
                      GetPlayerPos(playerid, X, Y, Z);
                      if(jarmu[playerid] != 0) DestroyVehicle(jarmu[playerid]);
                      jarmu[playerid] = CreateVehicle(JarmuID[listitem], X, Y+3, Z, Angle, random(126), random(126), -1);
                      PutPlayerInVehicle(playerid, jarmu[playerid], 0);
                      format(string, sizeof(string), \"Jármû lespawnolva! | Név: %s | Model ID: %d | Szín1: %d | Szín2: %d |\", JarmuNevek[GetVehicleModel(GetPlayerVehicleID(playerid))-400], JarmuID[listitem], random(126), random(126));
            SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
           }
      }
   }
   case dialog+1:
   {
            new input;
      if(!strlen(inputtext)) return ShowPlayerDialog(playerid,dialog+1,DIALOG_STYLE_INPUT,\"Jármû lehívása\",\"Írd be a jármû ID-jét vagy nevét.\",\"Mehet\",\"Mégse\");
      if(IsNumeric(inputtext))
      input = strval(inputtext);
      else input = GetVehicleModelIDFromName(inputtext);
      if(input < 400 || input > 611)
      {
         SendClientMessage(playerid, COLOR_RED, \"Nincs ilyen ID-jû/nevû kocsi! Próbáld újra!\");
         ShowPlayerDialog(playerid,dialog+1,DIALOG_STYLE_INPUT,\"Jármû lehívása\",\"Írd be a jármû ID-jét vagy a nevét.\",\"Mehet\",\"Mégse\");
      }
      if(!input)
      {
          SendClientMessage(playerid, COLOR_RED, \"Nincs ilyen ID-jû kocsi! Próbáld újra!\");
         ShowPlayerDialog(playerid,dialog+1,DIALOG_STYLE_INPUT,\"Jármû lehívása\",\"Írd be a jármû ID-jét vagy nevét.\",\"Mehet\",\"Mégse\");
      }
      if(jarmu[playerid] != 0) DestroyVehicle(jarmu[playerid]);
      new Float:X, Float:Y, Float:Z, Float:Angle, string[128];
      GetPlayerPos(playerid,X,Y,Z);
      GetPlayerFacingAngle(playerid, Angle);
      jarmu[playerid] = CreateVehicle(input, X, Y+3, Z, Angle, random(126), random(126), -1);
              PutPlayerInVehicle(playerid, jarmu[playerid], 0);
      format(string, sizeof(string), \"Jármû lespawnolva! | Név: %s | Model ID: %d | Szín1: %d | Szín2: %d |\", JarmuNevek[GetVehicleModel(GetPlayerVehicleID(playerid))-400], input, random(126), random(126));
      SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
   }
        }
}
      return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new string[128];
format(string, sizeof(string), \"%s\", JarmuNevek[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
GameTextForPlayer(playerid, string, 3000, 1);
return 1;
}
public OnPlayerConnect(playerid)
{
DestroyVehicle(jarmu[playerid]);
jarmu[playerid] = 0;
return 0;
}
public OnPlayerDisconnect(playerid)
{
DestroyVehicle(jarmu[playerid]);
    jarmu[playerid] = 0;
    return 0;
}
GetVehicleModelIDFromName(vname[])
{
for(new i = 0; i < 211; i++)
{
if ( strfind(JarmuNevek, vname, true) != -1 )
return i + 400;
}
return -1;
}
stock IsNumeric(string[])
{
for (new i = 0, j = strlen(string);
i < j; i++)
{
if (string > \'9\' || string < \'0\')
return 0;
}
return 1;
}

 
A jármû lehívót Drake készitette! Használd egézséggel!

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal