Szerző Téma: Re:V-s jármûvek  (Megtekintve 288 alkalommal)

Nem elérhető gyuri98

  • 153
  • gyuri98
    • Profil megtekintése
Re:V-s jármûvek
« Dátum: 2013. október 27. - 16:24:22 »
0 Show voters
Erre én is kíváncsi lennék nekem is pont jó lenne egy ilyen.

Nem elérhető BoOy

  • 3209
  • 2013-as év szkriptere
    • Profil megtekintése
Re:V-s jármûvek
« Válasz #1 Dátum: 2013. október 27. - 17:46:57 »
0 Show voters
Sziasztok. Én ezt használom + végtelen nitro.
/v [jármû neve/id-je] [szín 1] [szín 2]
 
#include <a_samp>
#include <zcmd>
#define COLOR_YELLOW 0xFFFF00AA
#define PRESSED(%0) \\
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define IsPlayerNotInVehicle(%0) (!IsPlayerInAnyVehicle(%0))
#define GELTONA 0xFFFF00FF
#define BALTA 0xFFFFFFFF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_ORANGE 0xFF9900AA
forward InfiniteNitro();
forward TextTimer(playerid);
new SpawnedVehicles[MAX_PLAYERS];
new VehicleNames[212][] = {
{\"Landstalker\"},{\"Bravura\"},{\"Buffalo\"},{\"Linerunner\"},{\"Perrenial\"},{\"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 1\"},{\"Previon\"},
{\"Coach\"},{\"Cabbie\"},{\"Stallion\"},{\"Rumpo\"},{\"RC Bandit\"},{\"Romero\"},{\"Packer\"},{\"Monster\"},
{\"Admiral\"},{\"Squalo\"},{\"Seasparrow\"},{\"Pizzaboy\"},{\"Tram\"},{\"Trailer 2\"},{\"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\"},{\"Boxville\"},{\"Benson\"},
{\"Mesa\"},{\"RC Goblin\"},{\"Hotring Racer A\"},{\"Hotring Racer B\"},{\"Bloodring Banger\"},{\"Rancher\"},
{\"Super GT\"},{\"Elegant\"},{\"Journey\"},{\"Bike\"},{\"Mountain Bike\"},{\"Beagle\"},{\"Cropdust\"},{\"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 LA\"},{\"Hustler\"},{\"Intruder\"},{\"Primo\"},{\"Cargobob\"},{\"Tampa\"},{\"Sunrise\"},{\"Merit\"},
{\"Utility\"},{\"Nevada\"},{\"Yosemite\"},{\"Windsor\"},{\"Monster A\"},{\"Monster B\"},{\"Uranus\"},{\"Jester\"},
{\"Sultan\"},{\"Stratum\"},{\"Elegy\"},{\"Raindance\"},{\"RC Tiger\"},{\"Flash\"},{\"Tahoma\"},{\"Savanna\"},
{\"Bandito\"},{\"Freight Flat\"},{\"Streak Carriage\"},{\"Kart\"},{\"Mower\"},{\"Duneride\"},{\"Sweeper\"},
{\"Broadway\"},{\"Tornado\"},{\"AT-400\"},{\"DFT-30\"},{\"Huntley\"},{\"Stafford\"},{\"BF-400\"},{\"Newsvan\"},
{\"Tug\"},{\"Trailer 3\"},{\"Emperor\"},{\"Wayfarer\"},{\"Euros\"},{\"Hotdog\"},{\"Club\"},{\"Freight Carriage\"},
{\"Trailer 3\"},{\"Andromada\"},{\"Dodo\"},{\"RC Cam\"},{\"Launch\"},{\"Police Car (LSPD)\"},{\"Police Car (SFPD)\"},
{\"Police Car (LVPD)\"},{\"Police Ranger\"},{\"Picador\"},{\"S.W.A.T. Van\"},{\"Alpha\"},{\"Phoenix\"},{\"Glendale\"},
{\"Sadler\"},{\"Luggage Trailer A\"},{\"Luggage Trailer B\"},{\"Stair Trailer\"},{\"Boxville\"},{\"Farm Plow\"},
{\"Utility Trailer\"}
};
forward VehicleOccupied(vehicleid);
public OnFilterScriptInit()
{
SetTimer(\"InfiniteNitro\",2000,1);
AddStaticVehicle(537, 2553.7944,2398.6465,9.2263, 0, 0, 1);
return 1;
}
public InfiniteNitro()
{
    new vehicleid;
for(new i=0;i<MAX_PLAYERS;i++)
{
    if(IsPlayerConnected(i))
    {
        if(GetPlayerState(i)==2)
        {
            vehicleid=GetPlayerVehicleID(i);
          if(CheckVehicle(vehicleid))
      AddVehicleComponent(vehicleid,1010);
   }
}
}
return 0;
}
////////////////////////////////////////////////////////////////////////////////
stock CheckVehicle(vehicleid)
{
    #define MAX_INVALID_NOS_VEHICLES 13
    new InvalidNOSVehicles[MAX_INVALID_NOS_VEHICLES] =
    {
   522,481,441,468,448,446,513,521,510,430,520,476,463 // Invalid vehicles for NOS
    };
for(new i = 0; i < MAX_INVALID_NOS_VEHICLES; i++)
{
   if(GetVehicleModel(vehicleid) == InvalidNOSVehicles) return false;
}
    return true;
}
CMD:v(playerid, params[])
{
new Index;
new tmp[256];  tmp  = strtok(params,Index);
new tmp2[256]; tmp2 = strtok(params,Index);
new tmp3[256]; tmp3 = strtok(params,Index);
if(!strlen(tmp)) return
SendClientMessage(playerid, COLOR_ORANGE, \"Használat: /v [modelid/jármûnév] [szín1] [szín2]\");
new car;
new colour1, colour2;
if(!IsNumeric(tmp))
car = GetVehicleModelIDFromName(tmp);
else car = strval(tmp);
if(car < 400 || car > 611) return  SendClientMessage(playerid, BALTA, \"Hiba: Nincs ilyen jármû!\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, 605.7007,913.9214,2949.7522)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, 929.5165,118.4630,1319.2776)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, -2731.4226,-3096.0205,2150.7773)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, 2444.8896,-1667.7598,329.0035)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, 1545.4241,-1304.6882,397.2775)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, -1807.5488,578.1452,777.4578)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, -658.3142,2369.2371,373.7775)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, 2242.7046,1074.6544,1011.0457)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, 2735.1724,-1757.0142,809.6457)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, -2433.5820,-1612.7783,617.6457)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, -2336.1072,-1752.8925,764.3456)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, -2235.8616,-1733.4717,480.8151)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, -1678.2572,-2239.4431,889.4457)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, 1531.7883,-1789.6747,140.5035)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, 2673.4063,-1559.8750,21.4902)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, 1992.8866,-783.5889,422.7301)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, 2754.9937,-2202.2620,13.5469)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(IsPlayerInRangeOfPoint(playerid, 30.0, -718.6154, -2005.5758, 8.7620)) return SendClientMessage(playerid, -1, \"Nem lehet a területen jármûvet lespawnolni.\");
if(!strlen(tmp2)) colour1 = random(126); else colour1 = strval(tmp2);
if(!strlen(tmp3)) colour2 = random(126); else colour2 = strval(tmp3);
if(SpawnedVehicles[playerid] != 0) DestroyVehicle(SpawnedVehicles[playerid]);
new Float:X,Float:Y,Float:Z;
new Float:Angle,int1;
GetPlayerPos(playerid, X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
int1 = GetPlayerInterior(playerid);
new vehicleid = GetPlayerVehicleID(playerid);
SpawnedVehicles[playerid] = CreateVehicle(car, X+3,Y,Z, Angle, colour1, colour2, -1);
LinkVehicleToInterior(vehicleid,int1);
PlayerPlaySound(playerid,1085,0,0,0);
SetVehicleVirtualWorld(SpawnedVehicles[playerid], GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid,SpawnedVehicles[playerid],0);
return 1;
}
CMD:respawncars(playerid,params[]){
if(!IsPlayerAdmin(playerid)) return 0;
SendClientMessage(playerid, COLOR_GREY, \"Jármûvek Respawnolva!\");
GameTextForAll(\"~n~~n~~n~~n~~n~~n~~r~Jarmuvek ~g~respawnolva Admin altal!\", 3000,3);
for(new cars=0; cars<MAX_VEHICLES; cars++)
{
if(!VehicleOccupied(cars))
{
   SetVehicleToRespawn(cars);
}
}
return 1;
}
public OnPlayerDisconnect(playerid)
{
DestroyVehicle(SpawnedVehicles[playerid]);
    SpawnedVehicles[playerid] = 0;
    return 0;
}
GetVehicleModelIDFromName(vname[])
{
for(new i = 0; i < 211; i++)
{
if ( strfind(VehicleNames, 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;
}
public VehicleOccupied(vehicleid)
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerInVehicle(i,vehicleid)) return 1;
}
return 0;
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= \' \'))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > \' \') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal