09.02.2014, 13:36
Hello everyone, I'm trying to put a function in my script where if you drive a helicopters blade into someone, it would automatically destroy that helicopter. I tried this, by adding a new definition which is current veh and the helicopter reason on OnPlayerDeath which is 50, but it still didn't work. My helicopter was still there after I heli-bladed the person.
Код:
public OnPlayerDeath(playerid, killerid, reason) { new currentveh; if (reason == 50) DestroyVehicle(currentveh); { SendDeathMessage(killerid, playerid, reason); } return 1; }