OnVehicleDeath Problem
#5

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;
}
Reply


Messages In This Thread
OnVehicleDeath Problem - by zT KiNgKoNg - 27.12.2013, 18:45
Re: OnVehicleDeath Problem - by Cypress - 27.12.2013, 19:37
Re: OnVehicleDeath Problem - by zT KiNgKoNg - 27.12.2013, 20:19
Re: OnVehicleDeath Problem - by Cypress - 27.12.2013, 21:40
Re: OnVehicleDeath Problem - by zT KiNgKoNg - 28.12.2013, 09:29

Forum Jump:


Users browsing this thread: 1 Guest(s)