Giving the vehicle HP and manipulating it.

I am trying to set to this vehicle HP, maybe 200-300, i dont know, it doesnt matter to me atm, the point is i want to do that
after the HP is 0, or below 0, it ignites, after 10 seconds explodes and after 30 seconds it just vanishes. I could do that myself
if it was an entity, but it is not. The only lua file is

local Category = "Half-Life 2"

local function HandleRollercoasterAnimation( vehicle, player )
    return player:SelectWeightedSequence( ACT_GMOD_SIT_ROLLERCOASTER ) 

local V = {     
                // Required information
                Name = "BF2 Buggy", 
                Class = "prop_vehicle_jeep_old",
                Category = Category,

                // Optional information
                Author = "MaKc,Erghize",
                Information = "Buggy from BF2",
                Model = "models/bf2bb.mdl",
                KeyValues = {
                                vehiclescript    =    "scripts/vehicles/jeep_test.txt"

list.Set( "Vehicles", "BF2 Buggy", V )

I need it urgently, thanks for whoever helps/tries to.

Sorry guys, he already ‘has it’. ’

And well, he was just trying to ‘see if I have knowledge in coding’

So don’t help him.

This guy is pissed because i didnt hire him as a coder.

As I said in our chat:

Well that’s interesting, maybe post the whole conversation if you don’t mind.

Oh, then it’s good that I didn’t waste my time working on this script.

Exactly, this kid should get banned for exploiting the good nature of members on Facepunch.

Good nature… hahahaha man you’ve made my day

hahahaha man stop being a dick

I took the time to think of an effective situation for this.

Show us the completed code which works… you have it, after all.

And don’t say you want it to be private, because the coder was most likely going to chuck it in a code box in this thread.

i would simply create a box based on the car sized who can only be damaged by weapons, and physics…
And when it dies remove it with the car with an explosion.

So clearly students shouldn’t answer the teacher’s questions at school, because the teachers already know the answers.


EDIT: This is a bit of a roundabout way of finding coders to hire, though.

I think it will be best to ask Sakarias, he made SCars after all, they’re damageable and what not.

the thing with scars is that they’re entirely separate entities though

not based on source vehicles at all

And SCars are made out of a few entites and constraints so they can be laggy if there are many of them plus they get buggy under some conditions.

Good point there mate, I thought they were half lua and half source. My bad.

In my opinion it can be done like someone said earlier, create a box around the vehicle that will take the damage and when the damage hits the critical limit, then remove the vehicle, spawn some eye candy explosion effects and remove the box.

I must say you people are brilliant:

function GM:EntityTakeDamage( ent, inflictor, attacker, amount )
	// If it is a car
	if ( ent:GetClass() == "prop_vehicle") then = ( or 100) - amount
		if <= 0 then

Don’t need it in game mode format? Just add a hook.
You people are over thinking this damn thing.

[editline]14th July 2012[/editline]

And you can do your own Timer shit on your own. You have the code already there after all.

shitty code will not work, don’t copy this…

Dont know what the fuck you are smoking… works fine for me.

[editline]14th July 2012[/editline]

Better yet, **explain **why its “shitty” code. I gotta hear this…