PDA

View Full Version : OnVehicleDeath


Lajko1
17/03/2014, 06:18 PM
Hey, I'm wondering how can I make at my trunk system when vehicle is destroyed it will clear it's trunk ? I have 5 slots and I want to make those slots if they are used (weapon stored inside) it will make it empty? This is what I'm using for trunk if it will help you ^^

enum Trunk
{
tWeapon1,
tWeapon2,
tWeapon3,
tWeapon4,
tWeapon5,
tAmmo1,
tAmmo2,
tAmmo3,
tAmmo4,
tAmmo5
};
new iTrunk[MAX_VEHICLES][Trunk];

CuervO
17/03/2014, 06:21 PM
Clear the variables and reset the files (if you have any) at OnVehicleDeath?

iTrunk[vehicleid][tWeapon1] = 0 .. and so on.

Lajko1
17/03/2014, 08:50 PM
Working, ty REP+