Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*CRIADO POR [T]AKELOT .*/
- //==============================================================================
- #include <a_samp>
- #include zcmd
- #include sscanf
- //==============================================================================
- #define FILTERSCRIPT
- #define NEON 1089
- //==============================================================================
- new luz[MAX_PLAYERS];
- new bool:b[MAX_VEHICLES], Float:v[MAX_VEHICLES];
- //==============================================================================
- #if defined FILTERSCRIPT
- forward OnPlayerInfoChange(playerid);
- //==============================================================================
- new NomeDosVeiculos[][] ={
- "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","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","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 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","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",
- "Trailer","Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford",
- "BF-400","Newsvan","Tug","Trailer A","Emperor","Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C",
- "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" };
- #endif
- //==============================================================================
- public OnFilterScriptInit()
- {
- SetTimer("damagedCar",2000,true);
- print("\n==================================");
- print(" Filterscript: [iT Car System] Ligado");
- print("====================================\n");
- return 1;
- }
- //==============================================================================
- command(blindar, playerid, params[]) {
- if(!IsPlayerInAnyVehicle(playerid))
- return false;
- new vehicleid = GetPlayerVehicleID(playerid);
- b[vehicleid] = true;
- GetVehicleHealth(vehicleid, v[vehicleid]);
- SetTimerEx("Blindagem", 5*60000, false, "i", vehicleid);
- SendClientMessage(playerid, -1, "{00cc00}Blindagem adcionada");
- return true;
- }
- command(neon, playerid, params[]) {
- new pname[MAX_PLAYER_NAME], string[79 + MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string, sizeof(string), "{8080FF}o jogador {E6E6E6}%s {8080FF}Está adcionando um neon ao veiculo. {E6E6E6}[/Neon]", pname);
- SendClientMessageToAll(-1, string);
- ShowPlayerDialog(playerid, NEON, DIALOG_STYLE_LIST, "{FFFF00}# {FFFFFF}Selecione o Neon","Azul\nVerde\nAmarelo\nBranco\nRosa\n{FF0000}Retirar Neon Do Veiculo","Add","Close");
- return true;
- }
- //==============================================================================
- public OnVehicleDamageStatusUpdate(vehicleid, playerid)
- {
- if(b[vehicleid] == true)
- return SetVehicleHealth(vehicleid, v[vehicleid]);
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER)
- {
- SendClientMessage(playerid, 0x00CC00FF, "{00CC00}[iT Car System]: Use a a tecla {FFFFFF}2 {00CC00}para ligar ou desligar o veiculo");
- SendClientMessage(playerid, 0x00CC00FF, "{00CC00}[iT Car System]: Para Ligar o Farol Aperte {FFFFFF}Y");
- }
- new
- str[50],
- oldnew
- ;
- if (newstate == 2 || newstate == 3)
- {
- if (oldnew == 0)
- {
- format(str, sizeof(str), "~g~%s",NomeDosVeiculos[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
- GameTextForPlayer(playerid, str, 6000, 1);
- }
- }
- return 1;
- }
- public OnPlayerUpdate(playerid) {
- if (GetPlayerVehicleSeat(playerid) == 0)
- {
- new Float:health, engine, lights, alarm, doors, bonnet, boot, objective;
- GetVehicleHealth(GetPlayerVehicleID(playerid), health);
- if (health < 250)
- {
- SetVehicleHealth(GetPlayerVehicleID(playerid), 300.0);
- GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
- SetVehicleParamsEx(GetPlayerVehicleID(playerid), false, lights, alarm, doors, bonnet, boot, objective);
- GameTextForPlayer(playerid, "~h~veiculo quebrado chame um mecanico", 5000, 4);
- SendClientMessage(playerid, 0xFF0000AA, "Falha, chame um mecanico /mecanico .");
- }
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys == KEY_YES && IsPlayerInAnyVehicle(playerid))
- {
- new engine, lights, alarm, doors, bonnet, boot, objective;
- if(luz[playerid] == 0)
- {
- new veh = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
- SetVehicleParamsEx(veh, engine, VEHICLE_PARAMS_ON, alarm, doors, bonnet, boot, objective);
- luz[playerid] = 1;
- GameTextForPlayer(playerid,"~y~farol: ~g~ligado",5000,3);
- }
- else if(luz[playerid] == 1)
- {
- new veh = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(veh, engine, lights, alarm,doors, bonnet, boot, objective);
- SetVehicleParamsEx(veh, engine, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective);
- luz[playerid] = 0;
- GameTextForPlayer(playerid,"~y~FAROL: ~r~DESLIGADO",5000,3);
- }
- }
- if(newkeys == KEY_SUBMISSION && IsPlayerInAnyVehicle(playerid))
- {
- new mot, lu, alar, por, cap, porma, ob;
- new carro = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
- if(mot == VEHICLE_PARAMS_OFF)
- {
- SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
- GameTextForPlayer(playerid,"~y~motor: ~g~ligado",5000,3);
- PlayerPlaySound(playerid, 1054 , 0.0, 0.0, 10.0);
- }else{
- GameTextForPlayer(playerid,"~y~motor: ~r~desligado",5000,3);
- PlayerPlaySound(playerid, 1054 , 0.0, 0.0, 10.0);
- SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
- }
- }
- return 1;
- }
- forward Blindagem(vehicleid);
- public Blindagem(vehicleid) {
- b[vehicleid] = false;
- return true;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == NEON)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SetPVarInt(playerid, "neon", 1);
- SetPVarInt(playerid, "blue", CreateObject(18648,0,0,0,0,0,0));
- SetPVarInt(playerid, "blue1", CreateObject(18648,0,0,0,0,0,0));
- AttachObjectToVehicle(GetPVarInt(playerid, "blue"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- AttachObjectToVehicle(GetPVarInt(playerid, "blue1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid, "~g~] Neon Azul adcionado ]",3500,5);
- }
- if(listitem == 1)
- {
- SetPVarInt(playerid, "neon", 1);
- SetPVarInt(playerid, "green", CreateObject(18649,0,0,0,0,0,0));
- SetPVarInt(playerid, "green1", CreateObject(18649,0,0,0,0,0,0));
- AttachObjectToVehicle(GetPVarInt(playerid, "green"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- AttachObjectToVehicle(GetPVarInt(playerid, "green1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid, "~g~] Neon Verde adcionado ]",3500,5);
- }
- if(listitem == 2)
- {
- SetPVarInt(playerid, "neon", 1);
- SetPVarInt(playerid, "yellow", CreateObject(18650,0,0,0,0,0,0));
- SetPVarInt(playerid, "yellow1", CreateObject(18650,0,0,0,0,0,0));
- AttachObjectToVehicle(GetPVarInt(playerid, "yellow"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- AttachObjectToVehicle(GetPVarInt(playerid, "yellow1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid, "~g~] Neon Amarelo adcionado ]",3500,5);
- }
- if(listitem == 3)
- {
- SetPVarInt(playerid, "neon", 1);
- SetPVarInt(playerid, "white", CreateObject(18652,0,0,0,0,0,0));
- SetPVarInt(playerid, "white1", CreateObject(18652,0,0,0,0,0,0));
- AttachObjectToVehicle(GetPVarInt(playerid, "white"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- AttachObjectToVehicle(GetPVarInt(playerid, "white1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid, "~g~] Neon Branco adcionado ]",3500,5);
- }
- if(listitem == 4)
- {
- SetPVarInt(playerid, "neon", 1);
- SetPVarInt(playerid, "pink", CreateObject(18651,0,0,0,0,0,0));
- SetPVarInt(playerid, "pink1", CreateObject(18651,0,0,0,0,0,0));
- AttachObjectToVehicle(GetPVarInt(playerid, "pink"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- AttachObjectToVehicle(GetPVarInt(playerid, "pink1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid, "~g~] Neon Rosa adcionado ]",3500,5);
- }
- if(listitem == 5)
- {
- DestroyObject(GetPVarInt(playerid, "blue"));
- DeletePVar(playerid, "neon");
- DestroyObject(GetPVarInt(playerid, "blue1"));
- DeletePVar(playerid, "neon");
- DestroyObject(GetPVarInt(playerid, "green"));
- DeletePVar(playerid, "neon");
- DestroyObject(GetPVarInt(playerid, "green1"));
- DeletePVar(playerid, "neon");
- DestroyObject(GetPVarInt(playerid, "yellow"));
- DeletePVar(playerid, "neon");
- DestroyObject(GetPVarInt(playerid, "yellow1"));
- DeletePVar(playerid, "neon");
- DestroyObject(GetPVarInt(playerid, "white"));
- DeletePVar(playerid, "neon");
- DestroyObject(GetPVarInt(playerid, "white1"));
- DeletePVar(playerid, "neon");
- DestroyObject(GetPVarInt(playerid, "pink"));
- DeletePVar(playerid, "neon");
- DestroyObject(GetPVarInt(playerid, "pink1"));
- DeletePVar(playerid, "neon");
- GameTextForPlayer(playerid, "~r~Todos neon foram removidos",3500,5);
- }
- }
- }
- return 1;
- }
- /*CRIADO POR [T]AKELOT .*/
Advertisement
Add Comment
Please, Sign In to add comment