03.07.2012, 16:19
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.
EDIT: A bit too slow.
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;
}