[Tutorial] Wreck Car After Respawn [Easily]

I am New developer, And I have Low skill for sa-mp.
[I am weak english]

I am open a server for real life. But sometimes players often seize the opportunity to Spawn car, such as Drive the car fall water without Mechanic's repair. I try to fix this problems but I am new developer [weak developer]

First : I try to make Save health's Car into Mysql but I can't make it.
Second : I am think to easy make and I tried not related to the database.

Yep! I choose the second method. and I think it basic for all gamemode.

Begin : make it
new Float:VehicleDamage[MAX_VEHICLES];
Next : Find to : public OnVehicleDeath(vehicleid)
Describe : When The Vehicle was damage by something such as Fall the water, Weapon or Crash
It's Check = 1.
Type :
VehicleDamage[vehicleid] = 1;
Next : Find public OnVehicleSpawn(vehicleid)
Describe : If the vehicledamage = 1 , It will determine what the vehicle will look like.
if(VehicleDamage[vehicleid] == 1)
	UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, 15);//If want to Show look the car's damage
        SetVehicleHealth(vehicleid, 300);//Set Health After Respawn
        VehicleDamage[vehicleid] = 0; // Back Check this car to 0
This is working, But If you're Restart Server Or Vehicle's Respawn. The Car is comeback to Full hp.

I developed knowledge from...

Credit : SharpenBlade

Is this a troll ? If not then Good Effort.

Forum Jump:

Users browsing this thread: 1 Guest(s)