13.01.2012, 11:53
Quote:
pawn Код:
OnVehicleDeath already gives you the vehicle id.. OnVehicleDeath(vehicleid /* <--this one */, killerid) |
pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
new i;//New i which defines our playerid..
for(i = 0; i < MAX_PLAYERS; i ++)// i = 0 and is less than MAX_PLAYERS, increase 0 and loop untill you get to MAX_PLAYERS and return 1..
{
if(IsPlayerConnected(i) && GetPlayerVehicleID(i) == vehicleid)//If the player id is connected and there vehicle id = the vehicleid that was destroyed..
{
DestroyObject(VehicleBomb[vehicleid][0]);
DestroyObject(VehicleBomb[vehicleid][1]);
VehicleFire[vehicleid] = 0;
}
}
return 1;
}