SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Thread Tools Display Modes
Old 07/07/2020, 03:41 PM   #1
Big Clucker
Join Date: May 2012
Posts: 95
Reputation: 0
Wink 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
supermember is offline   Reply With Quote
Old 16/07/2020, 07:10 AM   #2
Big Clucker
Join Date: May 2019
Posts: 84
Reputation: 15
Default Re: Wreck Car After Respawn [Easily]

Is this a troll ? If not then Good Effort.
YouShootIDodge is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
UpdateVehicleDamageStatus get to Car wreck supermember Scripting Help 1 06/07/2020 04:57 PM
Wreck of car cnoopers Scripting Help 5 22/06/2014 11:03 PM
Getting zone coordinates easily Phil_Cutcliffe Scripting Help 3 09/03/2013 06:25 PM
[Map] SF Ship Wreck/Dm zone nickdodd25 Maps 8 03/07/2012 07:09 PM
[Map] Wreck boat interior+ outside mapping (with Video) (Download now) oscar7610 Maps 2 06/05/2012 11:44 PM

All times are GMT. The time now is 01:49 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.