//DO NOT REMOVE THE CREDITS FROM ANY PART OF THIS SCRIPT! //BlueFusion and I put alot of work and time into this FS //I dont like scripts that advertise themselves when people join, so I didnt add them //But you MUST keep the credits in ALL parts to continue using this script! //************************************************************************************** //************************************************************************************** //The car spawned by this script is invincible, and will set ALL vehicles that come near it on fire //A command to destroy the deathcar was added, since there is no other way to get rid of it quickly. //If you find any bugs/errors in this script, please email me at lpfthings@gmail.com and let me know the problem //You may modify this scripts functions, but the credits are NOT to be removed. If you want a credit free version, please email me. // YOU CAN ONLY HAVE 1 DEATHCAR ON THE SERVER AT ONCE, UNTILL THE FIRST DEATHCAR WAS DESTROYED USING /destroydeathcar , its just the nature of the script. // Enjoy the script! #include #define COLOR_LIGHTBLUE 0x33CCFFAA new God[MAX_PLAYERS]; forward GodCar(playerid); stock GetDistanceBetweenVehicles(vehicleid, vehicleid2)//Adds the Function, Gets the distance between vehicles. TBH i dont fully know what it does below, but its not neccesary to figure out the script. { new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2; new Float:tmpdis; GetVehiclePos(vehicleid,x1,y1,z1); GetVehiclePos(vehicleid2,x2,y2,z2); tmpdis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2)); return floatround(tmpdis); } public OnFilterScriptInit() { print("******************************************");// Prints this in your server window, DO NOT REMOVE!! print("**_-_-_-_ Death Car Filterscript_-_-_-_-**");// prints this in your server window, DO NOT REMOVE!! print("**_Created by Thingszors and BlueFusion_**");// prints this in your server window, DO NOT REMOVE!! print("***************V 1.0**********************");// prints this in your server window, DO NOT REMOVE!! return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerCommandText(playerid, cmdtext[])// Just that! { if(strcmp(cmdtext, "/deathcar", true) == 0)// Here you can configure the command to spawn the death car. { SendClientMessage(playerid,COLOR_LIGHTBLUE, "*** Death car spawned!");// pints that when people use the command. SendClientMessage(playerid,COLOR_LIGHTBLUE, "*** Make sure you type /destroydeathcar before you hop out of the vehicle!");//Same as above new Float:x, Float:y, Float:z, Float:a;// creates new float's for the positions below SendClientMessage(playerid,COLOR_LIGHTBLUE, "*** Deathcar script created by Thingszors and BlueFusion");// DO NOT REMOVE! Doing so will corrupt this script! GetPlayerPos(playerid,x,y,z);//writes the player posistion to floats x,y and z GetPlayerFacingAngle(playerid,a);//writes the angle to float a God[playerid] = CreateVehicle(411, x+2, y, z+1, a, 3,3,99999999); // 411 is the modelID of the Infernous, you may change this to another vehicle, the other numbers do not need to be changed! PutPlayerInVehicle(playerid,God[playerid],0);//Puts you in the deathcar once its spawned. SetTimerEx("GodCar",100,true,"i",playerid);//Starts a timer for use below. This is where you can change the time rate. DO not set it too high, otherwise the deathcar might not work properly return 1; } if(strcmp(cmdtext, "/destroydeathcar", true) == 0) { // The command that will destroy the car. Since its invincible, its a good idea to do this command when you leave the vehicle DestroyVehicle(God[playerid]);//Destroys the deathcar SendClientMessage(playerid,COLOR_LIGHTBLUE, "*** Death Cars destroyed!");//prints to player when command is used return 1; } return 0; } public GodCar(playerid)// When the timer activates every 100ms { for (new v=1; v<=200; v++)//Checks the distance between the death car and ALL the other vehicles. { if(God[playerid] != v)//if the deathcar..... { if(GetDistanceBetweenVehicles(God[playerid],v) < 10)//If there is a vehicle within 10 units of the deathcar... { SetVehicleHealth(v,10.0);//sets the health of the vehicle in range to 10, catches fire instantly. } } } SetVehicleHealth(God[playerid],1000);//sets the health of the deathcar to full. return 1; }//This above bit of script, repeats every 100ms! The deathcar heals every 100ms, and it chcks the distance between vehicles every 100ms //If you notice people crashing excessively, you may want to change the "100" to a higher number in the timer noted above //DO NOT REMOVE THE CREDITS FROM ANY PART OF THIS SCRIPT! //BlueFusion and I put alot of work and time into this FS //I dont like scripts that advertise themselves when people join, so I didnt add them //But you MUST keep the credits in ALL parts to continue using this script! // Enjoy the script!