How To Fix This Error
#5

Well it's not working because pickupid 0 does not exist. I think ids start from 1.

You should use an if statement and check it against a pickup id.

pawn Код:
new some_pickup;//global

//put this wherever you create the pickup:
some_pickup = CreatePickup(...);

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == some_pickup)
    {
        RepairVehicle(GetPlayerVehicleID(playerid));
        SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
        SendClientMessage(playerid,orange,"Vehicle Fixed");
    }
    return 1;
}
EDIT: A bit too slow.
Reply


Messages In This Thread
How To Fix This Error - by God'Z War - 03.07.2012, 16:02
Re: How To Fix This Error - by .FuneraL. - 03.07.2012, 16:08
Re: How To Fix This Error - by God'Z War - 03.07.2012, 16:13
Re: How To Fix This Error - by .FuneraL. - 03.07.2012, 16:17
Re: How To Fix This Error - by iggy1 - 03.07.2012, 16:19

Forum Jump:


Users browsing this thread: 1 Guest(s)