28.12.2013, 09:29
As i said it is retriving the slot correctly
pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
new slot = GetVehicleSlotFromID(vehicleid);
if(slot > -1)
{
print("IN SLOT"); // THIS PRINTS ** Anything after doesn't
new ownerid = GetPlayerIDFromName(AddUnderScoreToName(VehicleInfo[slot][vOwnerName]));
if(ownerid > -1)
{
print("IN OWNER");
if(IsPlayerConnected(ownerid))
{
print("IN CONNECT");
if(VehicleInfo[slot][vInsurance] > 0)
{
VehicleInfo[slot][vInsurance] --;
VehicleInfo[slot][vDestroyed] ++;
VehicleInfo[slot][vImpounded] = 1;
print("IN INSURE");
} else {
SendClientMessage(ownerid, 0xFFFFFFFF, "[{33CCFF}INFO{FFFFFF}]: I'm sorry to inform you that you don't have any insurace to cover your vehicles destoruction, and it has been impounded until you can retrive it.");
print("IN ELSE");
}
}
}
}
return true;
}